Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A little time ago I unplugged a USB Extension Drive without thinking. The Suse system indicated that my back-up had finished but I had not unmounted the drive, despite knowing that I should never do this. The back-up disc would not mount any more and despite all attempts to find an answer, I was told that linux does not have an answer and I could only try "scan disk" on a Windows computer. This worked. Is this really the only answer and if so why is there no mechanism for such forgetfulness in linux?
Actually, you got lucky. It is perfectly possibly to render a USB device totally unusable my ANY system by such simple carlessness. It is not your fault, but a flaw in the basic design that is difficult to remedy cheaply.
That there is a tool available for Windows to fix such issues (When you are lucky!) should not suprise anyone. Corruption is far easier to create under windows, so dealing with it was a higher priority in that environment. Since it is less common under Linux, it is a lower priority. Despite this, tools do exist and are getting better. When this happens the thrid time to one of the major developers we may see sudden improvment.
I would consider it a learning experience.
I have taken to mounting storage over network rather than local USB. The reasons were matters ov convenience for me, but a side effect was to avoid this problem.
Windows disables write caching for external drives by default so forgetting to safely remove is typically not a problem. linux does not so if there is still unwritten data when the drive is unplugged file corruption is possible. linux does not have a true chkdsk tool for NTFS so the drive has to be repaired using Windows. Using the sync option to mount the external drive will disable write caching but is not recommended with the ntfs-3g driver since it will slow the system down considerbly.
Windows disables write caching for external drives by default so forgetting to safely remove is typically not a problem. linux does not so if there is still unwritten data when the drive is unplugged file corruption is possible. linux does not have a true chkdsk tool for NTFS so the drive has to be repaired using Windows. Using the sync option to mount the external drive will disable write caching but is not recommended with the ntfs-3g driver since it will slow the system down considerbly.
Probable solution is using sync mount option which reduces error much. And disable device write-caching using hdparm and/or sdparm.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.