NTFS
From Wikipedia:
- NTFS (New Technology File System) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family.
Linux has two kernel drivers for NTFS with both read and write support:
- ntfs3—originally upstreamed to the Linux kernel by Paragon. There are no userspace utilities alongside the ntfs3 kernel driver. To format partitions and perform maintenance, you can install the ntfsprogs package from NTFS-3G or use a Windows machine.
- ntfs—available since Linux 7.1 and based on the old (mostly) read-only driver that was removed in Linux 6.9. Userspace utilities are available in ntfsprogs-plusAUR.
There is no objectively better driver at the moment, both have pros and cons along with some other subtle differences in operation. Notably:
- ntfs is supposed to have slightly better performance overall.
- ntfs does not support Windows native symlinks yet (planned for 7.2 [1]).
- Differences in TRIM implementation.
Tips and tricks
Prevent creation of names not allowed by Windows
NTFS itself does not have restrictions for characters and names used, but Windows does.
The kernel drivers support windows_names mount(8) option. Use it to strictly maintain compatibility.
Use the ntfs driver in GUI file managers
Most GUI file managers use udisks to mount, it prefers the ntfs3 driver by default. To use the ntfs driver instead, see udisks#Set preferred drivers.
Known issues
Explicit file system type required to mount
On kernels before 7.1, by default NTFS partitions may mount read-only or fail to mount completely.
In such case you need to explicitly specify the file system type as ntfs3. For example, using mount(8)'s -t/--types option:
# mount -t ntfs3 /dev/sdxY /mnt
Or using fstab:
/etc/fstab
/dev/sdxY /mnt ntfs3 defaults 0 0
Troubleshooting
File system mounts read-only
If using a kernel older than 7.1, use ntfs3 to mount the file system read-write. See #Explicit file system type required to mount.
unknown filesystem type 'ntfs'
When mounting NTFS, you can encounter an error such as:
mount: /mnt: unknown filesystem type 'ntfs'
See #Explicit file system type required to mount.
Unable to mount with ntfs3 with partition marked dirty
When trying to mount a good NTFS partition (i.e. which successfully mounts with NTFS-3G and for which ntfsfix --no-action does not report any error), you may get the following error:
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
ntfs3 will not mount a partition where the volume is marked dirty without the force option. dmesg explicitly helps recognizing the situation, saying:
sdb1: volume is dirty and "force" flag is not set!
You can try passing the --clear-dirty argument to ntfsfix(8) to clean it. [2]
See also
- NTFS3 kernel documentation
- NTFS3 Driver FAQ – Paragon Software Group
- NTFS3 performance comparison