Package: hdparm
Version: 9.65+ds-1.1
Severity: wishlist

Dear Maintainer,

TL;DR: could /usr/lib/udev/hdparm maybe log to journald?

I added the following entry to /etc/hdparm.conf

/dev/sda {
   read_ahead_sect = 4096
}

But apparently there were no changes to the disk after reboot (hdparm -a
/dev/sda showed no changes).

I executed DEVNAME=/dev/sda bash /usr/lib/udev/hdparm manually without any luck.

When looking into the script I noticed that errors are ignored.

https://sources.debian.org/src/hdparm/9.65%2Bds-1.1/debian/udev-scripts/hdparm#L46

     /usr/sbin/hdparm -q $OPTIONS $DEVNAME 2>/dev/null

When running the command by hand I got the error:

     /usr/sbin/hdparm -q -a4096 /dev/sda
       -a: bad/missing filesystem-read-ahead value (0..2048)

So I had to adjust the config value.

If I would have seen the error message, maybe I would have noticed earlier.

Maybe the script could log errors to journald? Maybe something like this?

/usr/sbin/hdparm -q $OPTIONS $DEVNAME 2>&1 | systemd-cat --identifier=hdparm.conf --priority=warning


Thank you,

Ben

-- System Information:
Debian Release: 13.1
   APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.48+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hdparm depends on:
ii  libc6  2.41-12

Versions of packages hdparm recommends:
ii  powermgmt-base  1.38

hdparm suggests no packages.

-- Configuration Files:
/etc/hdparm.conf changed [not included]

-- no debconf information

Reply via email to