You are not logged in.

#1 2012-10-26 13:57:31

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

[SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Hi.

I've recently switched to systemd (thanks for this great Wiki page!). All is right except automount of NFTS partions. In old config, I don't have any entry in fstab, but there is a rule for udev:

 KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
#ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,uid=fran,umask=000"

# Mount the device
#ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -t ntfs-3g -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

 

I think this rule should work with systemd. It seems to work, because:

[root@HermesT rules.d]# systemctl list-units | grep 'media'
media-Almacen.mount                                                                                   loaded active mounted       /media/Almacen
media-COMPAQ.mount                                                                                    loaded active mounted       /media/COMPAQ
media-SYSTEM.mount                                                                                    loaded active mounted       /media/SYSTEM

But:

[root@HermesT media]# ls
ls: cannot access COMPAQ: Transport endpoint is not connected
ls: cannot access Almacen: Transport endpoint is not connected
ls: cannot access SYSTEM: Transport endpoint is not connected
Almacen  COMPAQ  MIO  SYSTEM  almacen  hdusb  usbhd-sda3  usbhd-sda4  usbhd-sdb1  usbhd-sdb2  usbhd-sdb5  usbhd-sdb6  usbhd-sdc1  usbhd-sdc2  usbhd-sdc5  usbhd-sdc6


¿some ideas?

Thanks.

Last edited by HermesT (2012-10-27 20:20:41)

Offline

#2 2012-10-26 14:27:11

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Hi guys.

Don't care about this, for the moment.

I deleted rule in udev and now it seems to work ¿¡!?

Last edited by HermesT (2012-10-26 15:21:46)

Offline

#3 2012-10-26 14:58:06

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Udev will (when running with systemd) kill all processes that are left after it finished processing the rules - in particular, the ntfs-3g user process. There are probably better ways to handle this problem.

Offline

#4 2012-10-26 15:00:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

I have read numerous times that mounting with udev alone is strongly discouraged.

Offline

#5 2012-10-26 15:56:42

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Ok, thanks for these quick responses.

Now (without explicit udev rule and with the proper PolicyKit rule as can be seen in https://wiki.archlinux.org/index.php/Ud … rmal_user)  all is Ok except non ASCII filenames.

I can write to NTFS, but only for ASCII filenames.

For existing files,  I see:

Al-Farabi,_la_Lógica_como_método_del_razonamiento_demostrativo.pdf instead of Al-Farabi,_la_Lógica_como_método_del_razonamiento_demostrativo.pdf

I think that old udev rule solved this issue, but now I don't know how to do this.

Last edited by HermesT (2012-10-26 16:00:41)

Offline

#6 2012-10-26 16:01:52

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Add it to fstab and see if that helps?

Offline

#7 2012-10-26 17:21:23

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Thanks aking9:
It seems there is no difference whether  fstab entry (a very old one, comented a long time ago) is active or not. None of both below helps to solve it.

/dev/sda5 /media/Almacen ntfs-3g defaults,users,umask=002 0 0
#/dev/sda5 /media/Almacen ntfs-3g defaults,users,locale=es_ES.UTF-8,umask=002 0 0

Despite of great work done by Arch team, systemd is an "esoteric" world for me.

Where can I now configure such thing?

Added:

journalctl log for ntfs-3g.
First, fstab with locale (deprecated?). Second fstab with nls. Third, no fstab entry:

Oct 26 18:30:04 HermesT ntfs-3g[700]: Unmounting /dev/sda5 (Almacen)
Oct 26 18:30:31 HermesT ntfs-3g[225]: Version 2012.1.15 external FUSE 29
Oct 26 18:30:31 HermesT ntfs-3g[225]: Mounted /dev/sda5 (Read-Write, label "Almacen", NTFS 3.1)
Oct 26 18:30:31 HermesT ntfs-3g[225]: Cmdline options: rw,noexec,nosuid,nodev,locale=es_ES.UTF-8,umask=002,users
Oct 26 18:30:31 HermesT ntfs-3g[225]: Mount options: rw,noexec,nosuid,nodev,users,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096,default_permissions
Oct 26 18:30:31 HermesT ntfs-3g[225]: Global ownership and permissions enforced, configuration type 7
Oct 26 19:10:41 HermesT ntfs-3g[225]: Unmounting /dev/sda5 (Almacen)
Oct 26 19:57:45 HermesT ntfs-3g[229]: [101B blob data]
Oct 26 20:06:53 HermesT ntfs-3g[229]: Unmounting /dev/sda5 (Almacen)
Oct 26 20:07:15 HermesT ntfs-3g[279]: Version 2012.1.15 external FUSE 29
Oct 26 20:07:15 HermesT ntfs-3g[279]: Mounted /dev/sda5 (Read-Write, label "Almacen", NTFS 3.1)
Oct 26 20:07:15 HermesT ntfs-3g[279]: Cmdline options: rw,noexec,nosuid,nodev,nls=utf8,umask=002,users
Oct 26 20:07:15 HermesT ntfs-3g[279]: Mount options: rw,noexec,nosuid,nodev,nls=utf8,users,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096,default_permissions
Oct 26 20:07:15 HermesT ntfs-3g[279]: Global ownership and permissions enforced, configuration type 7
Oct 26 20:08:37 HermesT ntfs-3g[279]: [101B blob data]
Oct 26 20:24:30 HermesT ntfs-3g[279]: Unmounting /dev/sda5 (Almacen)
Oct 26 20:26:05 HermesT ntfs-3g[795]: Version 2012.1.15 external FUSE 29
Oct 26 20:26:05 HermesT ntfs-3g[795]: Mounted /dev/sda5 (Read-Write, label "Almacen", NTFS 3.1)
Oct 26 20:26:05 HermesT ntfs-3g[795]: Cmdline options: rw,nodev,nosuid,uid=1002,gid=100,dmask=0077,fmask=0177,uhelper=udisks
Oct 26 20:26:05 HermesT ntfs-3g[795]: Mount options: rw,nodev,nosuid,uhelper=udisks,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096,default_permissions
Oct 26 20:26:05 HermesT ntfs-3g[795]: Global ownership and permissions enforced, configuration type 7

None of them solved the problem.

Last edited by HermesT (2012-10-26 18:58:02)

Offline

#8 2012-10-27 10:25:10

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Hi everyone.

This were a silly error.
After a long tour for systemd, udev, fuse, udisks, etc... I turned to basic steps in switching to systemd config files.

In switch process from rc.conf to locale.conf I omitted  LANG="es_ES.UTF-8"

In short:

We don't need an fstab entry nor udev rule, and there is no problem with NTFS partitions or ntfs-3g switching to systemd.

I apologize.

Please, can somebody delete this silly and unuseful thread? I think  contributes for give more confusion than light in this issue for other people.

Thanks a lot.

Last edited by HermesT (2012-10-27 10:38:18)

Offline

#9 2012-11-22 23:18:31

bmilnes
Member
Registered: 2011-11-01
Posts: 5

Re: [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

Can it be really be that simple?
I changed my system /etc/locale.conf from US (default) to GB, and the share returned!

Offline

Board footer

Powered by FluxBB