Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Usbmount does not unmount fat32 usb pendrive

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ilclaudio
Posts: 1
Joined: 2017-07-10 07:17

Usbmount does not unmount fat32 usb pendrive

#1 Post by ilclaudio »

Hi all,
I'm using a Debian distribution on an ARM system (armv7l).
I have to configure the system so that the USB pendrive has to be mounted/unmounted in automatic when it is plugged/unplugged in the USB port.
The mount point must always be the same: /media/usb0.
If I use the commands:

Code: Select all

/bin/mount -tauto -osuid,rw,user,sync,exec,nodev,noatime,nodiratime,umask=0000 /dev/sda1 /media/usb0
umount -l /media/usb0
The disks (whether it is NTFS or FAT32) is always mounted/unmounted correctly.

To automate the procedure I'm using "usbmount" with the patch described in this article:
https://raspberrypi.stackexchange.com/q ... essie-lite

All works fine with NTFS disks, that are mounted in this way (as fuseblk):

Code: Select all

root@cl-som-imx6ul-sid:~# mount
.....
/dev/sda1 on /media/usb0 type fuseblk (rw,nosuid,nodev,relatime,sync,user_id=0,group_id=0,allow_other,blksize=4096,user)
FAT-32 disks are mounted correctly, but they are not unmounted from this procedure.
In fact, after removing the usb pendrive, I still have this entry:

Code: Select all

root@cl-som-imx6ul-sid:~# mount
.....
/dev/sda1 on /media/usb0 type vfat (rw,nosuid,nodev,relatime,sync,uid=1000,gid=1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
How can I force the unmount of the pendrive (with FAT-32) ?
The command "umount -l /media/usb0" works, while "usbmount" can't unmount the disk in the right way.


Thank you very much

Claudio

Post Reply