• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

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


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
sunhux
Asked:
sunhux
4 Solutions
 
csalaskiCommented:
Have you tried it on another nix box?
0
 
gheistCommented:
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
 
nociSoftware EngineerCommented:
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
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
sunhuxAuthor Commented:


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
 
sunhuxAuthor Commented:

Is there sort of daemon or service for USB in RHES Linux that I can restart?
0
 
nociSoftware EngineerCommented:
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
 
sunhuxAuthor Commented:

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
 
nociSoftware EngineerCommented:
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
 
sunhuxAuthor Commented:

Ok, looks like the only option is reboot - going to be end of this month
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now