[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Redhat Linux USB port can't mount thumb drive anymore after an error

Posted on 2010-09-07
9
Medium Priority
?
818 Views
Last Modified: 2013-12-16

I was copying dozens of log files totalling about 4GB to a thumb drive mounted on
my Linux RHES 4.x box using "cp /etc/httpd/NSC_logs/* /usb/folder/ &"  & after
the background copying is completed (a message popped up to say the backgrd
job is done), I issued "umount /usb"  but I guess just before the umount completes,
I pulled out the thumb drive & on the console, some error messages popped up,
saying "FAT . . . bread . . . IO ..... "

Now, if I plug any thumb drive into the port, dmesg would not show any messages
to say a USB device is detected.

How can I resolve this without rebooting the Linux box?

Let me know if more info is needed
0
Comment
Question by:sunhux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Expert Comment

by:csalaski
ID: 33624913
Have you tried it on another nix box?
0
 
LVL 62

Accepted Solution

by:
gheist earned 668 total points
ID: 33625217
read error sounds bad.
tru fsck first
if it does not fix rewrite drive with zeroes and re-format
if it does not help you were succesful at bricking your USB drive.
0
 
LVL 40

Expert Comment

by:noci
ID: 33626658
A good practice is to use "sync; sync; sync" before unmounting a disk manualy.
Most desktop software allready does that. But do wait with the removal of the drive until the desktop software says so or the umount has been completed after sync...
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:sunhux
ID: 33634825


This thumb drive is still working on my other Redhat Linux boxes.  So problem is
with the USB port on the Linux box, not the thumb drive

The full error from dmesg  :

scsi195 (0:0): rejecting I/O to device being removed
scsi195 (0:0): rejecting I/O to device being removed
scsi195 (0:0): rejecting I/O to device being removed
FAT bread failed in fat_clusters_flush
usb 1-5: new high speed USB device using address 79
scsi196 : SCSI emulation for USB Mass Storage devices



Anything I can do to fix this without rebooting as it's a Prod server?
0
 

Author Comment

by:sunhux
ID: 33634882

Is there sort of daemon or service for USB in RHES Linux that I can restart?
0
 
LVL 40

Assisted Solution

by:noci
noci earned 1332 total points
ID: 33634915
No there is no daemon for USB.

The udev daemon monitors insertions & removal of devices and handles the userland part of it.
The problem might be that there are still dirty buffers kept around and those are blocking the other IO. (I not that deep inthose parts of the kernel though).

Another problem might be a structural damage in the filesystem on the stick that prevents it from being accessible.
Did you try to fsck it on another Unix/Linux system, of CHKDSK it on an Windows system?
0
 

Author Comment

by:sunhux
ID: 33635009

But the FAT32 thumb drive is accessible on other Redhat linux USB ports & my Windows.

Anyway chkdsk gave:
The type of the file system is FAT32.
Volume Serial Number is C031-EDAC
Windows is verifying files and folders...
The size of the \ss\access-xxxxxx_log_20100829.log entry is not valid.
\ss\access-xxxxxxx_log_20100830.log  first allocation unit is not valid. The e
ntry will be truncated.
\ss\access-xxxxxxt_log_20100831.log  first allocation unit is not valid. The e
ntry will be truncated.


& I've just run "chkdsk/F thumbdrv:" & finished the corrections but still got the same
error on that server's USB port.  With other RHES USB port, it's Ok
0
 
LVL 40

Assisted Solution

by:noci
noci earned 1332 total points
ID: 33635274
As I said before it might me possible that the kernel still attempts to write buffers to an (now) non existing device. That might also prevent udev on taking the right actions for that USB controller./port.
or even system. To answer that i need to gather much more knowlegde on the inner workings of the kernel w.r.t. USB, UDEV, flushing buffers after a device went away.

If a different USB stick (which has a different serial number) or the same stick in a different port doesn't work you might need to plan a reboot for that server.
0
 

Assisted Solution

by:sunhux
sunhux earned 0 total points
ID: 33673708

Ok, looks like the only option is reboot - going to be end of this month
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question