Usbmount extfs

Asked by Sasa Friedrich on 2017-07-05

I have problems auto-mounting flash drives formatted in extfs (Ubuntu 16.04 4.4.0-83-generic x86_64)

Usbmount does the job (acording to log):

Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10049]: loaded usbmount configurations
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10054]: trying to acquire lock /var/run/usbmount/.mount.lock
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10063]: acquired lock /var/run/usbmount/.mount.lock
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10188]: /dev/sdb1 contains filesystem type exfat
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10200]: mountpoint /media/usb0 is available for /dev/sdb1
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10211]: executing command: mount -texfat -osync,noexec,nodev,noatime,nodiratime,utf8 /dev/sdb1 /media/usb0
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10233]: executing command: run-parts /etc/usbmount/mount.d
Jul 05 11:43:52 765315625167A81FC9E2E281 usbmount[10247]: usbmount execution finished

But if I ls /media I get this strange thing:

ls /media -la
ls: cannot access '/media/usb0': Transport endpoint is not connected
total 36
drwxr-xr-x 10 root root 4096 Apr 10 13:38 .
drwxr-xr-x 23 root root 4096 Jul 5 10:37 ..
lrwxrwxrwx 1 root root 4 Apr 10 13:38 usb -> usb0
d????????? ? ? ? ? ? usb0

If I unmount this drive manually and then mount it manually back to same mount point (with same options as defined in usbmount.conf) all works fine.

What is causing this strange problem?

Thank you for help!

BR

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu usbmount Edit question
Assignee:
No assignee Edit question
Last query:
2017-07-05
Last reply:
2017-07-05

Is the usb0 folder present if the media is not mounted ?

Sasa Friedrich (frido77) said : #2

Yes, it is. Here's structure when all is unmounted:

ls /media -la
total 40
drwxr-xr-x 10 root root 4096 Apr 10 13:38 .
drwxr-xr-x 23 root root 4096 Jul 5 10:37 ..
lrwxrwxrwx 1 root root 4 Apr 10 13:38 usb -> usb0
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb0
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb1
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb2
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb3
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb4
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb5
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb6
drwxr-xr-x 2 root root 4096 Apr 10 13:38 usb7

Try:

sudo chown $USER:$USER /media/usb0

Then retry

Sasa Friedrich (frido77) said : #4

I have this in my usbmount.conf:

FS_MOUNTOPTIONS="-fstype=exfat,gid=plugdev,dmask=0002,fmask=0002 -fstype=vfat,gid=plugdev,dmask=0002,fmask=0002 -fstype=ntfs-3g,gid=plugdev,dmask=0002,fmask=0002 -fstype=ext3,gid=plugdev,dmask=0002,fmask=0002 -fstype=ext4,gid=plugdev,dmask=0002,fmask=0002"

So when drive is mounted mountpoint should be owned by group "plugdev" (my local user is also part of this group). And this is working for other fs types (vfat, ntfs...). Problem is only with exfat

Can you help with this problem?

Provide an answer of your own, or ask Sasa Friedrich for more information if necessary.

To post a message you must log in.