Irfan’s Corner on the Web On Mac, Linux, Grid, Virtualization and Software Technology

23Jun/075

Stable Full NTFS support in Linux Atlast!

Adding full read/write NTFS support to Linux has been a story of damaged reputations, data corruptions and human ingenuity!

Since 1995 various groups have been working on adding support for NTFS to Linux, however their efforts were dealt a severe blow when Microsoft significantly changed the filesystem in Windows 2000. The project which came most near to a providing a complete support for NTFS was Captive NTFS which used Windows's own native ntfs driver wrapped in ReactOS, however due to proprietary issues Captive NTFS could not be accepted as a mainstream solution.

Now after 12 years in development, there is a full driver at last! NTFS-3G, which uses Filesystem in User Space (FUSE), and provides full read/write support for NTFS partitions. Such was the demand that within 5 days of release the projects main page, received 2 million hits! Here is a brief tutorial how to make use of it.

Installing NTFS-3G

The entire software can be downloaded from http://www.ntfs-3g.org/index.html, many distribution specific packages exist.OpenSUSE users can refer to this.

Creating a Parition

For full guide, check the official how-to by TLDP

Formatting the partition to ntfs

use the mkfs.ntfs utility to format a partition to NTFS, you could also use any Windows installation for this purpose (I would recommend the latter, as mkfs.ntfs is very slow)

usage:

mkfs.ntfs drive-name [eg. mkfs.ntfs /dev/sdb1]

Mounting NTFS drive

mount -t ntfs-3g drive-name mount-point [eg. mount -t ntfs-3g /dev/sdb1 /mnt/sdb1]

Unmounting the NTFS drive

umount drive-name

Intially when I installed ntfs-3g, I faced lots of stability problems. It complained something about using a kernel less than 2.6.20, I was using opensuse's default kernel 2.6.18-34, and I faced data corruption twice. Now I'm using the 2.6.22-2 kernel, and it seems to be working stable now. Additionally it was reported in the media that writing is slow in this driver, however I have not noticed any difference, maybe because I was writing to an external hard disk and the bottleneck was in the USB interface. Real performance can be measured in internal hard disk partitions.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Twitter
  • Alex

    I have used this feature in Ubuntu without problems since Ubuntu 6.10

  • http://botd.wordpress.com/2007/06/24/top-posts-424/ Top Posts « WordPress.com

    [...] Stable Full NTFS support in Linux Atlast! Adding full read/write NTFS support to Linux has been a story of damaged reputations, data corruptions and human […] [...]

  • Nikoolinux

    Hi.

    I’ve seen that there could be problems with compressed files such as .rar ou .zip

    Did you see sthing like this ?

    What if you have multiple folders in a folder that itself contain multiple folders ?

    Thanks for your answer.

  • http://www.programaslivres.net/?p=959 NTFS estável e ZFS em Linux no Programas Livres

    [...] de vários anos de desenvolvimento chegou finalmente à versão estável o driver que permite ler e escrever em partições NTFS (sistema de [...]

  • http://www.freesoftwaremagazine.com/blogs/move_your_data Mitch 74

    Article is incorrect on several points:
    - it is a hacked part of Wine which was used to make CaptiveNTFS; ReactOS still has no NTFS support whatsoever.
    - NTFS-3G is called ‘third generation’ because it is the third rewrite of the Linux NTFS driver. The first one was for NTFS 1 (NT4) in read/write; the second is in the kernel, mostly read only (although write support is getting added piece after piece) while the third (NTFS-3G) is a new attempt at rewriting this support. Partial write support for NTFS 3.1 has been in kernel since 2005, read support came in 2002.
    - the instability and data corruption problems mainly stem from the fact that NTFS-3G is considered final only since end of February 2007, and that it requires FUSE to be stable; however, mainline kernel had implemented FUSE 2.6.2 which included a bug that resulted in unsafe unmounting. More recent versions don’t have the bug.
    - slow formatting comes from full formatting; mkfs.ntfs -Q will format it as fast as Windows’ Quick Format (if not faster due to Linux’ faster I/O)
    - since version 1.414 (current is 1.616), NTFS-3G’s block allocator, although not fully optimized, is actually better than Microsoft’s own at keeping files unfragmented. Lack of optimization translates into higher CPU use (which, on faster drives and faster interfaces, may translate in transfer speed drops due to 100% CPU use)
    - NTFS-3G doesn’t support NTFS’s encryption and compression routines (those still haven’t been reverse-engineered), meaning that NTFS compressed/encrypted files can’t be read. Files compressed in .RAR or .ZIP are handled by the driver as normal files.

  • http://bigbolshevik.blogs.friendster.com/a_man_and_his_penguin/ Chris Lees

    To answer Nikoolinux, yes the NTFS-3G driver can handle any number of folders inside folders. There are no problems with files that are compressed at file level, like zip files, MP3s, Stuffit, Bzip etc. However, Windows XP and Vista can compress files at the *filesystem* level, and this feature has not been reverse-engineered yet in NTFS-3G.

    One little gotcha: NTFS-3G actually supports more features of NTFS than Windows, so the 3G driver allows you to use colons in filenames even though Windows itself can’t recognise such things. If this is a problem for you, you could export the NTFS volume through Samba, or install the Unix extensions for Windows.

    The driver is in very good shape, and has worked very well for me on an external hard disk even though it is fragmented. I hope the Gnome, KDE and XFCE automounters support NTFS-3G in their next versions.

  • Ivan Avery Frey

    Partition is spelled wrong.