I'm trying to ddrescue (through rescueCD) a drive, which keeps spinning down. e.g
ddrescue -N -n -A -M -f /dev/sdk /dev/sdd mapfile
Without rebooting I can get the drive for a short while through
echo "- - - " > /sys/class/scsi_host/host11/scan
I was hoping to 'watch' that command to run recurrently (bad idea?); but it will occasionally put the drive onto a new /dev/sdX. e.g. from sdf to sdg
Is there some way to force it so keep the same /dev/sdX? In a similar way to how you'd mount a partition through UUID, but for the drive. NB This won't be permanent solution, just for the rescue.
Or, is there some better way to refer to the drive that won't change? Fdisk gives and identifier which doesn't seem to have changed last time, is this a UUID for the disk?
Disk identifier: A9F95F28-4E6C-4ADB-B618-E9C68D96BFEC
Trying
ddrescue UUID=A9F95F28-4E6C-4ADB-B618-E9C68D96BFEC /mnt/rescue/testdd.image mapfile
ddrescue: Both input and output files must be specified.
Try 'ddrescue --help' for more information.
zsh: no such file or directory: /mnt/rescue/testdd.image
Seems to suggest it's not recognising the UUID, but could be something else.
Other suggestions very welcome! Thanks in advance.
Very much out of my depth (new to linux) and am googling further (udev, wwns) but drowning, badly.
/dev/disk/by-*symlinks to your drive instead of/dev/sdX. The more interesting question is of course why it does spin down. Misconfigured/etc/hdparm.conf? What doesdmesgsay? – dirkt Apr 24 '17 at 06:17/dev/disk/by-idshould be unique for each disk. Not all disks create links in/dev/disk/by-uuidfor the whole disk. – ridgy Apr 24 '17 at 10:39@dirkt - drive spinning down as it's on it's way out but thanks for giving me the hdparm to look at.
Thanks for the help, I'll accept Giles' as his was an answer, rather than comment, but new here so please tell me if that's wrong.
– beardedfool Apr 26 '17 at 00:00