Operating System - HP-UX
1833863 Members
1869 Online
110063 Solutions
New Discussion

Re: Command to exercise a disk on console

 
SOLVED
Go to solution
TYP3R
Frequent Advisor

Command to exercise a disk on console

Hi there Guru's
Is there a console command to exercise a disk with read and write permission ? I know that i can do it in STM but i want to add the exercise process of disk testing in a script that i've been given..

Also in the scipt it uses the dd commands to write zeros but the results shows an I/O error. Does the error occur as the first 16 sectors are read-only ? would the following get rid of the error ?

from:

dd if=/dev/zero of=/dev/rdsk/c#t#d# bs=512k

To:

dd if=/dev/zero of=/dev/rdsk/c#t#d# bs=512k oseek=1

Thanks in Advance

Will
12 REPLIES 12
Robert-Jan Goossens
Honored Contributor

Re: Command to exercise a disk on console

Hi,

add the noerror option and use the urandom if you have.

# dd if=/dev/urandom of=/dev/rdsk/c#t#d# bs=1024k conv=noerror

# dd if=/dev/null of=/dev/rdsk/c#t#d# bs=1024k conv=noerror

Regards,
Robert-Jan
Hein van den Heuvel
Honored Contributor

Re: Command to exercise a disk on console

Will,

Console commands are platform dependent.
Please indicate which specific box/architecture?!

Robert-Jan,

# dd if=/dev/urandom

The 'random' device is very slow / cpu intensive.
Writing zeroes is good enough to test write-ability.

# dd if=/dev/null

That gives and end-of-device rigth away.
You want to use /dev/zero like Will already indicated.

Cheers,
Hein.





TYP3R
Frequent Advisor

Re: Command to exercise a disk on console

Thanks for the replys, I'll check them out when i get to work.

Hein - I'm using the L1000 & RP7400 (Nclass), both with HP-UX 11. I assume that it was software based and only need to tell it which disk i want to exercise with the read and write permission ?

Will
TYP3R
Frequent Advisor

Re: Command to exercise a disk on console

Hi Robert-Jan

I've used the conv=noerror on the dd command but it still giving me the I/O error after it finished testing the disk.

Also i get the "/dev/urandom: No such file or directory" when inputting the /dev/urandom on the dd command.

Is there a way to put it into a file or is it the same principles with the /dev/zero ? eg:

mknod /dev/zero c 3 0x00003
chmod 444 /dev/zero


Will
Robert-Jan Goossens
Honored Contributor
Solution

Re: Command to exercise a disk on console

Hi Will,

HP-UX Strong Random Number Generator

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I

Could you run a "dskinfo /dev/rdsk/cxtydz" on the device file of the diks?

Robert-Jan
TYP3R
Frequent Advisor

Re: Command to exercise a disk on console

Hi Robert-Jan

After reading that weblink, It's not what i really looking for, All i want is to write zero's all over the disk randomly instead from begining - end like /dev/zero does. Wondered is this possible as a customer wants how it write zeros in this way.

Will
TYP3R
Frequent Advisor

Re: Command to exercise a disk on console

Robert-Jan

i do get some info of the disk when i

diskinfo /dev/rdsk/c#t#d#

But about the "conv=noerror" this still give me an I/O error what else am i doing wrong ?

Will
Robert-Jan Goossens
Honored Contributor

Re: Command to exercise a disk on console

Will,

did this disk have any bad sectors?

That would explain the io-error.

Robert-Jan
TYP3R
Frequent Advisor

Re: Command to exercise a disk on console

Robert-Jan

Only get the error on the /dev/zero but no errors on the /dev/null part of the test

Will
Robert-Jan Goossens
Honored Contributor

Re: Command to exercise a disk on console

Will,

/dev/zero should have been 0x000004.

# mknod /dev/zero c 3 0x000004

Regards,
Robert-Jan
Dennis Handly
Acclaimed Contributor

Re: Command to exercise a disk on console

>Only get the error on the /dev/zero but no errors on the /dev/null part of the test

Naturally, /dev/null didn't do anything.
You may get an error on /dev/zero because you write off the end of the destination file?
TYP3R
Frequent Advisor

Re: Command to exercise a disk on console

Dennis

Are you going to help out or are you going to moan about what other people want to do ? I'm only here to get help on why and how to solve these problem if theres a solution.

So if your not going to help and moan like a girl then i suggest you shut up