This article wants to put an emphasis on why it is very important to know how to distinctively identify a drive when configuring its power saving features with hdparm. You might also be interested in how to put you hard drives to sleep after a given idle time permanently or why your hard drives might not respond to the hdparm -S command.
Why using e.g. /dev/sda can hurt your drive, especially when working with hdparm
Especially if you have some additional ide/sata interface cards installed, it might happen that the hard disks are not put in the same order on every startup. The following example illustrates the effect resulting from this:
Let's assume since the last startup /dev/sda is the hard disk your operating system is installed on and /dev/sdc is a hard disk that you use only for storing things and you don't need it to be spun up all the time. So you write in a startup file, that /dev/sdc should spin down after a given idle time. After you reboot /dev/sdc might now be /dev/sda and the other way around resulting in your 'main' hard drive spinning down every 15 minutes and instantly shortly after that, because something WILL access the drive. This is very harmful to the drive and dramatically reduces its lifespan because it is always switched off and on again.
How to distinctively identify a hard drive
Besides the logic of naming the drives /dev/sda /dev/sdb /dev/sdc etc. unix and linux systems also provide a way to distinctively identifying your drives to level that no other drive in the world could be confused with the one you want to configure. First you need some informations about your installed hard drives, you'll need to note down "product" and "serial" resulting from the output of the following command:
sudo lshw -class disk
Together with the size you should now which drive is which now. Now you'll need to know the unique identifiers your system gave your disks. Get a list with the following command:
sudo ls /dev/disk/by-id
The hard disk you are searching for should be listed in a format that is comparable to
scsi_SATA_PRODUCT_SERIAL or ata_PRODUCT_SERIAL
the -part1 -part2 etc. ones are the partitions and not the drives. If you want to use hdparm to configure the drive, always use the drive and not the partition identifiers.