- How to Mirror the root disk on PA-RISC Systems HP-UX
The existing root disk on the system is /dev/rdsk/c1t1d1 and the new disk to which the mirror is to be done is /dev/dsk/c0t0td0
#ioscan – to scan the new disk say new disk is /dev/rdsk/c0t0d0
#diskinfo –b /dev/rdsk/c0t0d0 | awk ‘{print $1/1024/1024}’ – shows the new disk size in GB
The new disk should be equal to or greater than in Size than existing root disk that is to be mirrored. The existing root disk is say /dev/dsk/c1t1td1
See the size of the existing disk in GB.
#diskinfo –b /dev/rdsk/ct1t1d1| awk ‘{print $1/1024}’
Create the boot area to hold the boot utilities ( This creates the LIF Area)
#mkboot –l /dev/rdsk/c1t1td1
# mkboot -a "hpux -lq" /dev/rdsk/c1t1d1
Ensure that the boot utilities are put on the disk.
# lifls -l /dev/rdsk/c1t1d1
Ensure the auto string as per setting, read the autofile from the LIF area using lifcp
#lifcp /dev/rdsk/c1t1d1:AUTO -
The above prints the contents of the AUTO file to the STDOUT.
Make the disk bootable from LVM perspective. This allows LVM to know that this PV is bootable.
#pvcreate –B /dev/rdsk/c1t1d1
Extend the root VG to include the /dev/dsk/c1t1d1
#vgextend /dev/vg00 /dev/dsk/c1t1d1
Mirror all the LVs on existing root disk to the new disk
#for i in 0 1 2 3 4 5 6 7 8 9
>do
>lvextend –m 1 $i /dev/dsk/c1t1d1
>done
Update the LVM boot information.
lvlnboot -vR
Update the /stand/bootconf to append the line for the new disk
cat /etc/stand/bootconf
l /dev/dsk/c0t0d0
l /dev/dsk/c1t1d1
After the mirroring is complete ensure that there are no stale extents.
for in 0 1 2 3 4 5 6 7 8 9
do
lvdisplay -v /dev/vg00/lvol$i | grep -i stale | wc -l
done
This all counts should be zero.
No comments:
Post a Comment