LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2021, 06:28 AM   #1
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Rep: Reputation: 114Reputation: 114
Kernel 5.15 : ntfs3 vs ntfs-3g


Kernel 5.15 introduces the fully functional "ntfs3" driver. Earlier kernels only provided a read-only "ntfs" driver. Therefore most (all?) distributions provide the fuse-based fully functional "ntfs-3g" driver.
The problem with a fuse-based driver may be its performance. In many cases the ntfs-3g performance is acceptable, but e.g. I have a 240 Gb NTFS partition with many long directory/file names that grinds to a halt when copying the complete contents to an other NTFS partition. Copying that partition with the ntfs3 driver succeeds with a more than acceptable speed.

Assuming /dev/sda1 to be an NTFS partition and both drivers to be available the following commands can/should mount it:
Code:
(1) mount /dev/sda1 /mnt
(2) mount -tauto /dev/sda1 /mnt
(3) mount -tntfs /dev/sda1 /mnt
(4) mount -tntfs3 /dev/sda1 /mnt
(5) mount -tntfs-3g /dev/sda1 /mnt
Asis (4) selects the ntfs3 driver, the other commands all select the ntfs-3g driver.
Some research highlights the /sbin/mount.ntfs symlink to /sbin/mount.ntfs-3g mount helper. As a test I removed/renamed that symlink *): (1), (2) and (3) failed with a "mount: /mnt: unknown filesystem type 'ntfs'" message.
I then created the /sbin/mount.ntfs executable script reading:

Code:
#! /bin/sh

# mount.ntfs : catch {,-tauto,-tntfs} NTFS mounts
# ===============================================
# (c) DLCB 2/11-2021

exec mount -tntfs3 "$@"
and lo and behold: (1), (2) and (3) now select the ntfs3 driver.

*) Note that the ntfs-3g package cannot be removed as of yet because it also embeds the ntfsprogs such as mkntfs and ntfsresize.
 
Old 11-02-2021, 10:38 AM   #2
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 589

Rep: Reputation: Disabled
For the "auto" mount option, consider this part of the man page for "mount":

Code:
If no -t option is given, or if the auto type is specified, mount will try to guess the desired type.
Mount uses the blkid or volume_id library for guessing the filesystem type; if that does not turn up
anything that looks familiar, mount will try to read the file /etc/filesystems, or,
if that does not exist, /proc/filesystems.
All of the filesystem types listed there will be tried, except for those that are labeled "nodev"
(e.g., devpts, proc and nfs). If /etc/filesystems ends in a line with a single * only,
mount will read /proc/filesystems afterwards.

The auto type may be useful for user-mounted floppies.
Creating a file /etc/filesystems can be useful to change the probe order
(e.g., to try vfat before msdos or ext3 before ext2) or if you use a kernel module autoloader.
Warning: the probing uses a heuristic (the presence of appropriate 'magic'),
and could recognize the wrong filesystem type, possibly with catastrophic consequences.
If your data is valuable, don't ask mount to guess.
 
Old 11-02-2021, 02:38 PM   #3
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
For the last 20 years or so my Slackware initrd's use -tauto for the root filesystem -- such that I can run several clones that not necessarily use the same root filesystem. I never had problems with this setup. This feature e.g. came in handy with the transition from ext2 to ext3. Nowadays things are ext4.
For the last 15 years or so our/my live CD's use -tauto for all filesystems they "see" -- we never had problems with this. No user ever complained.

Last edited by burdi01; 11-03-2021 at 05:21 AM.
 
Old 11-04-2021, 02:53 PM   #4
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
Already using the ntfs3 driver in my daily workflow.
There is some performance improvement but not as much as was claimed.

Last edited by burdi01; 11-04-2021 at 02:57 PM.
 
Old 11-06-2021, 10:19 AM   #5
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
ntfs3 doesn't accept the option locale=pt_BR.utf-8
Code:
# mount /winxp/
mount: /winxp: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
I have this in fstab to mount ntfs partitions with ntfs-3g
Code:
UUID=6C90EEC690EE95BC /winxp ntfs-3g locale=pt_BR.utf-8,uid=1000,gid=100,umask=000,noauto 1 0
This works for ntfs3
Code:
UUID=6C90EEC690EE95BC /winxp ntfs3 uid=1000,gid=100,umask=000,noauto 1 0
 
Old 11-07-2021, 03:21 AM   #6
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
In the meantime I have "lost" an entire NTFS partition -- in the heat of the problem I forgot to keep GParted's error message.
Keeping an eye on things ...
 
Old 11-07-2021, 06:40 AM   #7
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I am scratching may head as for me diversity user/kernel space is a midst. But say Arch wiki tells ntfs-3g uses FUSE file system. So about this new ntfs3 kernel driver? They are really do the same job? Comparison which comes to mind is mount iso file system. Where is also fuseiso.
 
Old 11-07-2021, 06:44 AM   #8
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
Quote:
Originally Posted by burdi01 View Post
In the meantime I have "lost" an entire NTFS partition -- in the heat of the problem I forgot to keep GParted's error message.
Keeping an eye on things ...
I'm sorry burdi01. I hope you didn't lose anything important!
Did you lose the partition by using the new ntfs3 driver? Should we still using ntfs-3g?
I mounted two ntfs partitions yesterday with ntfs3 and did write/read on them without problems.

It seems that the lack of locale option doesn't prevent ntfs3 to write and read
special characters in pt_BR like ç and ã.

Also, it seems that ntfs3 writes ntfs permissions, before it was rwx for all.
I didn't boot Windows 10 to see how permissions are over there.
Code:
ls -l /seagate2t/HP-Printer-Diagnostics_v14.pdf 
-rwxrwxrwx 1 paulo users 1873150 fev  7  2019 /seagate2t/HP-Printer-Diagnostics_v14.pdf
ls -l /seagate2t/IMG_3254.JPG 
-rw------- 1 paulo users 369428 nov  6 14:43 /seagate2t/IMG_3254.JPG
 
Old 11-07-2021, 10:21 AM   #9
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by igadoter View Post
I am scratching may head as for me diversity user/kernel space is a midst. But say Arch wiki tells ntfs-3g uses FUSE file system. So about this new ntfs3 kernel driver? They are really do the same job? Comparison which comes to mind is mount iso file system. Where is also fuseiso.
Paragon Software (the authors of the ntfs3 kernel module) advertized their kernel module as a fully functional ntfs driver, thus doing the same job (but faster) as the ntfs-3g fuse driver. My test results would confirm this.
Note however that the ntfs-3g *package* embeds the ntfsprogs such as mkntfs and ntfsresize and therefore cannot be removed.
 
1 members found this post helpful.
Old 11-07-2021, 10:32 AM   #10
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by Paulo2 View Post
I'm sorry burdi01. I hope you didn't lose anything important!
Did you lose the partition by using the new ntfs3 driver? Should we still using ntfs-3g?
I mounted two ntfs partitions yesterday with ntfs3 and did write/read on them without problems.
The "lost" ntfs partition is my secundary backup. I could restore it from my primary backup -- which took about 15 minutes for the 175 GB.
Whether or not the new ntfs3 driver was the culprit I do not know. For the time being I keep using that ntfs3 driver.
For the permissions you should read the documentation. For instance my fstab line for that secundary backup reads:
Code:
/dev/sdxd5  /J  ntfs3  noauto,relatime,uid=root,gid=vfat,dmask=002,fmask=113  0 0

Last edited by burdi01; 11-07-2021 at 10:42 AM.
 
1 members found this post helpful.
Old 11-07-2021, 12:02 PM   #11
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,094

Rep: Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271Reputation: 7271
From my "in use" fstab,
Quote:
/dev/sdb1 /z-winXp3 ntfs fmask=111,dmask=000 1 0
From an old backup file,
Quote:
/dev/sdb1 /z-winXp3 ntfs-3g fmask=111,dmask=000 1 0
The "in use" fstab file was created about 3 weeks ago during an fresh installation of -current. Shouldn't it read, ntfs-3g ? If not, why not? A third question would be, should the "in use" fstab file be edited to read, ntfs3 ?

Last edited by cwizardone; 11-07-2021 at 12:08 PM.
 
Old 11-07-2021, 05:01 PM   #12
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
Quote:
Originally Posted by cwizardone View Post
From my "in use" fstab,


From an old backup file,


The "in use" fstab file was created about 3 weeks ago during an fresh installation of -current. Shouldn't it read, ntfs-3g ? If not, why not? A third question would be, should the "in use" fstab file be edited to read, ntfs3 ?
Like burdi01 said in the OP, I think ntfs and ntfs-3g are the same.
My fstab now is edited with ntfs3 instead ntfs-3g.

"mount" shows ntfs partition mounted with ntfs-3g (or ntfs) as type fuseblk,
and partitions mounted with ntfs3 as type ntfs3.

Code:
mount
<snip>
/dev/sdc1 on /seagate2t type ntfs3 (rw,uid=1000,gid=100,umask=000)
/dev/sdb3 on /win10 type ntfs3 (rw,uid=1000,gid=100,umask=000)
/dev/sdb1 on /winxp type fuseblk (rw,allow_other,blksize=4096)
 
1 members found this post helpful.
Old 11-08-2021, 11:27 AM   #13
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
Quote:
Like burdi01 said in the OP, I think ntfs and ntfs-3g are the same.
No guys: The ntfs-3g *package* "symlinks" a "mount -tntfs" to the ntfs-3g driver.
My proposed solution replaces that "symlink" with an invocation of "mount -tntfs3".

Last edited by burdi01; 11-08-2021 at 11:33 AM.
 
1 members found this post helpful.
Old 11-09-2021, 11:19 AM   #14
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
In addition to my "lost" partition (see post #6) my ext4 (!) live CD maintenance partition suddenly "creates" spectacularly failing ISOs. It might be that the partition's contents (or my tooling) is corrupted.
For me this is the last straw that breaks the camel's back ...
I do not "trust" my systems any more. So I am restoring my last backup before kernel 5.15/ntfs3 right now -- which means reapplying three weeks of amendments. For the time being I will then stay with ntfs-3g ...

Last edited by burdi01; 11-09-2021 at 04:49 PM.
 
Old 11-09-2021, 02:51 PM   #15
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,445
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by burdi01 View Post
Paragon Software (the authors of the ntfs3 kernel module) advertized their kernel module as a fully functional ntfs driver, thus doing the same job (but faster) as the ntfs-3g fuse driver. My test results would confirm this.
Speed is a secondary consideration here. Paragon's driver was developed under Windows by people who write software that performs low level disk operations, such as moving and resizing partitions. I've used their software many times to do such things under Windows with great success.

The ntfs-3g fuse driver, while usable, is far from great IME. On more than one occasion it has created "ghost" files for me which were difficult to remove.

I'm happy to finally have proper kernel level NTFS support... Something Linux has never had.

Last edited by rkelsen; 11-09-2021 at 07:08 PM.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Paragon’s NTFS3 Driver is About to Become A Part of the Linux Kernel LXer Syndicated Linux News 0 08-06-2021 09:33 PM
Copy files from NTFS to NTFS ThaHackBoy Linux - Hardware 2 05-21-2005 06:36 PM
Writing to an NTFS volume using captive-ntfs (repairing boot.ini) macskeeball Linux - General 3 02-06-2005 09:28 PM
NTFS (winxp) drive is accessible only by root, why NTFS (winxp) drive not accessible Samppa72 Linux - Software 1 07-26-2004 03:13 PM
Captive NTFS -- full r/w ntfs access for Linux spurious Linux - Software 6 01-09-2004 12:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration