Is it possible to re-mount a USB drive, without actually removing and re-inserting the physical USB itself?
I was wondering this one after I accidentally unmounted a USB Flash drive from Thunar. I thought why bother taking it out and putting in again, there has got to be a way. Googling for a few minutes gave me nothing.
NOTES:
- This is not a simple case of
mount /dev/sdb /mnt/usb - The drive was auto-mounted with
gvfsand after unmounting, it has completely disappeared from/dev/sdb/ dmesg -wgives meusb 1-1.2: USB disconnect, device number 7- The device folder is gone from
/sys/bus/usb/devices/and/sys/bus/usb/drivers/(1-1.2 folder does not exist) - Tried doing
echo "1-1.2" > /sys/bus/usb/drivers/usb/bind==>write error: No such device - In some forum, someone said that
udevadm triggerwould do the trick, but it does not work.
It seems that gvfs has completely vanished the device. And I wish there was a way to trigger the system into recognizing the USB again, it would be a very helpful functionality to have.
p.s. ( Resetting the computer does not count )
Posted Aug 21, 2019, 5:33 PM UTC
OK found it, I had to reset the PCI USB controller with this: (After discovering the PCI address and USB type of the hub)
I followed this guide: https://www.linux.org/threads/resetting-the-usb-subsystem.10404/
I knew this could be done! Perhaps this post will help someone in the future.
This issue isn't inherently gvfs. Dolphin/Plasma does this too.
What happens is when you eject, it doesn't just unmount (which I wish it did) but completely removes the device (as you saw). It's probably something in udisks2 handling that.