LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2003, 12:22 AM   #1
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Rep: Reputation: 15
easy questions - mounting and hdparm


ok, first mounting. i have read that in order to mount something "semi-permanently" you need to edit etc/fstab. I did this, but i still have to mount the partition everytime i want to browse (etc.) it. when i cd to /mnt, the directory name is there (/halfpint), but like i said i still have to run:

mount -t vfat /dev/hdb1 /mnt/halfpint

every time. this is my setting in fstab:

/dev/hdb1 /mnt/halfpint vfat defaults,umask=000 0 2

maybe this is what is meant by "semi-permanently?" is there a way to mount it permanently? "forever?"


ok, now hdparm. i've fiddled around quite a bit with the different option/settings (right now using hdparm -X69 -d1 -c3 /dev/hda) and tested them all, for example:

/dev/hda:
multcount = 16 (on)
IO_support = 3 (32-bit w/sync)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 4865/255/63, sectors = 78165360, start = 0
[root@localhost root]# hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.82 seconds =156.10 MB/sec
Timing buffered disk reads: 64 MB in 1.80 seconds = 35.56 MB/sec

which i feel is pretty good - and probably as good as it's gonna get. but, now comes the time to make it permanent. i think i have to edit /etc/sysconfig/harddisks? this file looks like this at the last line:

EXTRA_PARAMS=

all the rest above this is #notes etc. my question is really stupid, but do i put the settings like this:

EXTRA_PARAMS=hdparm -X69 -d1 -c3 /dev/hda

or:

EXTRA_PARAMS=
hdparm -X69 -d1 -c3 /dev/hda

or without the word hdparm? i know this is dumb, but i'm scared i'll mess up - it's my only box and i don't want to start over.

thanks

m
 
Old 09-06-2003, 01:18 AM   #2
sud_crow
Member
 
Registered: Aug 2003
Location: Argentina
Distribution: Arch 0.7
Posts: 41

Rep: Reputation: 15
Hi,



hdparm:
first of all, before executing with all those flags hdparm, you should run the bench first (hdparm -Tt /device) and see whats the improvement. Also, read the man page for hdparm, look at this:

Quote:
With systems which support
UltraDMA burst timings, -X udma2 is used to select UltraDMA
mode2 transfers (you'll need to prepare the chipset for UltraDMA
beforehand). Apart from that, use of this flag is seldom neces-
sary since most/all modern IDE drives default to their fastest
PIO transfer mode at power-on. Fiddling with this can be both
needless and risky. On drives which support alternate transfer
modes, -X can be used to switch the mode of the drive only.
Prior to changing the transfer mode, the IDE interface should be
jumpered or programmed (see -p flag) for the new mode setting to
prevent loss and/or corruption of data. Use this with extreme
caution!

and for fstab, here is mine.

Quote:
/dev/hda1 /mnt/windows vfat iocharset=iso8859-15,codepage=850,umask=0 0 0
the iso thing has to do with localization (language and keys) the codepage, i dont know for sure, but i know windows use them either, and for umask, i have to split the zeros...

hope it helps, and watchout what you do with hdparm, can lead to data corruption or even brake your hd...
 
Old 09-06-2003, 08:33 AM   #3
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
ok first...as of the hdparm command, if the setting doesn't stay on the device then put it in your rc.local or rc.sysinit file which is located in the /etc/rc.d folder for it will execute everytime at bootup....just type it to the file, as is, just like you type it in a terminal...

and before i say anything about the fstab i have to point this out::
Quote:
......,and for umask,i have to split the zeros...
them last two zeros have a different meaning....
The lines of the fstab file contain device, mount point, type, options, and two numbers. The first number is used for backup purposes, it gives the number of days between backups, should be zero for swap partitions. The second number is used by fsck as a pass number. The program fsck checks existing file systems..
so as you see them last two numbers are for something totally different from your umask value, so your file should say umask=000 , not just ..=0 0 0 ...
anyways mercutio, i am not sure why the line in your fstab is not mounting your drive...i personally use the following ::
/dev/hdc1 /mnt/80gig vfat user,rw,exec,uid=500 0 0
the uid=INTEGER is just a different way of getting a normal user read/write access to the mounted drive...it specifies the UID (user id) of the user directly...
anyways, if you could, i would like you to try putting something like what i mentioned in your fstab and see if it works...and if it does, then its obviously something wrong with what you had....and that is something i don't know right now..
 
Old 09-06-2003, 06:38 PM   #4
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
Thanks DrOzz. Yeah, you are right about "The second number is used by fsck as a pass number. The program fsck checks existing file systems.." from the man pages it explains about the last two numbers - and apparently the very last allows fsck to run the drives in parallel or something like that. that is why i use "0 2". apparently my problem was i had noauto as an option. this made the directory visible in the /mnt, but would not show internal files and directories w/out running the mount command from above. i guess when i edited fstab i forgot to delete noauto (i think this was the problem anyway). but, all is working now thank you.

I'm still too afraid to edit the hdparm settings. please take a look above at my first post and tell me what you think. sud_crow, if you would have read what i wrote you'd have seen that i tested my setting(s) over and over - i even put in a sample result.
quoting myself:

"/dev/hda:
Timing buffer-cache reads: 128 MB in 0.82 seconds =156.10 MB/sec
Timing buffered disk reads: 64 MB in 1.80 seconds = 35.56 MB/sec"

anyway, my question really isn't about what all the options are etc (it's all in the man), but how exactly to edit the file that makes the setting permanent (which is a little more vague). my final chosen values:

hdparm -X69 -d1 -c3 /dev/hda

which gives me:

/dev/hda:
multcount = 16 (on)
IO_support = 3 (32-bit w/sync)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 4865/255/63, sectors = 78165360, start = 0

and you already saw one test of the performance. i just would like to know where to type it in PLEASE see above post.

thanks,

m
 
Old 09-09-2003, 02:41 AM   #5
sud_crow
Member
 
Registered: Aug 2003
Location: Argentina
Distribution: Arch 0.7
Posts: 41

Rep: Reputation: 15
Hi,

I know you placed a sample, but that didnt meant (to me at least) that you where having some kind of improvement over the default boot parametrs. sorry i didnt got it from the start!!

if you are sure about the improvement, then follow the instruccionsn drozz gave:

Quote:
ok first...as of the hdparm command, if the setting doesn't stay on the device then put it in your rc.local or rc.sysinit file which is located in the /etc/rc.d folder for it will execute everytime at bootup....just type it to the file, as is, just like you type it in a terminal...
this is what you are asking?? you hav to type the hdparm....bla bla there so it gets executed at boot time... thats it!

cya!
 
Old 09-09-2003, 11:06 PM   #6
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
hey sud_crow, sorry i wasn't trying to be mean. i just thought you skipped what i wrote or something, sorry.

as for the hdparm, i have not done it yet. inside my "system?" files (i don't remember which one) it says to edit this /etc/sysconfig/harddisks, to make the hdparm settings permanent. it doesn't mention the file DrOzz is talking about. i'll post the whole file here:

# These options are used to tune the hard drives -
# read the hdparm man page for more information

# Set this to 1 to enable DMA. This might cause some
# data corruption on certain chipset / hard drive
# combinations. This is used with the "-d" option

# USE_DMA=1

# Multiple sector I/O. a feature of most modern IDE hard drives,
# permitting the transfer of multiple sectors per I/O interrupt,
# rather than the usual one sector per interrupt. When this feature
# is enabled, it typically reduces operating system overhead for disk
# I/O by 30-50%. On many systems, it also provides increased data
# throughput of anywhere from 5% to 50%. Some drives, however (most
# notably the WD Caviar series), seem to run slower with multiple mode
# enabled. Under rare circumstances, such failures can result in
# massive filesystem corruption. USE WITH CAUTION AND BACKUP.
# This is the sector count for multiple sector I/O - the "-m" option
#
# MULTIPLE_IO=16

# (E)IDE 32-bit I/O support (to interface card)
#
# EIDE_32BIT=3

# Enable drive read-lookahead
#
# LOOKAHEAD=1

# Add extra parameters here if wanted
# On reasonably new hardware, you may want to try -X66, -X67 or -X68
# Other flags you might want to experiment with are -u1, -a and -m
# See the hdparm manpage (man hdparm) for details and more options.
#
EXTRA_PARAMS=



as you can see, the last line wants the settings. now i know from what you told me that i type the whole hdparm X69......... but, do i put it like this ...PARAMS=hdparm X69...? or put it on the next line? i know this may be a stupid question, but i have heard of ridiculous things like that when mounting drives on rh8, if you used the [spacebar] instead of [tab], the os would mess up or something. anyway, just wanted to check it out before i tried to do it.

thank you,

m
 
Old 09-11-2003, 04:04 AM   #7
sud_crow
Member
 
Registered: Aug 2003
Location: Argentina
Distribution: Arch 0.7
Posts: 41

Rep: Reputation: 15
Hey!,

No prob! no offence made man!

For what i got of this hole thread, in PARAMS= you shouldnt write hdparm ... bla bla... but the actual extra parameters you want.

About the file that you name ".../harddisks" i've no idea about how to make that file make the changes, unless hdparm reads the opcions from it, and thats the same as running from console:

[user@pc]$ hdparm all-the-paramters-you-want

i mean, unless hdparm is loaded at boot time, and seeks for that file for the parameters, then that file doesnt seem of much use to me. But hey! better modify it to your needs, and if is superflows, then fine, it wont hurt.

What drooz sayd, and thats normal, is to run "hdparm all-the-params" at boot time from one of those scripts, thats made by writing the same code as in console in a line in the file named.

i would try this:

vim /etc/rc.local

add line:

Quote:
hdparm all-the-parameters
and reboot, if it doesnt work, add the line to /etc/rc.sysinit at the bottom, just for precaution.

Hope you get it working... and im still waiting those comparisons beatween default boot and with hdparm optimized!!! (want to know how much juice you can take of the hd with that utility)
 
Old 09-11-2003, 01:24 PM   #8
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
i don't remember if this was the first bench tests i did, but it is an early one for sure:

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.85 seconds =150.59 MB/sec
Timing buffered disk reads: 64 MB in 1.94 seconds = 32.99 MB/sec

here's one of the last ones (that i already posted":

"/dev/hda:
Timing buffer-cache reads: 128 MB in 0.82 seconds =156.10 MB/sec
Timing buffered disk reads: 64 MB in 1.80 seconds = 35.56 MB/sec"

so you can see it did go up some. It not some awesome gain, but hey it was overall better. i am about to edit the (edit)/etc/rc.local file now. i hope it works.

thanks,

m

(edit) ps BTW this is what the rc.local file reads:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

does this look like the right file to edit? the other one is posted above.

Last edited by mercutio; 09-11-2003 at 01:31 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy questions..... Eux General 6 06-28-2005 09:52 AM
Some (what should be) easy questions jlacroix Mandriva 6 07-08-2004 10:47 PM
Mounting DOS partition ... easy question. jrpretz Linux - Newbie 3 07-20-2003 10:34 PM
Three Easy Questions gauge73 Linux - Networking 4 07-14-2003 06:23 PM
Several easy questions rdaves@earthlink.net Linux - Newbie 2 06-08-2001 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration