USB Hard Drive Spindown Issue
Posted: Wed Jul 21, 2010 2:24 pm
I'm not sure if this is the right place to post this question to, but you have been so helpful so far that I thought I would give it a try.
I have a script that spins down my USB hard drive after 5 minutes of activity using:
sg_start --stop --pc=2 /dev/device
I confirm that the device is down with:
hdparm -C /dev/device
At this point, when I try list the files on this volume, I receive this error:
ls: reading directory .: Input/output error
I noticed that the device was being reassigned when coming out of sleep from /dev/sdb to /dev/sdc, so I wrote a udev rule to assign it a persistent device name /dev/DataDrive1. This worked, and now my my fstab references this device successfully. When coming out of sleep, the device name does not change. However, I still cannot access the volume, and receive the same error.
The only way to fix the issue is either to reboot, or to:
umount /dev/DataDrive1
mount -a
Can anyone please point me in the right direction? Any help would be greatly appreciated.
I have a script that spins down my USB hard drive after 5 minutes of activity using:
sg_start --stop --pc=2 /dev/device
I confirm that the device is down with:
hdparm -C /dev/device
At this point, when I try list the files on this volume, I receive this error:
ls: reading directory .: Input/output error
I noticed that the device was being reassigned when coming out of sleep from /dev/sdb to /dev/sdc, so I wrote a udev rule to assign it a persistent device name /dev/DataDrive1. This worked, and now my my fstab references this device successfully. When coming out of sleep, the device name does not change. However, I still cannot access the volume, and receive the same error.
The only way to fix the issue is either to reboot, or to:
umount /dev/DataDrive1
mount -a
Can anyone please point me in the right direction? Any help would be greatly appreciated.