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.
The ntfs3 kernel driver provides read and write support for the file system.
- All officially supported kernels with versions 5.15 or newer are built with
CONFIG_NTFS3_FS=m
and thus support it. Before 5.15, NTFS read and write support is provided by the NTFS-3G FUSE file system. Or you can use backported NTFS3 via ntfs3-dkmsAUR. - Paragon Software, the author of the kernel module, has not yet released userspace utilities for NTFS3. You can use NTFS-3G userspace utilities without NTFS-3G driver via ntfsprogs-ntfs3AUR.
Tips and tricks
Improving performance
You can enable the prealloc
mount(8) option to decrease fragmentation in case of parallel write operations (most useful for HDD).
Prevent creation of names not allowed by Windows
NTFS itself does not have restrictions for characters and names used, but Windows does.
Since the kernel version 6.2, ntfs3 supports windows_names
mount(8) option. Use it to strictly maintain compatibility.
Known issues
Explicit file system type required to mount
ntfs3
requires the file system type to mount.
To be able to mount the file system, specify its type as ntfs3
. For example, using mount(8)'s -t
/--types
option:
# mount -t ntfs3 /dev/sdxY /mnt
Troubleshooting
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.
If you want to use ntfs3
as the default driver for ntfs
partitions, such udev rule does the trick:
/etc/udev/rules.d/ntfs3_by_default.rules
SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs3"
Although, this method is not recommended and can confuse some 3rd party tools.
udisks support
udisks supports NTFS3, but has some issues at the moment. See udisks ntfs3 PR and issue 932.
Issues can manifest as the following errors, when the NTFS3 driver is used because NTFS-3G is not installed, but with mount options that it does not recognize:
ntfs3: Unknown parameter 'windows_names'
or
Filesystem type ntfs3,ntfs not configured in kernel
The second error in particular can be encountered with Dolphin. Nautilus can also report the same error message in the case of a dirty NTFS partition (see #Unable to mount with ntfs3 with partition marked dirty).
As a workaround, add a such option to /etc/udisks2/mount_options.conf
in [defaults]
section:
ntfs_defaults=uid=$UID,gid=$GID,prealloc
See: Cannot mount NTFS with the new ntfs3 module from Linux 5.15
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
to clean it. [1]
See also
- NTFS3 kernel documentation
- NTFS3 Driver FAQ – Paragon Software Group
- NTFS3 performance comparison