Showing results for 
Search instead for 
Did you mean: 

root vg00

Frequent Advisor

root vg00

Hi ,

I have little bit confusion which sequnce is correct for repacing the bad disk in vg00 .Pls suggest the correct sequnce

vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t5d0
vgchange -a y /dev/vg00
mkboot /dev/rdsk/c2t5d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t5d0
lvlnboot -R
vgsync /dev/vg00
1) If the disk is hot swappable, remove the disk

2) # vgreduce -f /dev/vg00

This will remove the failed disk from vg00

3) # lvlnboot -R

4) Insert the new disk

5) # ioscan -fnC disk

6) # vgcfgrestore -n /dev/vg00 /dev/rdsk/

7) # mkboot /dev/rdsk/devicefile

8-) # mkboot -a "hpux" /dev/rdsk/devicefile

9) # vgchange -a y /dev/vg00

10) # vgsync /dev/vg00

11) # lvlnboot -R

12) confirm with vgdisplay, lvdisplay, pvdisplay and lvlnboot.

R.K. #
Honored Contributor

Re: root vg00

Hello Kumar

All looks ok except one thing.
I dont think that "vgreduce" command is required at this place as we are not removing the disk BUT replacing it. Because if you do a vgreduce, you have to do a vgextend also and that is not mentioned in your procedure.
Well, I have a procedure (attached), see if that works fine.

Don't fix what ain't broke
sujit kumar singh
Honored Contributor

Re: root vg00

Hi Kumar,

As pointed out, tou need not do that vgreduce.

Also when you do mkboot -a to upadate the AUTO file string on the new disk try this with the follwing, only slight change form what you have written

#mkboot -l /dev/rdsk/cXtYdZ
#mkboot -a "hpux -lq /stand/vmunix"

Also after doing the vgsync, might be not all the LVs get synced, then you need to try the lvsync
#for i in /dev/vg00/lvol*
>nohup lvsync $i

Again as for the precaution after you have done lvlnboot -R
#lvlnboot -v
so that you can see that the replaced disk has caught the lvlnboot configurations.
#vi /stand/bootconf
to check that the Replaced disk has an entry over there as
l /dev/dsk/cxtydz

#setboot -a -b on -s on

to set the Alternate path as the replaced disk and set autoboot and autosearch on that to on.

sujit kumar singh
Honored Contributor

Re: root vg00


sorry for the typo

#mkboot -l /dev/rdsk/cXtYdZ
#mkboot -a "hpux -lq /stand/vmunix"

actually should read
#mkboot -l /dev/rdsk/cXtYdZ
#mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/cXtYdZ

Johnson Punniyalingam
Honored Contributor

Re: root vg00

Hi Kumar,

Please check above link and read , than proceed,

1) Remove lvol mirrors:
# lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c2t6d0
# lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t6d0
2) Remove faulty drive from vg00:
# vgreduce /dev/vg00 /dev/dsk/c2t6d0
3) Call for CE replacement of hot-swappable drive c2t6d0 at H/W path 0/0/2/1.6.0:
SCSI describe of /dev/rdsk/c2t6d0:
vendor: HP 36.4G
product id: ST336706LC
type: direct access
size: 35566480 Kbytes
bytes per sector: 512
4) When drive is replaced, add back into vg00 and make bootable:
# pvcreate -B /dev/rdsk/c2t6d0
# vgextend /dev/vg00 /dev/dsk/c2t6d0
# mkboot -l /dev/rdsk/c2t6d0
5) Re-mirror logical volumes, must be done in lvol order:
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t6d0
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t6d0
And repeat for remaining logical volumes lvol4 through lvol13.

Restoring Mirrored disk after Replacement of failed disk
Pls. take note of the steps.

Recover mirror notes:

# vgcfgrestore -n vg00 /dev/rdsk/c2t6d0
# vgchange -a y vg00
# vgsync vg00

Script to run to check status of vgsync:

while true
pvdisplay -v /dev/dsk/c1t2d0|grep stale|wc -l sleep 5 done
Problems are common to all, but attitude makes the difference