Creating a Veritas Volume Manager boot disk using the LVM boot disks as its source probably looks to many as a very complicated process, nothing so far from the reality. In fact the whole conversion can be done with one command, vxcp_lvmroot. In this post I will try to clarify the process and explain some of the underlying mechanisms.
I’m going to take for granted that all of you understand the basic structure of boot disks on Itanium servers. If you have read my post about boot disk structure on Integrity servers you will remember that the disks are composed by three partitions:
HPSP - HP Service Partition.
For the purpose of this post the only relevant partition is the OS Partition, also named as HPUX in HP-UX hosts.
Unlike LVM, where the volumes are named with numbers (lvol1, lvol2…), in VxVM the volumes follow a specific naming convention that reflects the usage of each one of them:
Veritas volumes support also a usetype field used to provide additional information about the volume to VxVM itself. The three most common use types on HP-UX are:
fsgen - File systems and general purpose volumes
swap - Swap volumes
root - Used for the volume that contains the root file system
The following restrictions must be taken into account for any VxVM boot disk:
As in LVM the volumes involved in the boot process (standvol, swapvol and rootvol) must be contiguous.
The above volumes can have only one subdisk and can’t span to additional disks.
The volumes within the root disk can not use dirty region logging (DRL).
The private region size is 1MB rather than the default value of 32MB.
The /stand file system can only be configured with VxFS data layout version 5 or the system will not boot.
In PA-RISC systems the /stand file system must be HFS, this is necessary because the PA-RISC HP-UX kernel loader is not VxFS-aware.
Following is an example to illustrate the process.
First, with diskinfo, verify the size of the current boot disk and the new disk to check that they are the same.
After that scrub the new disk, this will prevent possible problems during the creation process because if vxcp_lvmroot encounter LVM structures on the disk it will fail.
Finally launch the vxcp_lvmroot command. Before commencing the copy, vxcp_lvmroot will determine how many disks are required and will ensure that enough disks have been specified.
Each one of the given disks for the conversion will be checked to make sure that aren’t in use as LVM, VxVM or raw disks. Once the appropriate checks have been issued the disks will be given VxVM media names, the disk or disks containing the root will be given rootdisk## names and the other disks that are part of the rootdg will be given rootaux## names, ## is a number starting on 01.
Now to verify the new VxVM boot disk, first check the newly created rootdg diskgroup.
Verify the contents of the LABEL file.
Check the new boot paths and if everything is OK reboot the server.
If everything went as expected the server will boot from the new disk and the migration process will be finished.