Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Wednesday, December 17, 2014

Extending root FS (mirrored) online - hpux

Extending root FS (mirrored) online

mysrv:/> lvdisplay /dev/vg00/lvol1 |grep -i allocation
Allocation                  strict/contiguous

mysrv:/> lvdisplay /dev/vg00/lvol2 |grep -i allocation
Allocation                  strict/contiguous


mysrv:/> lvdisplay /dev/vg00/lvol3 |grep -i allocation
Allocation                  strict/contiguous


mysrv:/> lvdisplay /dev/vg00/lvol4 |grep -i allocation
Allocation                  strict

if strict policy then LVM helps to avoid creating multiple mirror copies on a single bus.
contiguous - means PEs are adjoining/touching.


This method can be used on HP-UX 11.11 / 11.23 with Legacy Addressing (/dev/dsk/c#t#d#)

HP-UX versions prior to 11.31:


Here we want to extend FS / or LV /dev/vg00/lvol3

#bdf /

1. Take ignite backup or have full backup of vg00

2. Identify primary disk and secondary/alternate disk:

2.1 # setboot
2.2 # lvlnboot -v
2.3 #cat /stand/bootconf

   primary disk= /dev/dsk/c0t8d0
   secondary/alternate disk = /dev/dsk/c1t8d1

3. Reduce the mirror on every LV under vg00; if we have 8 lvs in vg00 then remove mirror from those LVS

#lvreduce -m 0 /dev/vg00/lvol1
#lvreduce -m 0 /dev/vg00/lvol2

.
.
#lvreduce -m 0 /dev/vg00/lvol8

4. Remove the mirror disk/secondary disk (/dev/dsk/c1t8d1) from vg00

#vgreduce vg00 /dev/dsk/c1t8d1

5. Create a PV on secondary disk

#pvcreate /dev/rdsk/c1t8d1

6. Add that PV in vg00

#vgextend vg00 /dev/dsk/c1t8d1

7. Move the PEs of all the Lvs in vg00 other than lvol1, lvol2 & lvol3 as they are contiguous in nature on secondary disk(/dev/dsk/c1t8d1)

Note : here we are making space on primary disk so moved all LEs from lovl4 .... to secondary disk.

#pvmove -n /dev/vg00/lvol4 /dev/dsk/c0t8d0 /dev/dsk/c1t8d1
#pvmove -n /dev/vg00/lvol5 /dev/dsk/c0t8d0 /dev/dsk/c1t8d1
.
.

8. Extend the root FS.

#lvextend -L {size in MB} /dev/vg00/lvol3
#fsadm -b {size in MB}m /

9.Move back all LE's of all LVs from secondary disk to primary disk.

#pvmove -n /dev/vg00/lvol4 /dev/dsk/c1t8d1 /dev/dsk/c0t8d0
#pvmove -n /dev/vg00/lvol5 /dev/dsk/c1t8d1 /dev/dsk/c0t8d0
.
.

10. Remove secondary disk from vg00 so we can make the disk as bootable disk.

vgreduce /dev/vg00 /dev/dsk/c1t8d1

11.Create a boot disk.

#pvcreate -B /dev/rdsk/c1t8d1

#mkboot -a "hpux -lq" /dev/rdsk/c1t8d1

{Change the AUTO file to hpux -lq so the host can boot without quorum if one mirror disk fails.}

12. Extend the root VG with new boot disk

#vgextend /dev/vg00 /dev/dsk/c1t8d1

13. Mirror all Lvs present on primary disk to secondary disk.

#lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t8d1
#lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t8d1
.
.
.
#lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c1t8d1

14. check if root,boot,swap& dump are properly configured.

#lvlnboot -v

15. Verify low quorum is set for both disk

#lifcp /dev/dsk/c0t8d0:AUTO-
#lifcp /dev/dsk/c1t8d1:AUTO-

16. run bdf command and compare old bdf output with current bdf output

#bdf /



Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**




No comments:

Post a Comment