Hello,
I have a USB flash that it has a problem and umounted suddenly and I should unplug and plug it from USB port for mount.
Can I do this plug and unplug by Linux and not physically?
Thank you.
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
USB flash unplugged suddenly.
-
- Global Moderator
- Posts: 2638
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 192 times
Re: USB flash unplugged suddenly.
If I remember right you have some vm capability? You don't need them exactly, but if you pass the device temporarily to a vm and back it will force a refresh of the device. Or you happen to have it on a powered hub that can cycle the power. Or if you like danger, dig for the sysfs commands.
The sysfs approach works and if you fool around wrong bad things happen.
with your device id and the correct directory, something like, if the id is the argument? Could be wrong..
#echo pcid > /sys/bus/usb/devices/usb4/remove
To add it back in often just modprobe the correct driver module.
Maybe look at /sys/bus/usb/uevent and /sys/bus/usb/drivers_probe instead.
Enjoy!
The sysfs approach works and if you fool around wrong bad things happen.
with your device id and the correct directory, something like, if the id is the argument? Could be wrong..
#echo pcid > /sys/bus/usb/devices/usb4/remove
To add it back in often just modprobe the correct driver module.
Maybe look at /sys/bus/usb/uevent and /sys/bus/usb/drivers_probe instead.
Enjoy!
Re: USB flash unplugged suddenly.
When it unplugged then I can't mount it in VM too.CwF wrote:If I remember right you have some vm capability? You don't need them exactly, but if you pass the device temporarily to a vm and back it will force a refresh of the device. Or you happen to have it on a powered hub that can cycle the power. Or if you like danger, dig for the sysfs commands.
The sysfs approach works and if you fool around wrong bad things happen.
with your device id and the correct directory, something like, if the id is the argument? Could be wrong..
#echo pcid > /sys/bus/usb/devices/usb4/remove
To add it back in often just modprobe the correct driver module.
Maybe look at /sys/bus/usb/uevent and /sys/bus/usb/drivers_probe instead.
Enjoy!