[SOLVED] usbmount on pve5

RobFantini

Famous Member
May 24, 2012
2,084
117
133
Boston,Mass
we used usbmount to attach large usb drives - then used a cron script to send vzdumps , templates .

usbmount is not in stretch, however a few of our systems still have the package installed - the ones that got upgraded from jessie to stretch.

usbmount was not working with systemd , so i thought it was dead.

usbmount i alive and well. this person solved the issue: https://superuser.com/questions/1265412/automounting-usb-drives-on-a-headless-systemd-linux-box

systemd change:
Code:
#
# 2018-02-08  for usbmount changed this
#   https://superuser.com/questions/1265412/automounting-usb-drives-on-a-headless-systemd-linux-box
#MountFlags=slave
MountFlags=shared

install using git. https://github.com/rbrito/usbmount

maybe next debian release buster and stretch backports will get the package. so check that before using git if you want

we are happy to to again just plug in certain configured drives and have rsync put and get the files. no more manual mounts.
.
 
well after an update to debs , or a misconfiguration on my part usbmount no longer works. will try to fix. i do not suppose anyone else tried to use usbmount?

I know this is not a pve issue. forgive the not tottaly on topic thread.

dmesg after plugging in drive

- after reboot usb's not mounted.
- try disconnect and reconnect usb. did not monunt. dmesg:
Code:
[   61.877638] usb 12-1: new SuperSpeed USB device number 2 using xhci_hcd
[   61.898551] usb 12-1: New USB device found, idVendor=1058, idProduct=25fb
[   61.898554] usb 12-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[   61.898556] usb 12-1: Product: easystore 25FB
[   61.898559] usb 12-1: Manufacturer: Western Digital
[   61.898561] usb 12-1: SerialNumber: 3753483236485743
[   61.915200] usb-storage 12-1:1.0: USB Mass Storage device detected
[   61.915876] scsi host5: usb-storage 12-1:1.0
[   61.915985] usbcore: registered new interface driver usb-storage
[   61.924410] usbcore: registered new interface driver uas
[   62.942202] scsi 5:0:0:0: Direct-Access     WD       easystore 25FB   3004 PQ: 0 ANSI: 6
[   62.942433] scsi 5:0:0:1: Enclosure         WD       SES Device       3004 PQ: 0 ANSI: 6
[   62.994456] sd 5:0:0:0: Attached scsi generic sg7 type 0
[   62.994798] scsi 5:0:0:1: Attached scsi generic sg8 type 13
[   62.995319] sd 5:0:0:0: [sdg] Spinning up disk...
[   63.009598] scsi 5:0:0:1: Wrong diagnostic page; asked for 1 got 8
[   63.010285] scsi 5:0:0:1: Failed to get diagnostic page 0xffffffea                                                   
[   63.010899] scsi 5:0:0:1: Failed to bind enclosure -19                                       
[   63.011524] ses 5:0:0:1: Attached Enclosure device                 0
[   80.414473] ready
[   80.414715] sd 5:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
[   80.414850] sd 5:0:0:0: [sdg] 15628052480 512-byte logical blocks: (8.00 TB/7.28 TiB)
[   80.414852] sd 5:0:0:0: [sdg] 4096-byte physical blocks
[   80.415080] sd 5:0:0:0: [sdg] Write Protect is off
[   80.415082] sd 5:0:0:0: [sdg] Mode Sense: 47 00 10 08
[   80.415297] sd 5:0:0:0: [sdg] No Caching mode page found
[   80.415936] sd 5:0:0:0: [sdg] Assuming drive cache: write through                     
[   80.416833] sd 5:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).       
[   81.472890]  sdg: sdg1
[   81.473458] sd 5:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
[   81.474082] sd 5:0:0:0: [sdg] Attached SCSI disk
[   81.894636] EXT4-fs (sdg1): recovery complete
[   81.894642] EXT4-fs (sdg1): mounted filesystem with ordered data mode. Opts: (null)

so the last line makes it seem the operating system thinks it is mounted. however none of the 4 drive mount.

I will fix this or use something else besides usbmount.

any suggestions?
 
Last edited:
I decided that since usbmount is not in stretch to remove usbmount and instead use /etc/fstab
Code:
# 
# 
# use  dmesg and blkid to get UUID 
# 
UUID="put uuid here" /media/usb2 ext4 nosuid,nodev,nofail 0 0

that tested ok on reboot with drive attached [ it mounted] and not attached [ system did normal boot].
 
Last edited: