我有一个数据库备份脚本,它执行一个mysqldump并将转储复制到一个带有XFS分区的外部硬盘上。 不幸的是,在复制过程中,驱动器卸载,设备从/ dev / sdc改为/ dev / sdd。 / dev / sdc1仍将被挂载,但挂载的文件夹不可访问。 我卸载驱动器,那是/ dev / sdd(或者它决定的驱动器)出现的时间。 我装载,它工作得很好。
备份脚本运行时的dmesg输出如下所示:
[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
我已经在磁盘上运行了一些文件系统检查,似乎没有问题。 我已经使用了其他的东西的磁盘,它也可以。 似乎每次运行备份脚本都会发生这种情况。
那么,它在你的日志中说:USB断开。 如果您的备份脚本导致大量活动,可能是一个松散的电缆/连接器或USB端口上的过度电stream。
如果你想确定它不是文件系统types相关的,你可以重新格式化外部驱动器,看看它如何与ext4 / 3,NTFS或VFAT的行为。