Rescan USB Bus?

Plugging in devices such as LAN adapters, Wi-Fi cards, printers, etc. to Arch Linux ARM.

Rescan USB Bus?

Postby sambul13 » Sat Oct 20, 2012 7:47 pm

Lets say, one has installed XFCE desktop to a Plug, and hooked a USB thumb to it after boot. In a desktop environment the USB Thumb can later be ejected by the Eject command. But at times there is no need to detach it from the Plug after that.

So, if one ejects a USB Stick or Card, but won't physically detach it, is there a way to rescan the USB Bus aiming to assign device name / number again to the Thumb, so that it's discovered again and auto mounted by UDEV? Is fstab record required to re-mount in this case? Or may be restarting Udev will do - how? Pls try before giving advice. :)
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

Re: Rescan USB Bus?

Postby slycat » Sat Oct 20, 2012 7:56 pm

I think the best bet is to make an fstab entry and do `mount -a` whenever it needs to be remounted. Or just mount it yourself after ejection (mount /dev/<thumb> /path/to/mountpoint), if I am understanding you correctly.
Pogoplug Pro w/ Wireless User -> decomm.
Cubox-i4pro User
4TB eSATA HDD (8g/3700+ Sw/Storage)
Kodi / Transmission / Minidlna / Samba / Batch-audio-conversions / Lighttpd
------------------------------
Rollback Machine - Thanks to impatt
slycat
 
Posts: 169
Joined: Wed Feb 09, 2011 3:07 am
Location: Miami, FL

Re: Rescan USB Bus?

Postby sambul13 » Sat Oct 20, 2012 7:59 pm

The problem is, Eject command removes device number and any volume IDs, so it remains like /dev/sdb hooked to USB bus, hence the above approach doesn't work for me. Possibly, udevadm trigger or another approach might work, not sure what the full working command should be...
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm


Return to Hardware

Who is online

Users browsing this forum: No registered users and 9 guests