How to break the mirror and change root disk?
Breaking mirror.
Need to make sure first that we know which mirror to break.
I have root disks mirrored in which /dev/dsk/c0t0d0 is mirrored to the disk /dev/dsk/c1t1d1 and I want to replace the disk /dev/dsk/c1t1td1 by the disk /dev/dsk/c2t2d2 which is a free disk ann not being used and is same or bigger in size than /dev/dsk/c1t1d1
To remove the Mirror Extents from the disk /dev/dsk/c1t1d1,
for i in /dev/vg00/lv*
do
lvreduce -m 0 $i /dev/dsk/c1t1d1
done
lvlnboot -vR : update the LVLNBOOT information.
vgreduce /dev/vg00 /dev/dsk/c1t1d1
The above removes the disk from the VG rootvg vg00
Add the new disk and mirror the LVs to the new disk.
The below is for a PA-RISC system, for Itanium Systems there is an EFI partition to be present on the root disk and the process is slightly different.
ioscan -fnC disk
diskinfo -b /dev/rdsk/c2t2d2 : verify the size of the new disk to which mirroring will go.
pvcreate -B /dev/rdsk/c2t2d2
mkboot -l /dev/rdsk/c2t2d2
mkboot -a "hpux -lq" /dev/rdsk/c2t2d2
vgextend /dev/vg00 /dev/dsk/c2t2d2
for i in /dev/vg00/lv*
do
lvextend -m 1 $i /dev/dsk/c2t2d2
done
The above may take substantial time.
Once the mirror completes update the lvlnboot and /stand/bootconf
lvlnboot -vR
Edit the line pertatining to older /dev/dsk/c1t1d1 and replace that with /dev/dsk/c2t2d2
No comments:
Post a Comment