Operating System - HP-UX
1748003 Members
4522 Online
108757 Solutions
New Discussion

Re: issue replacing a defective non boot mirrored disk

 
SOLVED
Go to solution
meekrob
Super Advisor

issue replacing a defective non boot mirrored disk

Hi All,

lately we had a defective HDD on HP9000 L3000 server and that HDD was part of a mirrored VG01 volume group.

we replaced the defective disk by another new disk having same characteristics and issue the commands with steps below:

1- unmirroring (or breaking the mirror)


root# lvdisplay -k -v /dev/vg01/lvolx

 

root# lvreduce -k -m 0 /dev/vg01/lvolx 0

 

 

2- updating lvmtab

root#  ioscan -fnC disk
Class     I  H/W Path     Driver S/W State   H/W Type     Description
=====================================================================
disk      0  0/0/1/0.1.0  sdisk CLAIMED     DEVICE       HP      DVD-ROM 305
                         /dev/dsk/c0t1d0   /dev/rdsk/c0t1d0
disk      1  0/0/1/1.0.0  sdisk CLAIMED     DEVICE       HP 73.4GST373453LC
                         /dev/dsk/c1t0d0   /dev/rdsk/c1t0d0
disk      2  0/0/1/1.2.0  sdisk CLAIMED     DEVICE       HP 36.4GST336754LC
                         /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0
disk      4  0/0/2/0.0.0  sdisk CLAIMED     DEVICE       HP 73.4GMAU3073NC
                         /dev/dsk/c2t0d0   /dev/rdsk/c2t0d0
disk      3  0/0/2/0.2.0  sdisk CLAIMED     DEVICE       HP 36.4GST336754LC
                         /dev/dsk/c2t2d0   /dev/rdsk/c2t2d0

 

 output after issuing vgscan -v :
root# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c2t0d0

 

3- PV creation using c1t0d0

root#  pvcreate -f /dev/rdsk/c1t0d0
Note that after isuuing the "pvcreate" command, no output is shown!

 

4- extending VG01 :
root# vgextend /dev/vg01 /dev/dsk/c1t0d0
vgextend: Couldn't open physical volume "/dev/dsk/c1t0d0":
Device busy

 

Any help is much appreciated.

8 REPLIES 8
Thierry D
Valued Contributor

Re: issue replacing a defective non boot mirrored disk

Hi,

have you vgreduce the disk from the VG with its pvkey once you removed the mirror ?

What about pvdisplay on the disk, does it show something  ?

 

Regards,

Thierry

 

meekrob
Super Advisor

Re: issue replacing a defective non boot mirrored disk

Hi,

 

the fact is that im helping a colleague of mine on a distant site, i tried to ssh to the server and i noticed that he already "vgreduced" the disk from VG01 as the VG01 is a mirrored VG constituted from c2t0d0 (which is OK) and c1t0d0 (which is showing problems) and when i issued the following command:

#pvdisplay /dev/dsk/c2t0d0     i had the following output:

PV Name    /dev/dsk/c2t0d0

VG Name   /dev/vg01

....etc ...  and note that i did not get any Alternate link for c1t0d0.

In addidtion, when i did the following:

#diskinfo /dev/rdsk/c1t0d0     it showed that its corresponding size is 0 Kbytes  however it is CLAIMED via ioscan -fnC disk.

i tried to mediainit the disk, which ended with a failure so it seems that the new delivered disk is also defective.

In that case what is the procedure to follow after i got delivered another disk?

 

Thanks in advance

Patrick Wallek
Honored Contributor

Re: issue replacing a defective non boot mirrored disk

If the size is 0 bytes the disk is definitely toast.

 

Once you have replaced the disk again, just proceed as if you were mirroring the contents of that VG for the first time.

 

pvcreate the disk

vgextend the disk into the VG.

lvextend the LVs so that they are mirrored to that disk.

meekrob
Super Advisor

Re: issue replacing a defective non boot mirrored disk

OK i will do so meanwhile i will be waiting the disk to be delivered.

 

Many Thanks

Robert_Jewell
Honored Contributor

Re: issue replacing a defective non boot mirrored disk

Unless your patch levels are low, you should be able to save yourself some steps in the future by using pvchange instead of having to break and create the mirrors.

 

Run # pvchange -?

 

If you note the option -a Availability you can run pvchange to disable the device from LVM:

   # pvchange -a N /dev/dsk/c1t1d0

  Replace the disk.

   # ioscan -fnC disk     (be sure the new disk is seen)

   # pvchange -a y /dev/dsk/c1t1d0

   # vgcfgrestore -v vg01 /dev/rdsk/c1t1d0

   # vgchange -a y vg01

   # vgsync vg01

 

-Bob

 

 

----------------
Was this helpful? Like this post by giving me a thumbs up below!
meekrob
Super Advisor

Re: issue replacing a defective non boot mirrored disk

Hi,

 

thanks for the reply, however, in this situation and as the mirrored VG is already reduced do i proceed by "vgcfgrestore" in that case  (after receiving the new disk) or do i proceed by re-mirroring the whole VG from beginning once again?

 

Thanks in advance

Robert_Jewell
Honored Contributor
Solution

Re: issue replacing a defective non boot mirrored disk

You would run vgcfgrestore if the VG is configured to include that disk.  If you only ran lvreduce and not vgreduce, then you should run vgcfgrestore to rebuild the VGRA data back to the new disk.   If you completely removed that disk device from the VG, then simply start over with pvcreate, vgextend, etc.

 

Not sure?   Run strings /etc/lvmtab and vgcfgrestore -l -n vg0x.conf

 

EDIT:  You will find the following link to the document "When Good Disks Go Bad" useful I am sure:

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
meekrob
Super Advisor

Re: issue replacing a defective non boot mirrored disk

Many Thanks Bob and to all of you for your precious help.

Thread considered closed.