How to extend root filesystem - Usint DRD, Ignite and LVM maintenance mode

quarta-feira, 18 de janeiro de 2012

First method, using DRD:


Patches necessarie:


HP-UX 11i v2 - Jan 2012 (DRD_1123_WEB1201.depot)
HP-UX 11i v3 - Jan 2012 (DRD_1131_WEB1201.depot)
If you have installed the DRD you can do through it.
1 - Clone your system using the follow procedure:
Clone with DRD


2 - Mount your clone:
Use the "drd mount", this comand locate a inactive system image and mount it. The drd mount command automatically chooses the mount point for the inactive system image.
# drd mount


3 - Umount the "root":
# umount /dev/drd00/lvol3

4 - Now extend it:
# lvextend -l 999 /dev/drd00/lvol3

# extendfs -F vxfs /dev/drd00/rlvol3
# mount /dev/drd00/lvol3 /var/opt/drd/mnts/sysimage_001
5 - Check:
# bdf /var/opt/drd/mnts/sysimage_001


6 - Umount and activate:
# drd umount
# drd activate


7 - Reboot the server with the new DRD image:
# shutdown -y -r 0




Second method, LVM maintenance mode :


Make sure that the vg00 is un-mirrored and the space to extend the root LV is available in the same disk as continguous physical extents because the root volume allocation policy must be contiguous.
If the adjacent physical extents are occupied by any other LV move that logical volume to some other disk using pvmove command.
# pvmove -n /dev/vg00/lvolx /dev/dsk/c0txd0 /dev/dsk/c0txd0


Shutdown the machine and interrupt the normal boot process by pressing any key. From the boot admin prompt type boot pri isl you will get the isl prompt.
ISL> hpux -lm


This will take you to the logical volume maintanence mode. Don't try to mount any logical volume and don't switch to multiuser mode or a different runlevel.


The root LV will now be mounted on /dev/root instead of /dev/vg00/lvolx
Now you can execute the extendfs command on the root logical volume:
# extendfs -F vxfs /dev/vg00/rlvol3


Note down the alternate superblock locations and reboot the macine using
# reboot -n


This will cause the system to not sync the old superblock back to the filesystem and damage it.
When you boot the system normally now you will get all the allocated space for the root filesystem.
Now you will notice that the root volume is still mounted on /dev/root rather than /dev/vg00/lvol3. To correct this you remove the /etc/mnttab and you will find bdf now displays the correct logical volume.




Third method, Ignite:


  1. Make sure any external devices that need to be configured at cold-install are connected to the target system and are turned on and operational.
  2. Insert the HP-UX DVD into the drive.
  3. Stop the autoboot by pressing any key.
    The boot console menu is displayed. If you need help, enter: HELP
  4. Search for bootable devices, using the choices displayed (for example, enter searchorsea). A table similar to this is displayed:
    Path#  Device Path       Device Type
    -----  -----------       -----------
    P0     TAPE              HP TAPE
    P1     LAN.1.2.3.4.5.6   1.2.3.4 
    P2     FWSCSI.6.0        IBM DDRS-34560WS

    Of the media listed, a fast/wide SCSI device (FWSCSI) is usually a disk, whereas a single-ended SCSI device (SCSI) can be a disk or CD/DVD drive.
  5. For a legacy hardware path, boot from the Tape drive using the listed path number. For the drive shown in the previous example (P0), enter:  BOOT P0
  6.  After a few minutes, at the Interact with IPL? prompt press n.
  7. Select:
    "Media only instalation"and
    "Advanced instalation"Click OK to advance to next screen.
  8. Now select:
    "
    Boot from CD/DVD, Recover from Tape"Click OK to advance to next screen.
  9. Now you can resize your FS on the filesystem tab.
  10. Click "go!" to finish.