======================================================= HP: Moving the root volume group ======================================================= :Title: HP: Moving the root volume group :Author: Douglas O'Leary :Description: HP: Moving the root volume group :Date created: 06/2001 :Date updated: 06/2001 :Disclaimer: Standard: Use the information that follows at your own risk. If you screw up a system, don't blame it on me... Not sure why you'd want to do something like this - maybe you're trying to reverse what some idiot did; however, the steps below will move the root volume group 1. Create a new root volume group a. Initialize the disk to be used in the volume group so it can be booted:: pvcreate -B /dev/rdsk/c0t0d0 b. Place the LIF information on the disk using the mkboot command. mkboot /dev/rdsk/c0t0d0 c. Create the volume group vgcreate vgroot /dev/dsk/c0t0d0 d. 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 e. 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 f. 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 g. 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 h. Create a logical volume for /opt lvcreate -n opt -L 250 vgroot i. Create a logical volume for /usr lvcreate -n usr -L 500 vgroot # Choose an appropriate size for your system. j. Create a logical volume for /var lvcreate -n var -L 500 vgroot # Choose an appropriate size for your system. k. Update the autoboot information: mkboot -a "hpux (0;)/stand/vmunix" /dev/rdsk/c0t0d0 2. Update the boot information: a. Root information: ``lvlnboot -r /dev/vgroot/root`` b. Boot information: ``lvlnboot -b /dev/vgroot/boot`` c. Swap information: ``lvlnboot -s /dev/vgroot/swap`` d. Dump information: ``lvlnboot -d /dev/vgroot/dump`` 3. Copy the data from the old logical volumes to the new ones:: 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. 4. Update the primary boot path a. Identify the hardware path for the disk used in the new root volume group b. ``shutdown -r now`` c. Interrupt the boot sequence and interact with the ISL d. Via the resulting menu, update the primary boot path. e. Allow the system to come up and troubleshoot as necessary 5. Remove, if appropriate, the lv boot information from the previous volume group: ``lvrmboot -r /dev/vg00``