System becoming unusable when trying to transfer to USB hard drive

I'm trying to use a hard drive connected with a USB to SATA adapter to back up a server, but the transfer locks up and the system becomes unstable within 50GB of transfer. I am trying to rsync about 100GB of data from a RAID5 volume to a 750GB hard drive encrypted with LUKS. Both source and target file systems are ext3. I have tried the following without success:

  • removing the encryption layer
  • using cp instead of rsync
  • 4 different USB to SATA adapters of 3 different brands
  • 3 different hard drives, all Seagate, but two brand new and the 3rd a different model
  • 2 different USB ports on the server
  • installing a new USB card on the server
  • plugging in to a different server (with a different brand MB)

In all cases, usually within 20GB-50GB of transfer, the drive stops responding, rsync (or cp) freezes and doesn't respond to kill -9, the partition won't respond to umount -f, and I frequently lose the ability to start any new terminal sessions or do other tasks (such as using apt), though existing console sessions still respond to simple commands. The only way to recover from this state is to use the reset button or power cycle the box (init 6 hangs trying to unmount the filesystem). Just for troubleshooting purposes, I tried copying about 200GB of random junk onto one of the drives from an XP box I had, and it didn't have any problems. Both servers I refer to are running a similarly configured install of 4.0r0 for amd_64 and have been updated sometime within the last few weeks. I'm running out of troubleshooting ideas. So far the evidence seems to say that USB hard drives don't work in Debian...

The process I'm using follows something like this, where dmesg indicates that the USB device has been attached as /dev/sdg with a single partition /dev/sdg1, and /bak is the directory I'm trying to back up (note the use of -x to keep rsync/cp from crossing filesystem boundaries since I'm mounting the drive inside the directory I'm backing up):

# cryptsetup -y luksFormat /dev/sdg1
# cryptsetup luksOpen /dev/sdg1 crypt1
# mkfs -t ext3 /dev/mapper/crypt1
# mount /dev/mapper/crypt1 /bak/mnt/usb
# mkdir /bak/mnt/usb/bak
# rsync -axv --numeric-ids /bak/ /bak/mnt/usb/bak/

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: System becoming unusable when trying to transfer to USB hard

Have you checked the system logs for any clues?
You can also try to connect via ssh and check on the resource usage.

Have you tried a direct (unencrypted) transfer? You can just create junk files with /dev/urandom to test. Any power saving features could also be a problem.

Syndicate content