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 mounts wrong vfat partition

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
viatorus
Posts: 1
Joined: 2017-08-30 16:50

usbmount mounts wrong vfat partition

#1 Post by viatorus »

Hello,

I use usbmount to mount devices on my headless server with plug&play.

My USB stick contains one vfat partition. After plug in the stick, usbmount is triggered (from udev) for /dev/sdd and /dev/sdd1.
Since the mount of /dev/sdd succeeded, the /dev/sdd1 mount failes (device is already mounted). The mount point of /dev/sdd is empty (its the head?).
Mounting /dev/sdd1 after umounting /dev/sdd works like expected.

How can I prevent udev/usbmount to mount /dev/sdd? Is the USB stick "wrong" formatted/partitioned.
journalctl -r wrote: Aug 30 19:37:29 nas kernel: usb 2-1: new SuperSpeed USB device number 21 using xhci_hcd
Aug 30 19:37:29 nas kernel: usb 2-1: New USB device found, idVendor=8564, idProduct=1000
Aug 30 19:37:29 nas kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 30 19:37:29 nas kernel: usb 2-1: Product: Mass Storage Device
Aug 30 19:37:29 nas kernel: usb 2-1: Manufacturer: JetFlash
Aug 30 19:37:29 nas kernel: usb 2-1: SerialNumber: 3941003238
Aug 30 19:37:29 nas kernel: usb-storage 2-1:1.0: USB Mass Storage device detected
Aug 30 19:37:29 nas kernel: scsi host5: usb-storage 2-1:1.0
Aug 30 19:37:30 nas kernel: scsi 5:0:0:0: Direct-Access JetFlash Transcend 32GB 1.00 PQ: 0 ANSI: 5
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: Attached scsi generic sg3 type 0
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: [sdd] 61741056 512-byte logical blocks: (31.6 GB/29.4 GiB)
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: [sdd] Write Protect is off
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: [sdd] Mode Sense: 03 00 00 00
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: [sdd] No Caching mode page found
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: [sdd] Assuming drive cache: write through
Aug 30 19:37:30 nas kernel: sdd: sdd1
Aug 30 19:37:30 nas kernel: sd 5:0:0:0: [sdd] Attached SCSI removable disk
Aug 30 19:37:30 nas systemd[1]: Starting usbmount@dev-sdd.service...
Aug 30 19:37:30 nas usbmount[4374]: loaded usbmount configurations
Aug 30 19:37:30 nas usbmount[4376]: trying to acquire lock /var/run/usbmount/.mount.lock
Aug 30 19:37:30 nas usbmount[4379]: acquired lock /var/run/usbmount/.mount.lock
Aug 30 19:37:30 nas usbmount[4403]: dev/sdd contains filesystem type vfat
Aug 30 19:37:30 nas systemd[1]: Starting usbmount@dev-sdd1.service...
Aug 30 19:37:30 nas usbmount[4407]: mountpoint /media/usb0 is available for dev/sdd
Aug 30 19:37:30 nas usbmount[4412]: loaded usbmount configurations
Aug 30 19:37:30 nas usbmount[4418]: trying to acquire lock /var/run/usbmount/.mount.lock
Aug 30 19:37:30 nas usbmount[4419]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime,gid=1000,uid=1000,umask=007 dev/sdd /media/usb0
Aug 30 19:37:30 nas kernel: FAT-fs (sdd): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Aug 30 19:37:30 nas usbmount[4429]: executing command: run-parts /etc/usbmount/mount.d
Aug 30 19:37:30 nas usbmount[4439]: usbmount execution finished
Aug 30 19:37:30 nas systemd[1]: Started usbmount@dev-sdd.service.
Aug 30 19:37:35 nas usbmount[4444]: acquired lock /var/run/usbmount/.mount.lock
Aug 30 19:37:35 nas usbmount[4460]: dev/sdd1 contains filesystem type vfat
Aug 30 19:37:35 nas usbmount[4464]: mountpoint /media/usb1 is available for dev/sdd1
Aug 30 19:37:35 nas usbmount[4471]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime,gid=1000,uid=1000,umask=007 dev/sdd1 /media/usb1
Aug 30 19:37:35 nas systemd[1]: usbmount@dev-sdd1.service: main process exited, code=exited, status=32/n/a
Aug 30 19:37:35 nas systemd[1]: Failed to start usbmount@dev-sdd1.service.
Aug 30 19:37:35 nas systemd[1]: Unit usbmount@dev-sdd1.service entered failed state.
fdisk -l wrote: Disk /dev/sdd: 29.5 GiB, 31611420672 bytes, 61741056 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 61741055 61739008 29.5G b W95 FAT32
I already apply this patch to get usbmount working with NTFS and systemd.

Any ideas?

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: usbmount mounts wrong vfat partition

#2 Post by debiman »

maybe i'm being thick (and don't know much about this program), but can't you simply tell usbmount to mount sdd1?

actually strike that, and please make a test:

1. make sure usbmount doesn't interfere
2. unmount compltely
3. try to mount sdd (not sdd1) manually - what does it say?

explain:
i think it is possible that the partiton table is messed up.

Post Reply