Datacentre Support Reference Guides

HP:  Moving root volume group

 

 


Not sure why you'd want to do something like this - maybe you're trying to restore what some idiot did; however, the steps below will move the root volume group
 

  1. Create a new root volume group
    1. Initialize the disk to be used in the volume group so it can be booted
    pvcreate -B /dev/rdsk/c0t0d0
    1. Place the LIF information on the disk using the mkboot command.
    mkboot /dev/rdsk/c0t0d0
    1. Create the volume group
    vgcreate vgroot /dev/dsk/c0t0d0
    1. Create a logical volume that is suitable for use as the boot volume. This logical volume has to be the first in the volume group and should be a contiguous volume with bad block relocation turned off.
    lvcreate -n stand -C y -r n -L 24 vgroot
    1. Create a logical volume that is suitable for use as the root volume. This logical volume should be a contiguous volume with bad block relocation turned off
    lvcreate -n root -C y -r n -L 64 vgroot
    1. Create a logical volume that will be used as primary swap. This volume should be contiguous
    lvcreate -n swap -C y -r n -L 64 vgroot
    1. Create a logical volume that will be used as the dump volume. This volume should be contiguous
    lvcreate -n dump -C y -r n -L 64 vgroot
    1. Create a logical volume for /opt
    lvcreate -n opt -L 250 vgroot
    1. Create a logical volume for /usr
    lvcreate -n usr -L 500 vgroot  # Choose an appropriate size for your system.
    1. Create a logical volume for /var
    lvcreate -n var -L 500 vgroot  # Choose an appropriate size for your system.
    1. Update the autoboot information:
    mkboot -a "hpux (0;)/stand/vmunix" /dev/rdsk/c0t0d0
     
  2. Update the boot information:
    1. Root information:    lvlnboot -r /dev/vgroot/root
    2. Boot information:    lvlnboot -b /dev/vgroot/boot
    3. Swap information:   lvlnboot -s /dev/vgroot/swap
    4. Dump information:  lvlnboot -d /dev/vgroot/dump
  1. Copy the data from the old logical volumes to the new ones.

  2. for fs in root opt usr var
    do
       mkdir /mnt/${fs}
       mount /dev/vgroot/${fs} /mnt/${fs}
    done

    # tar, cpio, cp -R, whatever suits your fancy to get the information over to the new logical volumes.  Don't forget the devices.
     

  3. Update the primary boot path
    1. Identify the hardware path for the disk used in the new root volume group
    2. shutdown -r now
    3. Interrupt the boot sequence and interact with the ISL
    4. Via the resulting menu, update the primary boot path.
    5. Allow the system to come up and troubleshoot as necessary
  1. Remove, if appropriate, the lv boot information from the previous volume group:  lvrmboot -r /dev/vg00