This one time, at band camp, Tim Small said:
> 
> I have a machine with several drives.  These drives appear under 
> differing device names, depending on kernel version, and differing 
> startup conditions (e.g. module load order).
> 
> I would like some drives (3.5" drives) to spin-down when not in use, and 
> some (2.5" drives) to remain spinning.  This is not currently possible 
> with hdparm.conf, as I can't tell which devices will refer to which drives.
> 
> One fix may be to be able to use the serial number, or model as listed 
> in the output of "hdparm -I".  Another possible fix would be the ability 
> to refer to the slave devices of software raid arrays.  e.g. the slave 
> drives of a software raid array could be discovered using something like:
> 
> for DEV in md4 md5 ; do ls -al /sys/block/$DEV/slaves/ | egrep -o 
> block/.+/ | cut -d / -f 2;  done | sort | uniq
> 
> Yet another possibility would be the ability to use the "LABEL", or 
> "UUID" feature of the mount to command to resolve device names from the 
> filesystem superblock info e.g. -
> 
> mount -f -v -U 4f6de864-aee6-4de9-986d-617c2f61f146
> 
> can be used to resolve the supplied UUID to a device name, without 
> carrying out the mount command.

Of course hdparm doesn't do this well, and it's not it's job to, either.

I would suggest adding udev rules to map drives bassed on something
(serial number, whatever) and create a permanently named symlink based
on that.  hdparm can then run on the symlink.

I feel like you're looking at reimplementing functionality already
present in other programs in hdparm, and I don't want to reinvent the
wheel unless the reason is very compelling.
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to