Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/conf.d/hdparm help or documentation?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Mon Nov 22, 2004 8:49 pm    Post subject: /etc/conf.d/hdparm help or documentation? Reply with quote

I'm trying to find a bit of documentation for /etc/conf.d/hdparm. I believe the default file looks like this:
Code:
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-conf.d.3,v 1.2 2004/09/06 02:17:08 swegener Exp $

# You can either set hdparm arguments for each drive using hdX_args,
# discX_args, cdromX_args and genericX_args, e.g.
#
# hda_args="-d1 -X66"
# disc1_args="-d1"
# cdrom0_args="-d1"

# or, you can set hdparm options for ALL drives using all_args, e.g.
#
all_args="-d1"

I'm trying to determine two things:
1) What is the difference between hdX_args and diskX_args? Obviously hdX_args refers to a hard drive as a whole. Does discX_args refer to a specific partition?

2) With the all_args variable can you use that to specify settings that you want used across all drives and then individually specify specific settings for just one disk? For example, does setting hda_args nullify any settings also in all_args? What is the relationship between these variables?

Thanks for any help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54834
Location: 56N 3W

PostPosted: Mon Nov 22, 2004 9:31 pm    Post subject: Reply with quote

t011,

Does
Code:
man hdparm
help?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Mon Nov 22, 2004 10:27 pm    Post subject: Reply with quote

NeddySeagoon wrote:
t011,

Does
Code:
man hdparm
help?


Not really. I'm not having problems with hdparm. I can use hdparm to manage my drives settings fine after boot. But I'd like to be able to set them automatically during boot. And since this is a relatively important thing I'd like to know exactly what I'm doing before hand.

I'm inquiring about the syntax of a Gentoo configuration file. I believe the file is relatively distribution specific, although Gentoo might have copied some of the syntax from some other distribution. So what I need is a clarification about what the variables in the file do. This info is likely going to come from a Gentoo developer or possibly someone who's set these before. But maybe I'm not correctly reading man hdparm. Is there a specific section of the man page that I'm missing?
Back to top
View user's profile Send private message
shonglf
n00b
n00b


Joined: 24 Nov 2003
Posts: 64

PostPosted: Mon Nov 22, 2004 11:27 pm    Post subject: There may be a manpage for hdparm.conf as well. Reply with quote

(nm)
Back to top
View user's profile Send private message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Tue Nov 23, 2004 2:33 am    Post subject: Reply with quote

shonglf wrote:
There may be a manpage for hdparm.conf as well.

A manpage for the configuration file is exactly what I'm looking for. But on my system, I haven't found one. And my attempts to google for hdparm.conf have only yielded info on Debian systems. I'm going to keep looking, but this is such an important thing that it would be nice if there was a bit better documentation for it.
Back to top
View user's profile Send private message
fifo
Guru
Guru


Joined: 14 Jan 2003
Posts: 437

PostPosted: Tue Nov 23, 2004 3:47 am    Post subject: Reply with quote

I realise it might not be what you call documentation, but you can always do "less /etc/init.d/hdparm" and just read what the init script does with the configuration parameters.
Back to top
View user's profile Send private message
H3g3m0n
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2002
Posts: 97

PostPosted: Tue Nov 23, 2004 7:06 am    Post subject: Reply with quote

actually it says right at the top of /etc/init.d/hdparm
Code:
# METHOD
# ------
# if /dev/ide exists, find all block devices beneath it named disc, cd, or
# generic.
#
# for the disc and cd ones, if there is a a matching /dev/hdX symlink and
# hdX_args is set in the config file, use hdX_args.  otherwise, if there is a
# matching /dev/discs/discX or /dev/cdroms/cdromX symlink, and discX_args or
# cdromX_args is set in the config file, use discX_args / cdromX_args.  finally,
# if all_args is set in the config file, use that.
#
# for the generic ones, sort them and look for genericX_args in the config file
# or use all_args.
#
# if /dev/ide does not exist, check the /dev/hdX entries, and see which ones
# correspond to real devices by opening them for reading.  then check hdX_args
# and all_args in the config file.
#
# for each device considered, if no args are found in the config file, do not
# run hdparm.


It doesn't exactly explain what disc is for, but i assume that it refers to harddiscs only like cdrom refers to cdroms only but hdX can refer to either a cdrom or a hdd. This way if you remove a HDD cdrom2 is still cdrom2 but if you removed hda then hdc would become hdb.

I just have
Code:
all_args="-d1 -a8 -u1 -c1 -X64"

Although the only IDE device I have is a dvdburner the rest of my hdds are SATA but those settings should probally work for most newer harddrives.
Back to top
View user's profile Send private message
t011
Tux's lil' helper
Tux's lil' helper


Joined: 05 Sep 2002
Posts: 102

PostPosted: Tue Nov 23, 2004 4:33 pm    Post subject: Reply with quote

Thanks for the tip on the documentation in /etc/init.d/hdparm, that helps somewhat. There are still a few things I'm unclear about. From the documentation, it sounds the matching is mutually exclusive in that if hdX_args is found then it is used by itself rather than adding whatever is also found in all_args. Which is fine, I just wanted to understand how the all_args wildcard works in relation to the more specific settings.

Additionally, is that true that if you were to remove hda, then hdc would become hdb? I thought it depended upon the way the drives are cabled in your box. Meaning, that could happen if you pulled the first drive attached to the IDE cable but left the second in place. The drive leter would shift up one. But hda and hdb are on one bus and hdc and hdd are on the other. I could be totally wrong about this, I'm basically just guessing. But on my machine I have hda, hdc, and hdd. No hdb, I believe because that would have to be at the end of the same cable with hda.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum