Find the answer to your Linux question:
Results 1 to 5 of 5
Hi guys, I'm trying to copy about 1.2 TB of data from my server to an external HDD. It mounts fine and it starts copying, but after an hour or ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    External HDD switching drive letters


    Hi guys,
    I'm trying to copy about 1.2 TB of data from my server to an external HDD. It mounts fine and it starts copying, but after an hour or two, the drive "switches" letters. Meaning that the cp command starts returning I/O errors and when I run fdisk -l, I find that the drive letter switches from /dev/sdd1 to /dev/sdf1. I've tried mounting by UUID before, but then when I run df -ah I run into having both /dev/sdd1 and /dev/sdf1 mounted to the same directory and still am unable to complete the cp command. Any thoughts?

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Posts
    14
    I've had similar problems with the device name changing but only with an external drive that spins-down during idle periods.

    Since you are transfering lots of data I doubt your external disk is spinning down.

    Check your logs to see if there are any messages just before the disk IO errors. Something like 'mount device read-only' would mean the kernel timed out trying to write to the disk.

    What filesystem are you using on the external? If it is ext3 (journaled) try to just format it as ext2. I've had several issues with ext3 USB drives and the kernel timing out writing to them.

  3. #3
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9
    The destination file system is ext2. I will check the logs and see if anything comes up.

  4. #4
    Just Joined!
    Join Date
    Mar 2007
    Posts
    4
    I have exactly the same problem with SUSE 11.0 64-bit. The disk is USB WD Passport. File system VFAT. And it's changing device name from /dev/sdf to /dev/sdh.

    This is my backup disk that is getting mounted from CRON, and it's a pain in the .... when it's changing it's letter.

    Anyone knows how to solve this?

  5. #5
    Just Joined!
    Join Date
    Oct 2008
    Posts
    14
    Your USB Passport is most likely spinning down and the kernel then loses contact with it and marks it readonly.
    When the drive finally does spin backup, UDEV re-inits it and gives it another device name.

    Your best option is to stop your disk from spinning down in the first placed. This may not be possible as a lot of external USB drives get spun down when they are not being used by the external USB controller and not linux power management. And most don't have a configurable spin down timer.

    Search the Web for 'USB drive spin down linux' and you will find a lot of people in your situation. And some great solutions.


    On another note start to get out of the habit of using the '/dev/sd' method of mounting your USB drives.
    Because if you add more USB drives they can get random '/dev/sd' devices names because the device is assigned as the USB drive is discovered. Which is not always in the same order.

    Start to use the '/dev/disk/(by-name,by-id,by-uid)' method. Look it up on the web. But it will save you some headaches in the future if you use USB more often.
    Last edited by RumbleFish; 11-08-2008 at 07:40 PM. Reason: missed some detalis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •