Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a database backup script which does a mysqldump and copies the dump to an external hard drive with an XFS partition on it. Unfortunately partway through the copy, the drive dismounts and the device changes from say /dev/sdc to /dev/sdd. /dev/sdc1 will still be mounted, but the folder where it is mounted is not accessible. I unmount the drive and that's when the /dev/sdd (or whatever drive it decides to be) shows up. I mount that and it works just fine.

The dmesg output for when the backup script is running looks like this:

[328722.136119] usb 2-1: USB disconnect, address 69
[328722.172828] xfs_force_shutdown(sdc1,0x1) called from line 335 of file /build/buildd/linux-2.6.32/fs/xfs/xfs_rw.c.  Return address = 0xffffffffa030f9d3
[328722.172845] Filesystem "sdc1": I/O Error Detected.  Shutting down filesystem: sdc1
[328722.181694] Please umount the filesystem, and rectify the problem(s)
[328722.186817] xfs_force_shutdown(sdc1,0x1) called from line 335 of file /build/buildd/linux-2.6.32/fs/xfs/xfs_rw.c.  Return address = 0xffffffffa030f9d3
[328722.172845] Filesystem "sdc1": I/O Error Detected.  Shutting down filesystem : sdc1
[328722.181694] Please umount the filesystem, and rectify the problem(s)
[328722.186817] xfs_force_shutdown(sdc1,0x1) called from line 335 of file /build/buildd/linux-2.6.32/fs/xfs/xfs_rw.c.  Return address = 0xffffffffa030f9d3
[328734.520107] usb 2-1: new high speed USB device using ehci_hcd and address 70
[328734.675122] usb 2-1: configuration #1 chosen from 1 choice
[328734.675493] scsi322 : SCSI emulation for USB Mass Storage devices
[328734.675693] usb-storage: device found at 70
[328734.675697] usb-storage: waiting for device to settle before scanning
[328739.670293] usb-storage: device scan complete
[328739.672217] scsi 322:0:0:0: Direct-Access     Seagate  Desktop          0130

PQ: 0 ANSI: 4

I've ran some filesystem checks on the disk, it seems to come out ok. I've used the disk for other things as well and it also works. It seems like this happens every time I run the backup script.

share|improve this question
    
Have you checked the external controller (not the disk itself) and the cables? –  hmontoliu May 6 '11 at 14:19
    
Yep, it's firmly connected. I'll show the log right after this error where it detects the drive again. –  robbrit May 6 '11 at 15:13

1 Answer 1

up vote 1 down vote accepted

Well, it says in your logs: USB disconnect. Could be a loose cable/connector or maybe ovecurrent on USB port if your backup script causes a lot of activity.

If you want to be absolutely sure it's not filesystem-type related you could re-format the external drive and see how it behaves with ext4/3, NTFS or VFAT.

share|improve this answer
    
Seems like an over-current might have been an issue, but I'm not sure. I tweaked the backup script to generate a much smaller file (60mb vs. 800mb) and it seems to work well now. I guess the drive would just die while trying to copy over a huge file. –  robbrit May 6 '11 at 15:29
    
@robbrit If you are backing up to a suspicious drive you are risking your data. I'd recommend dumping/RMAing the drive, or changing its purpose (to carry some less critical stuff) and grabbing a less problematic one for backups. At the very least I would be doing md5sum of the backup file on the system and on the USB drive to have better chance to get my data back should I ever need to restore it. –  Paweł Brodacki May 6 '11 at 17:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.