[Bug 595138] Re: Settings in /etc/hdparm.conf are not applied during boot

Bartek Krol 595138 at bugs.launchpad.net
Fri Feb 2 00:25:25 UTC 2018


I fixed this by using this patch
(https://launchpadlibrarian.net/73763550/hdparm-functions.patch) that
translates (unlinks) HDD path symlink inside /etc/hdparm.conf to
/dev/sdX

but I also had to create this patch to the /lib/udev/hdparm, because I had to:
1) convert (readlink) DEVNAME input parameter to hdparm_options function in '/lib/hdparm/hdparm-functions' - this fixes issue when as input to /lib/udev/hdparm someone puts symlink
2) trim the trailing digits from the DEVNAME, because the udev rule puts disk device as well as partitions as input into the /lib/udev/hdparm

Example scenario I had:
1) udev rule runs /lib/udev/hdparm and passes /dev/sda1 as DEVNAME => outcome was that /dev/sda1 was not in /etc/hdparm.conf which made it apply DEFAULT settings
2) udev rule runs /lib/udev/hdparm and passes /dev/sda as DEVNAME => outcome was that /dev/sda was in /etc/hdparm.conf which made it apply CORRECT settings
3) udev rule runs /lib/udev/hdparm and passes /dev/sda2 as DEVNAME => outcome was that /dev/sda2 was not in /etc/hdparm.conf which made it apply DEFAULT settings

All in all, for me, between reboots, the order was random. Sometimes the
disk came last and applied correct settings and sometimes partition came
into play and was overwriting the /etc/hdparm.conf with the DEFAULTS


** Patch added: "hdparm.patch"
   https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/595138/+attachment/5047121/+files/hdparm.patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to hdparm in Ubuntu.
https://bugs.launchpad.net/bugs/595138

Title:
  Settings in /etc/hdparm.conf are not applied during boot

Status in hdparm package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: hdparm

  After upgrade to Lucid the hard drives never spindown. The hdparm
  spindown settings (and most likely others) in /etc/hdparm.conf are not
  being applied during boot.

  This seems to have happened after removing the init.d script.

  
  lsb_release -rd
  Description:    Ubuntu 10.04 LTS
  Release:        10.04

  
  apt-cache policy hdparm
  hdparm:
    Installed: 9.15-1ubuntu9
    Candidate: 9.15-1ubuntu9
    Version table:
   *** 9.15-1ubuntu9 0
          500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages
          100 /var/lib/dpkg/status

  
  cat /etc/hdparm.conf
  /dev/sda {
      spindown_time = 240
  }
  /dev/sdb {
      spindown_time = 240
  }
  /dev/sdc {
      spindown_time = 240
  }
  /dev/sdd {
      spindown_time = 240
  }
  /dev/sde {
      spindown_time = 240
  }
  /dev/sdf {
      spindown_time = 240
  }
  /dev/sdg {
      spindown_time = 240
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/595138/+subscriptions



More information about the foundations-bugs mailing list