[Bug 595138] Re: Settings in /etc/hdparm.conf are not applied during boot
Karl-Wilhelm Rips
595138 at bugs.launchpad.net
Thu Dec 8 17:11:09 UTC 2022
In Ubuntu 22.04.1 (jammy), package version `9.60+ds-1build3` of `hdparm` is
included. `hdparm.patch` (see #37) is included in this package (see file
`/usr/lib/hdparm/hdparm-functions`, lines 108 to 120). But this patch can't fix
the issue:
1. Line 78:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
local WANTED_DISK="$1"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets `WANTED_DISK` as configured in `/etc/hdparm.conf`, i.e.
`/dev/disk/by-id/ata-…`.
2. Lines 113 and 114:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DISC=$(readlink -m "$KEY")
DISC=${DISC%%[[:digit:]]*}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Resolves symbolic link. `DISC` is now `/dev/sd…` for example.
3. Lines 228 to 232:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ -n "$OPTIONS" ] && [ "$DISC" = "$WANTED_DISK" ]
then
echo $OPTIONS
return 0
fi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If options for the disk have been set in `/etc/hdparm.conf` and `DISC` and
`WANTED_DISK` are equal, the options are printed. But this will not happen
because `DISC` contains resolved symbolic link (`/dev/sd…`) whereas
`WANTED_DISK` contains original value according to `/etc/hdparm.conf`
(`/dev/disk/by-id/ata-…`). Hence, they are not equal!
Therefore, `hdparm.patch` doesn't fix this issue.
--
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