1834034 Members
3194 Online
110063 Solutions
New Discussion

new disk

 
matthieu le corre
Occasional Advisor

new disk

I've hot-plug a new disk on my server ,
I've done a insf to create the device file ...
but I can't mksf /pvcreate / mount it ?
WHY it seems to be busy -> device busy ....

need help guys

thank for all

matthieu
Tux for all !
19 REPLIES 19
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

Have you checked whether the harddisk's SCSI ID has been set correctly and there is no SCSI conflict with another device? Does ioscan -fnCdisk shows the harddisk as claimed?

Hope this helps. Regards.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
matthieu le corre
Occasional Advisor

Re: new disk

oki ,
I have done a insf -C disk to create the device file : /dev/dsk/...
the file has been created successfully .
but when i want to acces to it via pvcreate or mkfs it told me that the device is busy !

i've try an ioscan and it see the disk perfectly ...

did i mess a step between insf and pvcreate ?

thank for all matthieu
Tux for all !
Andreas Voss
Honored Contributor

Re: new disk

Hi,

try the -f option for pvcreate ie:

pvcreate -f /dev/rdsk/c#t#d0

Regards
matthieu le corre
Occasional Advisor

Re: new disk

hum
using the -f option on pvcreate ...
dangerous isn't it ?
but do you confirm me that there's no step
between insf and pvcreate ?

understand me , i don't want to crash my server with all
the people connected behin !
and i don't want to 50Go of data ...

thank from a poor french lost in HP-UX worlld ...

matthieu
Tux for all !
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

Try fuser on both the block and character devices ie. 'fuser -u /dev/rdsk/c*d*t0' and 'fuser -u /dev/dsk/c*d*d0' to check if any process is hogging onto the device and if yes, 'ps -fp PID' to identify what exactly the process is doing.

Hope this helps. Regards.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
matthieu le corre
Occasional Advisor

Re: new disk

oki guys ,

I 've try a fuser and nothing seems to use the disk ,
I've done a pvcreate -f and the response is :
couldn't open physical volume c0tXXX
Device Busy

do you think my disk is not correctly plug ?
but the 'insf -C disk' work !

I really don't known why it fail ...
and of course the boss don't mind about problem and want solution ;(

matthieu who 's gonna shink .... ;)
Tux for all !
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

Can you perform an ll on /dev/rdsk/ and ll on /dev/dsk/ and see if there is another disk device duplicated with the same major and minor numbers?

One possibility I can think of is that this set of major and minor numbers has already been used by another device and its block device has already been mounted onto a mount-point.

Hope this helps. Regards.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

Sorry, what I meant was:

One possibility I can think of is that this set of major and minor numbers has already been used by another device and LVs have already been created in the VG housing its block device and perhaps already mounted.

Hope this helps. Regards.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
Andreas Voss
Honored Contributor

Re: new disk

Hi,

some things to check:

Query device(controller)
diskinfo /dev/rdsk/c#t#d0

Check if raw I/O works
dd if=/dev/rdsk/c#t#d0 of=/dev/null bs=1k count=1

If you get no positive respones i think you have a bad disk.
As you say you have a hot plug disk you could try to remove an reinsert the drive.

Regards
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

Can you also check your /var/adm/syslog/syslog.log for any flagged vmunix SCSI errors? Does /var/adm/syslog/syslog.log flag any errors when your pvcreate failed?

If available, try running either stm or mstm to perform an exercise test on this disk device to check its physical integrity.

Hope this helps. Regards.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
matthieu le corre
Occasional Advisor

Re: new disk

I've done a disk info -> device busy
i've done a dd -> device busy

I've re-hot-plugged the disk -> same as before

i don't understand , if the disk is bad why does insf works ?

oki let start from the beginning

1. plug the disk....................[ok]
2. ioscan -C disk ...............[ok]
3. insf -C disk ....................[ok]
4. pvcreate /dev/dsk/c0t11d0 [failed] -> device is busy

did I miss a step ?
tell me

thank for a so speedy support

matthieu
Tux for all !
matthieu le corre
Occasional Advisor

Re: new disk

and what about mediainit ?
does i need to "spred" a mediainit layer on disk ?

sorry for this stupid kestion but now i am relly lost in space ...
Tux for all !
Darrel Louis
Honored Contributor

Re: new disk

Mattieu,

If you do a pvdisplay of the disk:
pvdisplay -v /dev/rdsk/c?t?d?, is the disk bind to a VG?
Is the disk in a Raid controller or in a Mirrored environment?
If you do a strings /etc/lvmtab, do you see the disk?

Regards

Darrel
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

mediainit is usually done at factory default.

Are there any flagged errors in your syslog? Are you able to give mstm a try? Can you 'll /dev/dsk' and 'll /dev/rdsk' and check whether there is any device file conflict? Do you have lsof installed? If yes, can you try 'lsof|grep /dev/dsk/c*t*d0' or 'lsof|grep /dev/rdsk/c*t*d0'? Replace * with the respective digits.

Hope this helps. Regards.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
matthieu le corre
Occasional Advisor

Re: new disk

for darrel -> my disk is a new one just hot-plugged so it's not yet a 'lvm disk' i want it to be lvm but pvcreate failed and find it busy

for steven -> no minor/major conflict
no error in syslog

and to finish no lsof and mstm available on the server !

really i am unlucky !

thank for all
Tux for all !
Steven Sim Kok Leong
Honored Contributor

Re: new disk

Hi,

I think we have no choice but to troubleshoot by the elimination process.

1) Can you swap this disk with another disk, perform the necessary steps till pvcreate and see if it works?

2) Can you hook this disk to another system, perform the same steps and see if pvcreate on this other system works properly?

3) Perform a reboot which will perform insf etc and see if pvcreate works? If not, look at /etc/rc.log for errors during the startup process.

4) Call a HP hardware engineer down to look at your problem, get him to bring down and install the necessary diagnostics which include stm. If he cannot identify the cause of the problem, most likely he will perform stm on your harddisk to verify its integrity.

Hope this helps.

Steven Sim
Brainbench MVP for Unix Admin
http://www.brainbench.com
Ovidiu D. Raita
Valued Contributor

Re: new disk

After I read all the answers I must agree with Steven. Most likely your disk in not able to spin up. What about the disk led. Is it off or on? Is the SCSI bus terminated? If dd didn't work you cannot even read from the disk.

Ovidiu
Simple solutions to complex problems
Darrel Louis
Honored Contributor

Re: new disk

Mattieu,

As you already suggested, if this is a new disk and there is no data on it, try the following:
run mediainit to clear existing informations on the drive
$ mediainit /dev/rdsk/c?d?s?
Now, the disk has to be readied for LVM
$ pvcreate -f /dev/rdsk/c?d?t?

If this doesn't help, call the supplier of the disk or HP.

Regards

Darrel
matthieu le corre
Occasional Advisor

Re: new disk

hello from the french morning !

at this point a can't reboot the server (~ 600 users ...)
and there's no other hot-plug bay from HP there .
and no other disk to test !

-> pvcreate failed
-> mksf failed
-> diskinfo failed
-> mediainit failed
-> mount failed (this one is ok !)

all failed with message device busy ...

the only think that work is insf who has installed the device file
and ioscan who has found the disk

tell me if i am wrong but
1) scsi bus has done reset and find my disk
2) the mecanichal art of the disk is out of order ( engine or heads)

all that i can say is SH.................................T

thank all of you for a so good support !
il will call my HP vendor and I'll see .

Matthieu
Tux for all !