/etc/hdparm.conf works only for /dev/sdX and not for their symlinks

Bug #799312 reported by b3nmore
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
hdparm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: hdparm

Setting hard drive parameters in /etc/hdparm.conf finally seems to work since Ubuntu 10.10, if (and only if) you specify the drives like /dev/sda, /dev/sdb, .... . Since the /dev tree is build dynamically by udev, you can't be sure, that the parameters specified this way are applied to the correct hd. However it is would be safe to use the correspondent symlinks in /dev/disk/by-uuid or /dev/disk/by-id to define your hd.
A partial fix was given in #222458. But since then the hdparm script files have changed and it worked only with symlinks to the drive itself and not with symlinks to its partitions (like in /dev/disk/by-uuid).
I attach a patch based on #222458, which should fix the above described problems for 10.10 and 11.04.

Tags: patch
Revision history for this message
b3nmore (b3nmore) wrote :
tags: added: patch
Revision history for this message
b3nmore (b3nmore) wrote :

Still persists in oneiric, since the script (hdparm-functions) hasn't changed. That means, that the patch is still working too.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hdparm (Ubuntu):
status: New → Confirmed
Revision history for this message
Ewano (i-launchpad-ewano-net) wrote :

This bug is *still* in precise pangolin - and the fix worked a charm. In chasing this one down it looks like it's been around *AND FIXED* since April 2008 but the fix has never been carried forward.

Other bugs list very similar fixes:
222458
227705

What is the process by which a fix such as this can be moved into the official code base?

For others following:

This fix allows me to set a USB hard drive to spindown using hdparm.conf, with out needing to know what /dev/sdX it will end up coming under. I used a combination of the Disk Utility and ls -1 /dev/disk/by-id/* to find the devices manufacturer unique id

Then added:

/dev/disk/by-id/<your specific disk identifier here> {
       spindown = 241
}

to my hdparm.conf and it works fine under ubuntu 12.04 beta with this patch - no matter what order I plug in usb storage.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.