1 The Linux NTFS filesystem driver
2 ================================
11 - Supported mount options
12 - Known bugs and (mis-)features
13 - Using Software RAID with NTFS
14 - Limitiations when using the MD driver
21 Linux-NTFS comes with a number of user-space programs known as ntfsprogs.
22 These include mkntfs, a full-featured ntfs file system format utility,
23 ntfsundelete used for recovering files that were unintentionally deleted
24 from an NTFS volume and ntfsresize which is used to resize an NTFS partition.
25 See the web site for more information.
27 To mount an NTFS 1.2/3.x (Windows NT4/2000/XP/2003) volume, use the file
28 system type 'ntfs'. The driver currently supports read-only mode (with no
29 fault-tolerance, encryption or journalling) and very limited, but safe, write
32 For fault tolerance and raid support (i.e. volume and stripe sets), you can
33 use the kernel's Software RAID / MD driver. See section "Using Software RAID
34 with NTFS" for details.
40 There is plenty of additional information on the linux-ntfs web site
41 at http://linux-ntfs.sourceforge.net/
43 The web site has a lot of additional information, such as a comprehensive
44 FAQ, documentation on the NTFS on-disk format, informaiton on the Linux-NTFS
45 userspace utilities, etc.
51 - This is a complete rewrite of the NTFS driver that used to be in the kernel.
52 This new driver implements NTFS read support and is functionally equivalent
53 to the old ntfs driver.
54 - The new driver has full support for sparse files on NTFS 3.x volumes which
55 the old driver isn't happy with.
56 - The new driver supports execution of binaries due to mmap() now being
58 - The new driver supports loopback mounting of files on NTFS which is used by
59 some Linux distributions to enable the user to run Linux from an NTFS
60 partition by creating a large file while in Windows and then loopback
61 mounting the file while in Linux and creating a Linux filesystem on it that
62 is used to install Linux on it.
63 - A comparison of the two drivers using:
64 time find . -type f -exec md5sum "{}" \;
65 run three times in sequence with each driver (after a reboot) on a 1.4GiB
66 NTFS partition, showed the new driver to be 20% faster in total time elapsed
67 (from 9:43 minutes on average down to 7:53). The time spent in user space
68 was unchanged but the time spent in the kernel was decreased by a factor of
69 2.5 (from 85 CPU seconds down to 33).
70 - The driver does not support short file names in general. For backwards
71 compatibility, we implement access to files using their short file names if
72 they exist. The driver will not create short file names however, and a rename
73 will discard any existing short file name.
74 - The new driver supports exporting of mounted NTFS volumes via NFS.
77 Supported mount options
78 =======================
80 In addition to the generic mount options described by the manual page for the
81 mount command (man 8 mount, also see man 5 fstab), the NTFS driver supports the
82 following mount options:
84 iocharset=name Deprecated option. Still supported but please use
85 nls=name in the future. See description for nls=name.
87 nls=name Character set to use when returning file names.
88 Unlike VFAT, NTFS suppresses names that contain
89 unconvertible characters. Note that most character
90 sets contain insufficient characters to represent all
91 possible Unicode characters that can exist on NTFS.
92 To be sure you are not missing any files, you are
93 advised to use nls=utf8 which is capable of
94 representing all Unicode characters.
96 utf8=<bool> Option no longer supported. Currently mapped to
97 nls=utf8 but please use nls=utf8 in the future and
98 make sure utf8 is compiled either as module or into
99 the kernel. See description for nls=name.
103 umask= Provide default owner, group, and access mode mask.
104 These options work as documented in mount(8). By
105 default, the files/directories are owned by root and
106 he/she has read and write permissions, as well as
107 browse permission for directories. No one else has any
108 access permissions. I.e. the mode on all files is by
109 default rw------- and for directories rwx------, a
110 consequence of the default fmask=0177 and dmask=0077.
111 Using a umask of zero will grant all permissions to
112 everyone, i.e. all files and directories will have mode
116 dmask= Instead of specifying umask which applies both to
117 files and directories, fmask applies only to files and
118 dmask only to directories.
120 sloppy=<BOOL> If sloppy is specified, ignore unknown mount options.
121 Otherwise the default behaviour is to abort mount if
122 any unknown options are found.
124 show_sys_files=<BOOL> If show_sys_files is specified, show the system files
125 in directory listings. Otherwise the default behaviour
126 is to hide the system files.
127 Note that even when show_sys_files is specified, "$MFT"
128 will not be visible due to bugs/mis-features in glibc.
129 Further, note that irrespective of show_sys_files, all
130 files are accessible by name, i.e. you can always do
131 "ls -l \$UpCase" for example to specifically show the
132 system file containing the Unicode upcase table.
134 case_sensitive=<BOOL> If case_sensitive is specified, treat all file names as
135 case sensitive and create file names in the POSIX
136 namespace. Otherwise the default behaviour is to treat
137 file names as case insensitive and to create file names
138 in the WIN32/LONG name space. Note, the Linux NTFS
139 driver will never create short file names and will
140 remove them on rename/delete of the corresponding long
142 Note that files remain accessible via their short file
143 name, if it exists. If case_sensitive, you will need
144 to provide the correct case of the short file name.
146 errors=opt What to do when critical file system errors are found.
147 Following values can be used for "opt":
148 continue: DEFAULT, try to clean-up as much as
149 possible, e.g. marking a corrupt inode as
150 bad so it is no longer accessed, and then
152 recover: At present only supported is recovery of
153 the boot sector from the backup copy.
154 If read-only mount, the recovery is done
155 in memory only and not written to disk.
156 Note that the options are additive, i.e. specifying:
157 errors=continue,errors=recover
158 means the driver will attempt to recover and if that
159 fails it will clean-up as much as possible and
162 mft_zone_multiplier= Set the MFT zone multiplier for the volume (this
163 setting is not persistent across mounts and can be
164 changed from mount to mount but cannot be changed on
165 remount). Values of 1 to 4 are allowed, 1 being the
166 default. The MFT zone multiplier determines how much
167 space is reserved for the MFT on the volume. If all
168 other space is used up, then the MFT zone will be
169 shrunk dynamically, so this has no impact on the
170 amount of free space. However, it can have an impact
171 on performance by affecting fragmentation of the MFT.
172 In general use the default. If you have a lot of small
173 files then use a higher value. The values have the
175 Value MFT zone size (% of volume size)
180 Note this option is irrelevant for read-only mounts.
183 Known bugs and (mis-)features
184 =============================
186 - The link count on each directory inode entry is set to 1, due to Linux not
187 supporting directory hard links. This may well confuse some user space
188 applications, since the directory names will have the same inode numbers.
189 This also speeds up ntfs_read_inode() immensely. And we haven't found any
190 problems with this approach so far. If you find a problem with this, please
194 Please send bug reports/comments/feedback/abuse to the Linux-NTFS development
195 list at sourceforge: linux-ntfs-dev@lists.sourceforge.net
198 Using Software RAID with NTFS
199 =============================
201 For support of volume and stripe sets, use the kernel's Software RAID / MD
202 driver and set up your /etc/raidtab appropriately (see man 5 raidtab).
204 Linear volume sets, i.e. linear raid, as well as stripe sets, i.e. raid level
205 0, have been tested and work fine (though see section "Limitiations when using
206 the MD driver with NTFS volumes" especially if you want to use linear raid).
207 Even though untested, there is no reason why mirrors, i.e. raid level 1, and
208 stripes with parity, i.e. raid level 5, should not work, too.
210 You have to use the "persistent-superblock 0" option for each raid-disk in the
211 NTFS volume/stripe you are configuring in /etc/raidtab as the persistent
212 superblock used by the MD driver would damange the NTFS volume.
214 Windows by default uses a stripe chunk size of 64k, so you probably want the
215 "chunk-size 64k" option for each raid-disk, too.
217 For example, if you have a stripe set consisting of two partitions /dev/hda5
218 and /dev/hdb1 your /etc/raidtab would look like this:
224 persistent-superblock 0
231 For linear raid, just change the raid-level above to "raid-level linear", for
232 mirrors, change it to "raid-level 1", and for stripe sets with parity, change
233 it to "raid-level 5".
235 Note for stripe sets with parity you will also need to tell the MD driver
236 which parity algorithm to use by specifying the option "parity-algorithm
237 which", where you need to replace "which" with the name of the algorithm to
238 use (see man 5 raidtab for available algorithms) and you will have to try the
239 different available algorithms until you find one that works. Make sure you
240 are working read-only when playing with this as you may damage your data
241 otherwise. If you find which algorithm works please let us know (email the
242 linux-ntfs developers list linux-ntfs-dev@lists.sourceforge.net or drop in on
243 IRC in channel #ntfs on the irc.freenode.net network) so we can update this
246 Once the raidtab is setup, run for example raid0run -a to start all devices or
247 raid0run /dev/md0 to start a particular md device, in this case /dev/md0.
249 Then just use the mount command as usual to mount the ntfs volume using for
250 example: mount -t ntfs -o ro /dev/md0 /mnt/myntfsvolume
252 It is advisable to do the mount read-only to see if the md volume has been
253 setup correctly to avoid the possibility of causing damage to the data on the
257 Limitiations when using the MD driver
258 =====================================
260 Using the md driver will not work properly if any of your NTFS partitions have
261 an odd number of sectors. This is especially important for linear raid as all
262 data after the first partition with an odd number of sectors will be offset by
263 one or more sectors so if you mount such a partition with write support you
264 will cause massive damage to the data on the volume which will only become
265 apparent when you try to use the volume again under Windows.
267 So when using linear raid, make sure that all your partitions have an even
268 number of sectors BEFORE attempting to use it. You have been warned!
274 Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
277 - Invalidate quotas when (re)mounting read-write.
278 NOTE: This now only leave user space journalling on the side. (See
279 note for version 2.1.13, below.)
281 - Fix an NFSd caused deadlock reported by several users.
283 - Implement writing of inodes (access time updates are not implemented
284 yet so mounting with -o noatime,nodiratime is enforced).
285 - Enable writing out of resident files so you can now overwrite any
286 uncompressed, unencrypted, nonsparse file as long as you do not
287 change the file size.
288 - Add housekeeping of ntfs system files so that ntfsfix no longer needs
289 to be run after writing to an NTFS volume.
290 NOTE: This still leaves quota tracking and user space journalling on
291 the side but they should not cause data corruption. In the worst
292 case the charged quotas will be out of date ($Quota) and some
293 userspace applications might get confused due to the out of date
294 userspace journal ($UsnJrnl).
296 - Fix the second fix to the decompression engine from the 2.1.9 release
297 and some further internals cleanups.
299 - Driver internal cleanups.
301 - Force read-only (re)mounting of volumes with unsupported volume
302 flags and various cleanups.
304 - Fix two bugs in handling of corner cases in the decompression engine.
306 - Read the $MFT mirror and compare it to the $MFT and if the two do not
307 match, force a read-only mount and do not allow read-write remounts.
308 - Read and parse the $LogFile journal and if it indicates that the
309 volume was not shutdown cleanly, force a read-only mount and do not
310 allow read-write remounts. If the $LogFile indicates a clean
311 shutdown and a read-write (re)mount is requested, empty $LogFile to
312 ensure that Windows cannot cause data corruption by replaying a stale
313 journal after Linux has written to the volume.
314 - Improve time handling so that the NTFS time is fully preserved when
315 converted to kernel time and only up to 99 nano-seconds are lost when
316 kernel time is converted to NTFS time.
318 - Enable NFS exporting of mounted NTFS volumes.
320 - Fix minor bug in handling of compressed directories that fixes the
321 erroneous "du" and "stat" output people reported.
323 - Minor bug fix in attribute list attribute handling that fixes the
324 I/O errors on "ls" of certain fragmented files found by at least two
325 people running Windows XP.
327 - Minor update allowing compilation with all gcc versions (well, the
328 ones the kernel can be compiled with anyway).
330 - Major bug fixes for reading files and volumes in corner cases which
331 were being hit by Windows 2k/XP users.
333 - Major bug fixes aleviating the hangs in statfs experienced by some
336 - Update handling of compressed files so people no longer get the
337 frequently reported warning messages about initialized_size !=
340 - Add configuration option for developmental write support.
341 - Initial implementation of file overwriting. (Writes to resident files
342 are not written out to disk yet, so avoid writing to files smaller
344 - Intercept/abort changes in file size as they are not implemented yet.
346 - Minor bugfixes in error code paths and small cleanups.
348 - Small internal cleanups.
349 - Support for sendfile system call. (Christoph Hellwig)
351 - Massive internal locking changes to mft record locking. Fixes
352 various race conditions and deadlocks.
353 - Fix ntfs over loopback for compressed files by adding an
354 optimization barrier. (gcc was screwing up otherwise ?)
355 Thanks go to Christoph Hellwig for pointing these two out:
356 - Remove now unused function fs/ntfs/malloc.h::vmalloc_nofs().
357 - Fix ntfs_free() for ia64 and parisc.
359 - Small internal cleanups.
361 These only affect 32-bit architectures:
362 - Check for, and refuse to mount too large volumes (maximum is 2TiB).
363 - Check for, and refuse to open too large files and directories
366 - Support non-resident directory index bitmaps. This means we now cope
367 with huge directories without problems.
368 - Fix a page leak that manifested itself in some cases when reading
372 - Fix race condition and improvements in block i/o interface.
373 - Optimization when reading compressed files.
375 - Fix race condition in reading of compressed files.
377 - Cleanups and optimizations.
379 - Fix stupid bug introduced in 2.0.15 in new attribute inode API.
380 - Big internal cleanup replacing the mftbmp access hacks by using the
381 new attribute inode API instead.
383 - Bug fix in parsing of remount options.
384 - Internal changes implementing attribute (fake) inodes allowing all
385 attribute i/o to go via the page cache and to use all the normal
386 vfs/mm functionality.
388 - Internal changes improving run list merging code and minor locking
389 change to not rely on BKL in ntfs_statfs().
391 - Internal changes towards using iget5_locked() in preparation for
392 fake inodes and small cleanups to ntfs_volume structure.
394 - Internal cleanups in address space operations made possible by the
395 changes introduced in the previous release.
397 - Internal updates and cleanups introducing the first step towards
398 fake inode based attribute i/o.
400 - Microsoft says that the maximum number of inodes is 2^32 - 1. Update
401 the driver accordingly to only use 32-bits to store inode numbers on
402 32-bit architectures. This improves the speed of the driver a little.
404 - Change decompression engine to use a single buffer. This should not
405 affect performance except perhaps on the most heavy i/o on SMP
406 systems when accessing multiple compressed files from multiple
407 devices simultaneously.
408 - Minor updates and cleanups.
410 - Remove now obsolete show_inodes and posix mount option(s).
411 - Restore show_sys_files mount option.
412 - Add new mount option case_sensitive, to determine if the driver
413 treats file names as case sensitive or not.
414 - Mostly drop support for short file names (for backwards compatibility
415 we only support accessing files via their short file name if one
417 - Fix dcache aliasing issues wrt short/long file names.
418 - Cleanups and minor fixes.
422 - Major bugfix to make compatible with other kernel changes. This fixes
423 the hangs/oopses on umount.
424 - Locking cleanup in directory operations (remove BKL usage).
426 - Major buffer overflow bug fix.
427 - Minor cleanups and updates for kernel 2.5.12.
429 - Cleanups and updates for kernel 2.5.11.
431 - Small bug fixes, cleanups, and performance improvements.
433 - Use default fmask of 0177 so that files are no executable by default.
434 If you want owner executable files, just use fmask=0077.
435 - Update for kernel 2.5.9 but preserve backwards compatibility with
437 - Minor bug fixes, cleanups, and updates.
439 - Minor updates, primarily set the executable bit by default on files
440 so they can be executed.