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
- Create a new root volume group
- Initialize the disk to be used in the volume group so it can be booted
pvcreate -B /dev/rdsk/c0t0d0 - Place the LIF information on the disk using the mkboot command.
mkboot /dev/rdsk/c0t0d0 - Create the volume group
vgcreate vgroot /dev/dsk/c0t0d0 - 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 - 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 - 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 - 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 - Create a logical volume for /opt
lvcreate -n opt -L 250 vgroot - Create a logical volume for /usr
lvcreate -n usr -L 500 vgroot # Choose an appropriate size for your system. - Create a logical volume for /var
lvcreate -n var -L 500 vgroot # Choose an appropriate size for your system. - Update the autoboot information:
mkboot -a "hpux (0;)/stand/vmunix" /dev/rdsk/c0t0d0 - Update the boot information:
- Root information: lvlnboot -r /dev/vgroot/root
- Boot information: lvlnboot -b /dev/vgroot/boot
- Swap information: lvlnboot -s /dev/vgroot/swap
- Dump information: lvlnboot -d /dev/vgroot/dump
- 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. - Update the primary boot path
- Identify the hardware path for the disk used in the new root volume group
- shutdown -r now
- Interrupt the boot sequence and interact with the ISL
- Via the resulting menu, update the primary boot path.
- Allow the system to come up and troubleshoot as necessary
- Remove, if appropriate, the lv boot information from the previous volume group: lvrmboot -r /dev/vg00
|
|