Any way to remove usb without unmounting?
Hello
I was wondering if there is any way to make so that you don't have to unmount a usb drive before removing. Like a smartphone you can remove anytime(as long as you're not copying or something). I know unmounting is necessary if you don't want corrupted data. And supposedly sync wears out drives fast. So is there a way to safely remove without unmounting. Thanks for suggestions. |
Quote:
if one just falls off the horse. You still unmounted the horse. One way or another it gets unmounted. what you are referring to is what is called hot plugging. If you manually mount a USB port, There is nothing preventing you from just unplugging it. It will not get registered within the system as no longer being there. But you know it is not, because you unplugged it. Draw backs: if the system is presently writing to it, data loss. if the system tries to wite to it, data loss, and a possible error message. Device not present. that is the reason behind Hot Plugging. |
I think you answered you own question! If the device was accessed while mounted, then corruption is pretty likely.
Also, the filing system will still think the device is there, which can lead to problems. My computer is set up to mount the first usb device as /media/usb, and that is used in my backup script. If I'd accessed another earlier without unmounting it, the backup device would seem to be the second and get mounted under a different name, so the script would fail. |
Sorry guys. I should have mentioned my auto-mount will also remove/unmount the mount point AFTER the usb is removed so that is not a problem. So if I synced it would I still have to manually unmount?
|
I'm not sure what you want to happen here. Your system will not know to unmount the drive until you tell it to.
Only thing I can thing of, is if you had an automated task of some sort, maybe a script that detects a specific usb drive, syncs specific data to it, then umounts drive when finished? |
Quote:
|
Quote:
|
Quote:
But if things don't go as expected then the OS will get stuck with the not-unmounted device, right? |
Well obviously unmounting is still needed. I was just wondering if anyone knows if you can do something like that. For now we can only dream. On a regular Linux install it is not really a problem. but minimal.... So until someone comes up with a program to do it the answer is yes you can. But NOT recommended.
Thanks |
Well, the thing is maybe that Linux is more server-driven, therefore anything that happens unexpectedly is bad and has to be reported but no auto-action has to be taken.
E.g. maybe Windows & OSx are more permissive and say "damn, the device is gone - well, if I lost connection with it then it's probably because the user ejected it", while Linux says "OMG what should I do now - I should probably freeze until the admin does something really clever that fixes the unexpected loss of connection/communication with the device". |
in my experience it is ok to just yank the usb stick out - if it isn't an actual rotating hard drive, and if i was only reading from it.
my system never complained, i guess those udev rules just take care of it. |
All times are GMT -5. The time now is 10:57 AM. |