2018-02-18 01:54 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001884openmediavaultBugpublic2018-02-02 22:11
Reporterihaz 
Assigned Tovotdev 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionnot fixable 
Product VersionErasmus (3.x) 
Target VersionFixed in Version 
Summary0001884: settings in /etc/hdparm.conf does not apply at startup
Descriptionhdparm / udev rule does not apply /etc/hdparm.conf settings at startup

the problem is that in /etc/hdparm.conf there are links to "/dev/disk/by-id/*" but udev rule sends /dev/[sh]d[a-z]* which results in:
1) partitions to be sent to /lib/udev/hdparm. e.g /dev/sda1, /dev/sda2
2) failed matching at hdparm_options function in /lib/hdparm/hdparm-functions where it compares "$DISC" = "$WANTED_DISK"

I've also described this issue here: https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/595138/comments/37

attaching fix for this issue
Steps To Reproduceset up APM in the web ui -> Physical Disks section
reboot device
check hdparm -B /dev/sd?
the values are different
Additional InformationPatch details:
1) patch unlinks DEVNAME (given the complimentary unlink at /lib/hdparm/hdparm-functions it solves 2) from Description

2) trims trailing digits of DEVNAME which solves 1) from Description
Tagshdparm
Product build3.0.96
Attached Files
  • patch file icon hdparm.patch (365 bytes) 2018-02-02 01:49 -
    --- /lib/udev/hdparm.old	2018-02-01 21:20:43.674859237 +0100
    +++ /lib/udev/hdparm	2018-02-02 01:10:30.140827491 +0100
    @@ -25,6 +25,12 @@
     	exit 1
     fi
     
    +if [ -h "$DEVNAME" ]
    +then
    +	DEVNAME=$(readlink -m "$DEVNAME")
    +fi
    +DEVNAME=${DEVNAME%%[[:digit:]]*}
    +
     OPTIONS=$(hdparm_options $DEVNAME)
     if [ -n "$OPTIONS" ]; then
     	/sbin/hdparm $OPTIONS $DEVNAME 2>/dev/null
    
    patch file icon hdparm.patch (365 bytes) 2018-02-02 01:49 +

-Relationships
+Relationships

-Notes

~0005122

votdev (administrator)

As far as i see is this file managed by the hdparm package, right? In this case it is not possible to patch the package, the OMV project does not maintain Debian packages. If you want to see your patch to be published, you need to report it to the Debian project at https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=hdparm;dist=unstable.
+Notes

-Issue History
Date Modified Username Field Change
2018-02-02 01:49 ihaz New Issue
2018-02-02 01:49 ihaz Status new => assigned
2018-02-02 01:49 ihaz Assigned To => votdev
2018-02-02 01:49 ihaz File Added: hdparm.patch
2018-02-02 01:49 ihaz Tag Attached: hdparm
2018-02-02 22:10 votdev Note Added: 0005122
2018-02-02 22:11 votdev Status assigned => closed
2018-02-02 22:11 votdev Resolution open => not fixable
+Issue History