[opensuse] hdparm on boot and YaST
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. Foolishly enough I managed to loose the post and I do not remember it in details. I googled for over an hour now and I cannot come across it any more. Anybody can make a suggestion here, please? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, Jan 18, 2016 at 6:24 PM, Juan R. de Silva <juan.r.d.silva@gmail.com> 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.
Foolishly enough I managed to loose the post and I do not remember it in details. I googled for over an hour now and I cannot come across it any more.
Anybody can make a suggestion here, please?
Are you looking for the functionality of storage-fixup: https://build.opensuse.org/package/show/openSUSE:Factory/storage-fixup If so, it is available for versions of openSUSE as far as I know. (zypper in storage-fixup) You may need to edit the config file to add your drive info to the database of drives. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 18 Jan 2016 19:00:53 -0500, Greg Freemyer wrote:
On Mon, Jan 18, 2016 at 6:24 PM, Juan R. de Silva <juan.r.d.silva@gmail.com> 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.
Foolishly enough I managed to loose the post and I do not remember it in details. I googled for over an hour now and I cannot come across it any more.
Anybody can make a suggestion here, please?
Are you looking for the functionality of storage-fixup:
https://build.opensuse.org/package/show/openSUSE:Factory/storage-fixup
If so, it is available for versions of openSUSE as far as I know. (zypper in storage-fixup)
You may need to edit the config file to add your drive info to the database of drives.
Yes, basically I do need to set my HDD Advanced Power Management value to 254 and to make it persistent through reboot. However, I saw a much simpler and effective solution than that. There are other ways actually to do it, e.g. using systemd utils. But I saw a really nice and simple solution just by setting it in YaST, as I stated, and I would prefer it to any other solution I've seen suggested so far. I can stop blaming myself for loosing that link. :-( Thanks anyway. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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 -- Per Jessen, Zürich (-2.9°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----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 <lslezak@suse.cz> # # System script for enabling/disabling IDE DMA mode # # The script takes the first command line parameter and sets the configured DMA # mode up. If the device is not configured in DEVICES_FORCE_IDE_DMA variable DMA # status is not changed. # /usr/bin/logger -t idedma.sh -p daemon.warn "Entry point" HDPARM=/usr/sbin/hdparm test -x $HDPARM || exit 5 # read values from sysconfig . /etc/sysconfig/ide /usr/bin/logger -t idedma.sh -p daemon.warn "DEVICES_FORCE_IDE_DMA=$DEVICES_FORCE_IDE_DMA" - ----------------------++- And I see nothing in the log, so it does not run. Perhaps it does only on boot? - -- Cheers, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlghPg4ACgkQtTMYHG2NR9VQ7gCcDFfS7bDCPEDE8vIbHTpAvEPP E5kAni56w3mYCRvGLcF6IJC5+iwa8nmG =5vVc -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-11-08 03:53, Carlos E. R. wrote:
And I see nothing in the log, so it does not run. Perhaps it does only on boot?
I know why it does not run. cer@Telcontar:~> cat /usr/lib/udev/rules.d/56-idedma.rules # start idedma script for each added IDE device ACTION=="add", SUBSYSTEM=="block", KERNEL=="hd*[!0-9]", RUN+="/lib/udev/idedma.sh $env{DEVNAME}" The "hd" part needs be "sd". So perhaps: ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd*[!0-9]", RUN+="/lib/udev/idedma.sh $env{DEVNAME}" may run. I have modified my machine accordingly, but I don't know if I have to do something to have the rules reread. No, it runs! I see in my log, when hot plugin a hard disk: <3.3> 2016-11-08 04:27:24 Telcontar systemd-udevd 20601 - - failed to execute '/lib/udev/idedma.sh' '/lib/udev/idedma.sh /dev/sdf': No such file or directory Ah. It has to be: ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd*[!0-9]", RUN+="/usr/lib/udev/idedma.sh $env{DEVNAME}" I need to modify /usr/lib/udev/idedma.sh a bit more to my liking. I see some errors. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
participants (4)
-
Carlos E. R.
-
Greg Freemyer
-
Juan R. de Silva
-
Per Jessen