-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2016-01-19 at 08:38 +0100, Per Jessen wrote:
Juan R. de Silva wrote:
About a month ago I run a cross a post in forums showing the way to run something like 'hdparm -B 254 /dev/sda' upon boot by simply setting some parameter in YaST.
Yes, you should be able to do that with sysconfig/ide:DEVICES_FORCE_IDE_DMA which YaST manipulates. I'm not sure which YaST module, presumably something hardware related. You could probably also just edit that config file.
The script that does the work is "/usr/lib/udev/idedma.sh" :
# The setting e.g. "/dev/hda:69:-c1:-m16:-u1:-W1:-A1" should be # expanded as "hdparm -d 1 -X 69 -c1 -m16 -u1 -W1 -A1 /dev/hda"
I haven't tried it, but it sounds like you might just need this:
DEVICES_FORCE_IDE_DMA="/dev/sda::-B254"
However, that script is apparently only applied for /dev/hdx devices:
/usr/lib/udev/rules.d/56-idedma.rules
I'm doing a check on this, after a thread on nntp reminded me of it. The
syntax was improved, but was undocumented:
# The setting e.g. "/dev/hda:69:-c1:-m16:-u1:-W1:-A1" should be
# expanded as "hdparm -d 1 -X 69 -c1 -m16 -u1 -W1 -A1 /dev/hda"
And I have in mine this:
#CER: 20141206
DEVICES_FORCE_IDE_DMA="/dev/sda:-S220 /dev/sdb:-S220 /dev/sdc:-S220 /dev/sdd:-S220 /dev/sde:-S220 /dev/sdf:-S220"
which makes me suppose that at the time I thought or verified that
/dev/sda worked. However, as we know, those names are not "stable". In
my computer, they aren't.
Another issue is that I do not know when that script runs. It does not
run on hotplug of a new disk, I verified. It also has to run on return
from hibernation.
I modified the script in order to find out if it does something or not, writing to the log:
/usr/lib/udev/idedma.sh:
+++----------------------
#! /bin/sh
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany
#
# Author: Ladislav Slezak