Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #203795

Re: hdparm ignoring spindown_time in config when called with by-id symlink

From Reco <recoverym4n@enotuniq.net>
Newsgroups linux.debian.user
Subject Re: hdparm ignoring spindown_time in config when called with by-id symlink
Date 2019-01-02 12:20 +0100
Message-ID <xbMJ3-5YM-13@gated-at.bofh.it> (permalink)
References <xby3n-57E-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	Hi.

On Tue, Jan 01, 2019 at 08:39:13PM +0100, Andrea Borgia wrote:
> My PC has two disks, a NVME for Debian/testing and an old 2.5 drive for an OS that shall remain nameless :)
> 
> Since the 2.5 disc isn't at all used by Linux, I figured I might as well set a very aggressive spindown time of, say, 30s and I wrote this in hdparm.conf:
>
> Then I tried checking whether hdparm would work when run via udev, with the following command:
> DEVNAME=/dev/disk/by-id/ata-Hitachi_HTS543225A7A384____E2024242DBNGWJ_ /lib/udev/hdparm  >> /tmp/hdparm.log 2>&1
> (suggestion taken from: https://stackoverflow.com/questions/49841690/hdparm-conf-settings-dont-seem-to-run-at-boot)

What about this:

DEVNAME=/dev/disk/by-id/ata-Hitachi_HTS543225A7A384____E2024242DBNGWJ_ \
sh -x /lib/udev/hdparm  >> /tmp/hdparm.log 2>&1

> Now, the questions:
> 1) am I wrong in using the by-id link to achieve a stable configuration?

You might get a race here. by-id symlinks are created by udev, so it's
possible to call hdparm udev script before actual symlink creation.


> 2) am I wrong in testing with the symlink instead of the real device name?

I'd rather remove this HDD via /sys interface as it's unused.


> 3) if not, should I file a bug on hdparm?

I've tried to reproduce your problem, but 'sh -x' invocation with your
configuration file got me this:

/sbin/hdparm -B1 -S6 \
/dev/disk/by-id/ata-Hitachi_HTS543225A7A384____E2024242DBNGWJ_

I suspect that your problem cannot be explained by hdparm bug.

Reco

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

hdparm ignoring spindown_time in config when called with by-id  symlink Andrea Borgia <andrea@borgia.bo.it> - 2019-01-01 20:40 +0100
  Re: hdparm ignoring spindown_time in config when called with by-id  symlink Reco <recoverym4n@enotuniq.net> - 2019-01-02 12:20 +0100
    Re: hdparm ignoring spindown_time in config when called with by-id  symlink Andrea Borgia <andrea@borgia.bo.it> - 2019-01-02 13:40 +0100
      Re: hdparm ignoring spindown_time in config when called with by-id  symlink Reco <recoverym4n@enotuniq.net> - 2019-01-02 14:40 +0100
        Re: hdparm ignoring spindown_time in config when called with by-id  symlink Andrea Borgia <andrea@borgia.bo.it> - 2019-01-02 16:00 +0100

csiph-web