Package Details: ntfs3-dkms 27.0.0-1

Git Clone URL: https://aur.archlinux.org/ntfs3-dkms.git (read-only, click to copy)
Package Base: ntfs3-dkms
Description: NTFS read-write driver GPL implementation by Paragon Software. Current version works with NTFS (including v3.1), normal/compressed/sparse files and supports journal replaying.
Upstream URL: https://www.paragon-software.com/home/ntfs3-driver-faq/
Licenses: GPL2
Submitter: rdnvndr
Maintainer: rdnvndr (Hanabishi)
Last Packager: Hanabishi
Votes: 30
Popularity: 3.13
First Submitted: 2020-08-16 11:43
Last Updated: 2021-07-30 15:09

Pinned Comments

Hanabishi commented on 2021-06-28 13:33

How to use DKMS modules: https://wiki.archlinux.org/title/Dynamic_Kernel_Module_Support

NTFS3 FAQ: https://www.paragon-software.com/home/ntfs3-driver-faq/

Readme

=====
NTFS3
=====


Summary and Features
====================

NTFS3 is fully functional NTFS Read-Write driver. The driver works with
NTFS versions up to 3.1, normal/compressed/sparse files
and journal replaying. File system type to use on mount is 'ntfs3'.

- This driver implements NTFS read/write support for normal, sparse and
  compressed files.
- Supports native journal replaying;
- Supports extended attributes
    Predefined extended attributes:
    - 'system.ntfs_security' gets/sets security
            descriptor (SECURITY_DESCRIPTOR_RELATIVE)
    - 'system.ntfs_attrib' gets/sets ntfs file/dir attributes.
        Note: applied to empty files, this allows to switch type between
        sparse(0x200), compressed(0x800) and normal;
- Supports NFS export of mounted NTFS volumes.

Mount Options
=============

The list below describes mount options supported by NTFS3 driver in addition to
generic ones.

===============================================================================

nls=name        This option informs the driver how to interpret path
            strings and translate them to Unicode and back. If
            this option is not set, the default codepage will be
            used (CONFIG_NLS_DEFAULT).
            Examples:
                'nls=utf8'

uid=
gid=
umask=          Controls the default permissions for files/directories created
            after the NTFS volume is mounted.

fmask=
dmask=          Instead of specifying umask which applies both to
            files and directories, fmask applies only to files and
            dmask only to directories.

nohidden        Files with the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN)
            attribute will not be shown under Linux.

sys_immutable       Files with the Windows-specific SYSTEM
            (FILE_ATTRIBUTE_SYSTEM) attribute will be marked as system
            immutable files.

discard         Enable support of the TRIM command for improved performance
            on delete operations, which is recommended for use with the
            solid-state drives (SSD).

force           Forces the driver to mount partitions even if 'dirty' flag
            (volume dirty) is set. Not recommended for use.

sparse          Create new files as "sparse".

showmeta        Use this parameter to show all meta-files (System Files) on
            a mounted NTFS partition.
            By default, all meta-files are hidden.

prealloc        Preallocate space for files excessively when file size is
            increasing on writes. Decreases fragmentation in case of
            parallel write operations to different files.

no_acs_rules        "No access rules" mount option sets access rights for
            files/folders to 777 and owner/group to root. This mount
            option absorbs all other permissions:
            - permissions change for files/folders will be reported
                as successful, but they will remain 777;
            - owner/group change will be reported as successful, but
                they will stay as root

acl         Support POSIX ACLs (Access Control Lists). Effective if
            supported by Kernel. Not to be confused with NTFS ACLs.
            The option specified as acl enables support for POSIX ACLs.

noatime         All files and directories will not update their last access
            time attribute if a partition is mounted with this parameter.
            This option can speed up file system operation.

===============================================================================

ToDo list
=========

- Full journaling support (currently journal replaying is supported) over JBD.


References
==========
https://www.paragon-software.com/home/ntfs-linux-professional/
    - Commercial version of the NTFS driver for Linux.

almaz.alexandrovich@paragon-software.com
    - Direct e-mail address for feedback and requests on the NTFS3 implementation.

Changelog

v2:
 - patch splitted to chunks (file-wise)
 - build issues fixed
 - sparse and checkpatch.pl errors fixed
 - NULL pointer dereference on mkfs.ntfs-formatted volume mount fixed
 - cosmetics + code cleanup

v3:
 - added acl, noatime, no_acs_rules, prealloc mount options
 - added fiemap support
 - fixed encodings support
 - removed typedefs
 - adapted Kernel-way logging mechanisms
 - fixed typos and corner-case issues

v4:
 - atomic_open() refactored
 - code style updated
 - bugfixes

v5:
- nls/nls_alt mount options added
- Unicode conversion fixes
- Improved very fragmented files operations
- logging cosmetics

v6:
- Security Descriptors processing changed
  added system.ntfs_security xattr to set
  SD
- atomic_open() optimized
- cosmetics

v7:
- Security Descriptors validity checks added (by Mark Harmstone)
- atomic_open() fixed for the compressed file creation with directio
  case
- remount support
- temporarily removed readahead usage
- cosmetics

v8:
- Compressed files operations fixed

v9:
- Further cosmetics applied as suggested
by Joe Perches

v10:
- operations with compressed/sparse files on very fragmented volumes improved
- reduced memory consumption for above cases

v11:
- further compressed files optimizations: reads/writes are now skipping bufferization
- journal wipe to the initial state optimized (bufferization is also skipped)
- optimized run storage (re-packing cluster metainformation)
- fixes based on Matthew Wilcox feedback to the v10
- compressed/sparse/normal could be set for empty files with 'system.ntfs_attrib' xattr

v12:
- nls_alt mount option removed after discussion with Pali Rohar
- fixed ni_repack()
- fixed resident files transition to non-resident when size increasing

v13:
- nested_lock fix (lockdep)
- out-of-bounds read fix (KASAN warning)
- resident->nonresident transition fixed for compressed files
- load_nls() missed fix applied
- some sparse utility warnings fixes

v14:
- support for additional compression types (we've adapted WIMLIB's
  implementation, authored by Eric Biggers, into ntfs3)

v15:
- kernel test robot warnings fixed
- lzx/xpress compression license headers updated

v16:
- lzx/xpress moved to initial ntfs-3g plugin code
- mutexes instead of a global spinlock for compresions
- FALLOC_FL_PUNCH_HOLE and FALLOC_FL_COLLAPSE_RANGE implemented
- CONFIG_NTFS3_FS_POSIX_ACL added

v17:
- FALLOC_FL_COLLAPSE_RANGE fixed
- fixes for Mattew Wilcox's and Andy Lavr's concerns

v18:
- ntfs_alloc macro splitted into two ntfs_malloc + ntfs_zalloc
- attrlist.c: always use ntfs_cmp_names instead of memcmp; compare entry names
  only for entry with vcn == 0
- dir.c: remove unconditional ni_lock in ntfs_readdir
- fslog.c: corrected error case behavior
- index.c: refactored due to modification of ntfs_cmp_names; use rw_semaphore
  for read/write access to alloc_run and bitmap_run while ntfs_readdir
- run.c: separated big/little endian code in functions
- upcase.c: improved ntfs_cmp_names, thanks to Kari Argillander for idea
  and 'bothcase' implementation

v19:
- fixed directory bitmap for 2MB cluster size
- fixed rw_semaphore init for directories

v20:
- fixed issue with incorrect hidden/system attribute setting on
  root subdirectories
- use kvmalloc instead of kmalloc for runs array
- fixed index behavior on volumes with cluster size more than 4k
- current build info is added into module info instead of printing on insmod

v21:
- fixes for clang CFI checks
- fixed sb->s_maxbytes for 32bit clusters
- user.DOSATTRIB is no more intercepted by ntfs3
- corrected xattr limits;  is used
- corrected CONFIG_NTFS3_64BIT_CLUSTER usage
- info about current build is added into module info and printing
on insmod (by Andy Lavr's request)
note: v21 is applicable for 'linux-next' not older than 2021.01.28

v22:
- ntfs_cmp_names() fixed
- raise warning if 'nls->uni2char' fails
- hot fix free clusters code optimized
- use clang-format 11.0 instead of 10.0 to format code

v23:
- corrections for Kernel Test Robot warnings
- kmem_cache_create() utilized to allocate memory in bitmap.c
- cosmetics and comments thru the code

v24:
- BIO_MAX_PAGES -> BIO_MAX_VECS (fix for build issue of v23 vs linux-next)
- minor optimization for LogFile: do not fill it with -1, if it's already there
- index.c: removed 'inline' in definition of hdr_find_split() and hdr_insert_head()

v25:
- restore fs/Makefile in patch
- refactor ntfs_create_inode() to use error-valued pointer
- use mi_get_ref to fill MFT_REF
- minimize checkpatch.pl warnings: replace LogFile with \x24LogFile when printing

v26:
- fixed coccinelle warnings
- fslog.c: fix memory leak and memory overwrite

v27:
- iov_iter_copy_from_user_atomic() replaced by copy_page_from_iter_atomic()
and  iov_iter_advance() removed

doug commented on 2020-09-09 07:24

I made some test using bonnie and pts, this driver seems to be much faster than ntfs-3g

http://moodle.math.sk/~doug/bonnie_ntfs3_paragon.html

http://moodle.math.sk/~doug/bonnie_ntfs-3g.html

(disregard the read tests, since they were done from page cache)

edit: compilebench in pts, now includes native ext4, the paragon ntfs3 driver performance is comparable

https://openbenchmarking.org/result/2009092-NE-NTFSCOMPA56

Hanabishi commented on 2020-08-31 21:51

WARNING! This driver still in early development state. Using on partitions with important data is not recommended.

Requires explicit fs type to mount (-t ntfs3).
If you want to use ntfs3 as the default driver, such udev rule does the trick:

SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs3"

Performance tips:
noatime option can speed up filesystem operations.
prealloc option reduces disk fragmentation (useful for HDD).

Another hint for udisks. Add a such options to /etc/udisks2/mount_options.conf in [defaults] section:

ntfs3_defaults=uid=$UID,gid=$GID,noatime,prealloc
ntfs3_allow=uid=$UID,gid=$GID,umask,dmask,fmask,nls,nohidden,sys_immutable,discard,force,sparse,showmeta,prealloc,no_acs_rules,acl

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 ... Next › Last »

yanpas commented on 2021-07-24 14:20

Slow boot

I use this driver in fstab:

    /dev/disk/by-uuid/XXXXXXXXXXX /home/me/.D/ ntfs3 rw,users,uid=me,gid=me,dmask=027,fmask=137,nofail 0 0

For some reason the system has started booting much slower (fsck is disabled according to fstab). Does anyone know the reason? dmesg log:

[    3.526953] usbcore: registered new interface driver usbhid
[    3.526954] usbhid: USB HID core driver
[    3.550022] ntfs3: module verification failed: signature and/or required key missing - tainting kernel
[    3.607304] mousedev: PS/2 mouse device common for all mice
[    3.609199] ntfs3: Index binary search
[    3.609200] ntfs3: Hot fix free clusters
[    3.609200] ntfs3: Max link count 1024
[    3.609201] ntfs3: Enabled Linux POSIX ACLs support
[    3.609201] ntfs3: Activated 32 bits per cluster
[    3.609202] ntfs3: Read-only lzx/xpress compression included
[    3.856553] nvidia: module license 'NVIDIA' taints kernel.

Hanabishi commented on 2021-06-28 13:33

How to use DKMS modules: https://wiki.archlinux.org/title/Dynamic_Kernel_Module_Support

NTFS3 FAQ: https://www.paragon-software.com/home/ntfs3-driver-faq/

Readme

=====
NTFS3
=====


Summary and Features
====================

NTFS3 is fully functional NTFS Read-Write driver. The driver works with
NTFS versions up to 3.1, normal/compressed/sparse files
and journal replaying. File system type to use on mount is 'ntfs3'.

- This driver implements NTFS read/write support for normal, sparse and
  compressed files.
- Supports native journal replaying;
- Supports extended attributes
    Predefined extended attributes:
    - 'system.ntfs_security' gets/sets security
            descriptor (SECURITY_DESCRIPTOR_RELATIVE)
    - 'system.ntfs_attrib' gets/sets ntfs file/dir attributes.
        Note: applied to empty files, this allows to switch type between
        sparse(0x200), compressed(0x800) and normal;
- Supports NFS export of mounted NTFS volumes.

Mount Options
=============

The list below describes mount options supported by NTFS3 driver in addition to
generic ones.

===============================================================================

nls=name        This option informs the driver how to interpret path
            strings and translate them to Unicode and back. If
            this option is not set, the default codepage will be
            used (CONFIG_NLS_DEFAULT).
            Examples:
                'nls=utf8'

uid=
gid=
umask=          Controls the default permissions for files/directories created
            after the NTFS volume is mounted.

fmask=
dmask=          Instead of specifying umask which applies both to
            files and directories, fmask applies only to files and
            dmask only to directories.

nohidden        Files with the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN)
            attribute will not be shown under Linux.

sys_immutable       Files with the Windows-specific SYSTEM
            (FILE_ATTRIBUTE_SYSTEM) attribute will be marked as system
            immutable files.

discard         Enable support of the TRIM command for improved performance
            on delete operations, which is recommended for use with the
            solid-state drives (SSD).

force           Forces the driver to mount partitions even if 'dirty' flag
            (volume dirty) is set. Not recommended for use.

sparse          Create new files as "sparse".

showmeta        Use this parameter to show all meta-files (System Files) on
            a mounted NTFS partition.
            By default, all meta-files are hidden.

prealloc        Preallocate space for files excessively when file size is
            increasing on writes. Decreases fragmentation in case of
            parallel write operations to different files.

no_acs_rules        "No access rules" mount option sets access rights for
            files/folders to 777 and owner/group to root. This mount
            option absorbs all other permissions:
            - permissions change for files/folders will be reported
                as successful, but they will remain 777;
            - owner/group change will be reported as successful, but
                they will stay as root

acl         Support POSIX ACLs (Access Control Lists). Effective if
            supported by Kernel. Not to be confused with NTFS ACLs.
            The option specified as acl enables support for POSIX ACLs.

noatime         All files and directories will not update their last access
            time attribute if a partition is mounted with this parameter.
            This option can speed up file system operation.

===============================================================================

ToDo list
=========

- Full journaling support (currently journal replaying is supported) over JBD.


References
==========
https://www.paragon-software.com/home/ntfs-linux-professional/
    - Commercial version of the NTFS driver for Linux.

almaz.alexandrovich@paragon-software.com
    - Direct e-mail address for feedback and requests on the NTFS3 implementation.

Changelog

v2:
 - patch splitted to chunks (file-wise)
 - build issues fixed
 - sparse and checkpatch.pl errors fixed
 - NULL pointer dereference on mkfs.ntfs-formatted volume mount fixed
 - cosmetics + code cleanup

v3:
 - added acl, noatime, no_acs_rules, prealloc mount options
 - added fiemap support
 - fixed encodings support
 - removed typedefs
 - adapted Kernel-way logging mechanisms
 - fixed typos and corner-case issues

v4:
 - atomic_open() refactored
 - code style updated
 - bugfixes

v5:
- nls/nls_alt mount options added
- Unicode conversion fixes
- Improved very fragmented files operations
- logging cosmetics

v6:
- Security Descriptors processing changed
  added system.ntfs_security xattr to set
  SD
- atomic_open() optimized
- cosmetics

v7:
- Security Descriptors validity checks added (by Mark Harmstone)
- atomic_open() fixed for the compressed file creation with directio
  case
- remount support
- temporarily removed readahead usage
- cosmetics

v8:
- Compressed files operations fixed

v9:
- Further cosmetics applied as suggested
by Joe Perches

v10:
- operations with compressed/sparse files on very fragmented volumes improved
- reduced memory consumption for above cases

v11:
- further compressed files optimizations: reads/writes are now skipping bufferization
- journal wipe to the initial state optimized (bufferization is also skipped)
- optimized run storage (re-packing cluster metainformation)
- fixes based on Matthew Wilcox feedback to the v10
- compressed/sparse/normal could be set for empty files with 'system.ntfs_attrib' xattr

v12:
- nls_alt mount option removed after discussion with Pali Rohar
- fixed ni_repack()
- fixed resident files transition to non-resident when size increasing

v13:
- nested_lock fix (lockdep)
- out-of-bounds read fix (KASAN warning)
- resident->nonresident transition fixed for compressed files
- load_nls() missed fix applied
- some sparse utility warnings fixes

v14:
- support for additional compression types (we've adapted WIMLIB's
  implementation, authored by Eric Biggers, into ntfs3)

v15:
- kernel test robot warnings fixed
- lzx/xpress compression license headers updated

v16:
- lzx/xpress moved to initial ntfs-3g plugin code
- mutexes instead of a global spinlock for compresions
- FALLOC_FL_PUNCH_HOLE and FALLOC_FL_COLLAPSE_RANGE implemented
- CONFIG_NTFS3_FS_POSIX_ACL added

v17:
- FALLOC_FL_COLLAPSE_RANGE fixed
- fixes for Mattew Wilcox's and Andy Lavr's concerns

v18:
- ntfs_alloc macro splitted into two ntfs_malloc + ntfs_zalloc
- attrlist.c: always use ntfs_cmp_names instead of memcmp; compare entry names
  only for entry with vcn == 0
- dir.c: remove unconditional ni_lock in ntfs_readdir
- fslog.c: corrected error case behavior
- index.c: refactored due to modification of ntfs_cmp_names; use rw_semaphore
  for read/write access to alloc_run and bitmap_run while ntfs_readdir
- run.c: separated big/little endian code in functions
- upcase.c: improved ntfs_cmp_names, thanks to Kari Argillander for idea
  and 'bothcase' implementation

v19:
- fixed directory bitmap for 2MB cluster size
- fixed rw_semaphore init for directories

v20:
- fixed issue with incorrect hidden/system attribute setting on
  root subdirectories
- use kvmalloc instead of kmalloc for runs array
- fixed index behavior on volumes with cluster size more than 4k
- current build info is added into module info instead of printing on insmod

v21:
- fixes for clang CFI checks
- fixed sb->s_maxbytes for 32bit clusters
- user.DOSATTRIB is no more intercepted by ntfs3
- corrected xattr limits;  is used
- corrected CONFIG_NTFS3_64BIT_CLUSTER usage
- info about current build is added into module info and printing
on insmod (by Andy Lavr's request)
note: v21 is applicable for 'linux-next' not older than 2021.01.28

v22:
- ntfs_cmp_names() fixed
- raise warning if 'nls->uni2char' fails
- hot fix free clusters code optimized
- use clang-format 11.0 instead of 10.0 to format code

v23:
- corrections for Kernel Test Robot warnings
- kmem_cache_create() utilized to allocate memory in bitmap.c
- cosmetics and comments thru the code

v24:
- BIO_MAX_PAGES -> BIO_MAX_VECS (fix for build issue of v23 vs linux-next)
- minor optimization for LogFile: do not fill it with -1, if it's already there
- index.c: removed 'inline' in definition of hdr_find_split() and hdr_insert_head()

v25:
- restore fs/Makefile in patch
- refactor ntfs_create_inode() to use error-valued pointer
- use mi_get_ref to fill MFT_REF
- minimize checkpatch.pl warnings: replace LogFile with \x24LogFile when printing

v26:
- fixed coccinelle warnings
- fslog.c: fix memory leak and memory overwrite

v27:
- iov_iter_copy_from_user_atomic() replaced by copy_page_from_iter_atomic()
and  iov_iter_advance() removed

lignix commented on 2021-06-28 13:09

@Hanabishi Thanks.

Hanabishi commented on 2021-06-28 13:07

@lignix, the answer is directly in your logs: Missing kernel headers. You should install the kernel headers (e.g. linux-headers package).
Read how to use DKMS modules: https://wiki.archlinux.org/title/Dynamic_Kernel_Module_Support

lignix commented on 2021-06-28 13:03

Hi my kernel version 5.12.10-arch1-1

compilation gives error:

==> fakeroot ortamından çıkılıyor.
==> ntfs3-dkms 26.0.0-4 (Pzt 28 Haz 2021 15:22:24) paketinin derlenmesi tamamlandı
==> Temizleniyor...
paketler yükleniyor...
paket bağımlılıkları çözümleniyor...
varsa paketler arası çakışmalara bakılıyor...

Paketler (1) ntfs3-dkms-26.0.0-4

Toplam Kurulum Boyutu:  0,70 MiB

:: Kuruluma onay veriyor musunuz? [E/h] 
(1/1) anahtarlıktaki anahtarlar kontrol ediliyor                                                           [###############################################################] 100%
(1/1) paket bütünlüğü kontrol ediliyor                                                                     [###############################################################] 100%
(1/1) paket dosyaları yükleniyor                                                                           [###############################################################] 100%
(1/1) dosya çakışmaları kontrol ediliyor                                                                   [###############################################################] 100%
(1/1) disk alanı kontrol ediliyor                                                                          [###############################################################] 100%
:: Paket değişiklikleri işleniyor...
(1/1) yükleniyor ntfs3-dkms                                                                                [###############################################################] 100%
:: Bağlantılı işlemler listesi çalışıyor...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> Unable to install module ntfs3/26.0.0 for kernel *: Missing kernel headers.

what is the problem?

ricky26 commented on 2021-06-16 14:05

@Hanabishi I should've mentioned that I have symlinked compatdata out of the NTFS partition (I don't think compatdata was causing issues in itself). It seems to happen when Steam updates games (I get the impression Steam hits the FS pretty hard).

Hanabishi commented on 2021-06-12 11:08

It can read files with NTFS compression (even new methods from Win10). But what about write - can't say how to do that in linux. There is sparse mount flag, but I don't know how it works.
Btw du util only shows an actual file size without compression. And there is no such util for NTFS like compsize for BTRFS.

babam commented on 2021-06-12 08:26

Ntfs3 doesn't support sparse files?

$ truncate -s 512M file.img

NTFS3:

$ du -h file.img

512M file.img

EXT4:

$ du -h file.img

0 file.img

jason.houston commented on 2021-06-02 19:11

Doh, neglected to clean my cache directory... building fine now, thanks!

jpegxguy commented on 2021-06-02 18:40

@jason.houston try cleaning the aur clone directory. For example with paru you would do it like so paru -Sc