From Wiki-UX.info

Wiki-UX / Logical Volume Manager / How to extend stand file system in LVM maintenance mode
Jump to: navigation, search

How to extend stand file system in LVM maintenance mode

Abstract

This article presents a method to extend /stand file system on a LVM boot disk in LVM maintenance mode without using Ignite-UX back to rebuild the system.

The safest procedure to extend or resize the swap, stand and root (/) file systems is using Ignite-UX to create a current snapshot of the boot volume group. With this image, the system can be re ignited in Advaced Mode, and the file system resized.

This procedure to workaround the LVM boot logical volume continuous restriction of the /stand file system can render the system unbootable if not followed to the letter. Use extreme precaution and always have a current Ignite-UX tape recovery prior to start to use this method.

Contents


Procedure

1. Reboot the system, then interrupt the boot process and boot to maintenance mode.

# shutdown -ry 0[Esc]
BCH Main Menu:boot pri
Interact with the IPL?> y
ISL> hpux –lm

2. Once in maintenance mode, activate vg00.

# vgchange -a y vg00

3. The /stand logical volume (typically /dev/vg00/lvol1) must be contiguous. In order to extend this logical volume, you must temporarily remove /dev/vg00/lvol2 (typically the swap logical volume), extend /dev/vg00/lvol1, then recreate /dev/vg00/lvol2 using the remaining space between the larger /dev/vg00/lvol1 and /dev/vg00/lvol3 logical volumes.

Check the current sizes of /dev/vg00/lvol1 and /dev/vg00/lvol2 to determine the current logical volume sizes.

# lvdisplay /dev/vg00/lvol1
--- Logical volumes ---
LV Name                     /dev/vg00/lvol1
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               0
Consistency Recovery        None
Schedule                    parallel
LV Size (Mbytes)            1536
Current LE                  192
Allocated PE                192
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   off
Allocation                  strict/contiguous
IO Timeout (Seconds)        default
# lvdisplay /dev/vg00/lvol2
--- Logical volumes ---
LV Name                     /dev/vg00/lvol2
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               0
Consistency Recovery        None
Schedule                    parallel
LV Size (Mbytes)            4096
Current LE                  512
Allocated PE                512
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   off
Allocation                  strict/contiguous
IO Timeout (Seconds)        default

4. Determine how much space you intend to add to /dev/vg00/lvol1. Any space added to lvol1 will have to be subtracted from /dev/vg00/lvol2 later. Determine the desired logical volume sizes. That way:

( lvol1 Allocated PE + PE ) = lvol1 new size

( lvol2 Allocated PE - PE ) = lvol2 new size

5. Temporarily remove /dev/vg00/lvol2. The pointers in the Boot Disk Reserved Area (BDRA) must also be removed in order for this to succeed.

# lvrmboot -s /dev/vg00
# lvrmboot -d lvol2 /dev/vg00
# lvremove -f /dev/vg00/lvol2

6. Extend /dev/vg00/lvol1.

# lvextend -l <PEs> /dev/vg00/lvol1

7. Recreate /dev/vg00/lvol2. The logical volume must have the contiguous feature enabled, and bad block relocation disabled.

# lvcreate -l <PEs> -C y -r n –n lvol2 /dev/vg00

8. Update and verify the BDRA pointers.

# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -d /dev/vg00/lvol2
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot –v

9. Reboot after using LVM maintenance mode. Do not use shutdown command.

# reboot

10. Unmount and extend the /stand file system.

# umount /stand

# extendfs –F hfs /dev/vg00/rlvol1

# mount /stand

Authors

This page was last modified on 3 August 2011, at 19:06. This page has been accessed 2,324 times.