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.