Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-03-10 17:08:43

calciboi
Member
Registered: 2022-03-10
Posts: 6

How to make thunar mount External HDD using ntfs3 driver?

Right now it uses ntfs-3g driver to mount them, I want to use ntfs3 driver instead

Offline

#2 2022-03-10 21:12:18

MintJulep
Member
Registered: 2022-02-25
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

create a *.rules file in /etc/udev/rules.d/ for example /etc/udev/rules.d/my.rules with following content:

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

reboot
connect ntfs drive and check with

mount -l | grep ntfs3

in the Terminal (shows which disks are using the driver).

Your kernel version should be 5.15 or newer (5.15.2 or newer on manjaro)

Offline

#3 2022-03-11 04:41:39

calciboi
Member
Registered: 2022-03-10
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

MintJulep wrote:

create a *.rules file in /etc/udev/rules.d/ for example /etc/udev/rules.d/my.rules with following content:

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

reboot
connect ntfs drive and check with

mount -l | grep ntfs3

in the Terminal (shows which disks are using the driver).

Your kernel version should be 5.15 or newer (5.15.2 or newer on manjaro)

I tried this and it still loads it via ntsf-3g, *shows fuseblk in mount command). If I uninstall ntfs-3g and try to mount it via thunar it just shows unknown filesystem ntfs or some error like that

Offline

#4 2022-03-11 06:03:32

MintJulep
Member
Registered: 2022-02-25
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

What's your system and kernel version? I tried myself on my laptop, it works:

[ ~]$ mount -l | grep ntfs3
/dev/sdb1 on /run/media/xxxx/23AAD911501D3059 type ntfs3 (rw,nosuid,nodev,relatime,uid=0,gid=0,iocharset=utf8,uhelper=udisks2)

check the file /proc/modules for a line like
ntfs3 270336 1 - Live 0x0000000000000000

or use
lsmod
and check the output for ntfs3

or check if
modinfo ntfs3
can find it

Maybe the driver just isn't present on your system

And show output of
uname -r

Last edited by MintJulep (2022-03-11 06:39:55)

Offline

#5 2022-03-11 07:58:38

calciboi
Member
Registered: 2022-03-10
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

@MintJulep

Running archlinux, kernel 5.17.0-rc7-1-mainline

Just to clarify, the ntfs3 driver is working properly, i use it to mount my windows partition via fstab and it works fine, its just when i try to plug in my external hdd and mount it via thunar, it defaults back to ntfs-3g driver to mount it. If i uninstall it, it shows some error.

This is what it mounts it as

/dev/sda1 on /run/media/sepia/Games, Books type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2) [Games, Books]

Offline

#6 2022-03-11 08:13:57

MintJulep
Member
Registered: 2022-02-25
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

Ok, that makes things complicated beyond my knowledge.

It works for me with XFCE Thunar to mount an USB NTFS drive with ntfs3, so it should be possible for you too.
I run EndeavourOS with 5.16.13-arch1-1 kernel.
Maybe you could try a different kernel version to narrow it down a little.
Otherwise your best chance to solve this is imho the Arch Linux Forum.

Sorry, good luck!

Offline

#7 2022-03-11 11:25:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How to make thunar mount External HDD using ntfs3 driver?

Perhaps these might be helpful:
- https://gitlab.gnome.org/GNOME/glib/-/issues/2195
- https://github.com/storaged-project/udisks/issues/932

In the second link, there is a suggestion around creating/editing a /etc/udisks2/mount_options.conf file that the individual had success with.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2022-03-11 15:56:36

MintJulep
Member
Registered: 2022-02-25
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

I just found another set of instructions for  /etc/udisks2/mount_options.conf on a german website



To have ntfs3 used automatically, create "/etc/udev/rules.d/99-ntfs3.rules":

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

Apply this with "udevadm control -R" (or reboot).

For special mount options, create/edit "/etc/udisks2/mount_options.conf":

[defaults]

defaults=noatime
allow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,relatime,strictatime,lazytime,ro,rw,sync,dirsync,noload,acl,nosymfollow

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

btrfs_defaults=compress-force=zstd
btrfs_allow=compress,compress-force,datacow,nodatacow,datasum,nodatasum,autodefrag,noautodefrag,degraded,device,discard,nodiscard,subvol,subvolid,space_cache

"noatime" I set as default, because in my opinion atime only brakes/writes uselessly.

"noacsrules" causes no special permissions to be used, so there are no access problems if another user has created something, for example.

"discard" for SSDs (ignored for other drives): online discard, because ntfs3 still (kernel 5.16.3) does not support fstrim and therefore cannot be trimmed regularly (by cronjob, systemd-timer).

Important: If you delete something from an ext. SSD e.g. with another device that does not use an online discard (in my case a sat receiver), the area occupied by it is not released. Therefore I delete only on the PC.

Alternatively you can mount them manually with ntfs-3g for trimming and use fstrim. - Or trim them with wiper.sh (from hdparm): This also works without ntfs-3g, but is more cumbersome.

I use btrfs at most because of file compression and then with "compress-force=zstd", because by default it only tests if the beginning of the file compresses well and saves it uncompressed, if not: This is way too inefficient.

Translated with www.DeepL.com/Translator (free version)

Offline

#9 2022-03-11 19:09:26

calciboi
Member
Registered: 2022-03-10
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

MintJulep wrote:

I just found another set of instructions for  /etc/udisks2/mount_options.conf on a german website



To have ntfs3 used automatically, create "/etc/udev/rules.d/99-ntfs3.rules":

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

Apply this with "udevadm control -R" (or reboot).

For special mount options, create/edit "/etc/udisks2/mount_options.conf":

[defaults]

defaults=noatime
allow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,relatime,strictatime,lazytime,ro,rw,sync,dirsync,noload,acl,nosymfollow

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

btrfs_defaults=compress-force=zstd
btrfs_allow=compress,compress-force,datacow,nodatacow,datasum,nodatasum,autodefrag,noautodefrag,degraded,device,discard,nodiscard,subvol,subvolid,space_cache

"noatime" I set as default, because in my opinion atime only brakes/writes uselessly.

"noacsrules" causes no special permissions to be used, so there are no access problems if another user has created something, for example.

"discard" for SSDs (ignored for other drives): online discard, because ntfs3 still (kernel 5.16.3) does not support fstrim and therefore cannot be trimmed regularly (by cronjob, systemd-timer).

Important: If you delete something from an ext. SSD e.g. with another device that does not use an online discard (in my case a sat receiver), the area occupied by it is not released. Therefore I delete only on the PC.

Alternatively you can mount them manually with ntfs-3g for trimming and use fstrim. - Or trim them with wiper.sh (from hdparm): This also works without ntfs-3g, but is more cumbersome.

I use btrfs at most because of file compression and then with "compress-force=zstd", because by default it only tests if the beginning of the file compresses well and saves it uncompressed, if not: This is way too inefficient.

Translated with www.DeepL.com/Translator (free version)

Working now, thanks!

Offline

#10 2022-03-11 19:10:29

calciboi
Member
Registered: 2022-03-10
Posts: 6

Re: How to make thunar mount External HDD using ntfs3 driver?

ToZ wrote:

Perhaps these might be helpful:
- https://gitlab.gnome.org/GNOME/glib/-/issues/2195
- https://github.com/storaged-project/udisks/issues/932

In the second link, there is a suggestion around creating/editing a /etc/udisks2/mount_options.conf file that the individual had success with.

Found it very helpful, thanks for the links. It's working now!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 590.19 KiB (Peak: 607.47 KiB) ]