Linux: allow mounting NTFS volumes with ntfs3#1695
Conversation
|
@mammothcoding Your results are useful confirmation for #1660 conclusion. I agree with the general direction of this P but I can't merge it as-is. Please revise the following:
Once these points are addressed, this can be considered as an opt-in mitigation for affected Linux users. |
|
Thanks for the note about translation changes. I removed the Russian language and Russian documentation updates from this PR in 2411942, so this PR now keeps only the code changes plus English strings/docs. If this PR is accepted, I can follow up with a separate Russian translation PR based on the final English text. |
|
@mammothcoding Thanks for the changes. I did a small update to add new entries to XML language files to make Validate XML pass |
Summary
This PR allows Linux users to mount NTFS volumes with the in-kernel
ntfs3driver instead ofntfs-3g/fuseblk.It intentionally does not add sleep hooks, automatic dismounting, or arbitrary filesystem type passthrough. It adds a narrow Linux-only
ntfs3path for NTFS volumes.Motivation
This is related to #1660.
On recent Linux/systemd combinations, NTFS VeraCrypt volumes mounted through
ntfs-3gappear asfuseblk. During suspend/hibernate, systemd may freezeuser.slicewhile the kernel sleep path tries to sync FUSE-backed filesystems. If the userspacentfs-3gdaemon is frozen, the sleep path can hang.Mounting the NTFS filesystem with the Linux in-kernel
ntfs3driver avoids the FUSE userspace daemon path.What changed
ntfs3as a valid Linux value for--filesystem.ntfs3.VolumeCreationOptions::FilesystemType::NTFSmapping, becausentfs3is a Linux mount driver for the NTFS filesystem, not a separate on-disk format.blkidand mount them withntfs3automatically. This applies to the Linux native dm-crypt path and to the fallback auxiliary-image mount path.ntfs3kernel module must be available and allowed by the distribution. Some distributions blacklist it by default and require administrator action before it can be loaded.--filesystem=ntfs3.Local validation
I reproduced the affected setup on openSUSE Tumbleweed with:
6.19.11-1-default259.5+suse1.26.24ntfs-3g:2022.10.3fuse3:3.18.2The affected NTFS VeraCrypt volume previously mounted as
fuseblkand hibernation could hang. I then opened the VeraCrypt volume without mounting its filesystem and mounted the virtual device with:findmntthen reported:With the VeraCrypt volume left mounted as
ntfs3, hibernation and resume completed successfully and the volume remained mounted after resume.Patched binary validation:
make NOGUI=1.make).veracrypt --text --helpincludes the newntfs3help text and example.--filesystem=ntfs3is accepted by the command-line parser.--filesystem=definitely-not-allowedis still rejected as an unknown option.Live patched-binary mount validation:
--filesystem=ntfs3.findmntreported the mounted filesystem asntfs3on/dev/mapper/veracrypt1.Favorite-volume validation:
MountNtfsWithNtfs3preference.--load-preferences --auto-mount favorites;findmntreportedntfs3.Favorites -> Mount Favorite Volumes;findmntreportedntfs3.ntfs3, hibernation and resume completed successfully and the volume remained mounted after resume.