lvmmigrate - prepare root file system for migration from partitions to
LVM logical volumes
/usr/sbin/lvmmigrate [-d disk_special_file] [-e file_system ...] [-f]
[-i file_system ...] [-n] [-v]
The lvmmigrate command records the configuration information of the
current system in the LIF volume of the boot section for use with a
subsequent cold-install process. If there is no LIF volume on the
disk, lvmmigrate creates it using lifinit(1), then records the
information in a LIF file named CUSTOM. A copy of the LIF file is
saved as /tmp/LVMMIGRATE.CFG. The information is also written to file
/tmp/LVMMIGRATE for reviewing. The install process looks for the LIF
file CUSTOM, and if it exists, uses the information found as the
configuration defaults for the root volume group and the root file
systems. After the install process has completed, a copy of the
CUSTOM final configuration can be found on the newly created system in
the file /usr/lib/sw/hpux.install/config.local.
All file system entries in the /etc/mnttab and /etc/fstab files are
read. lvmmigrate also searches for unmounted file systems and
possible character data sections in unused disk areas. The file
systems appropriate for the root volume group are marked for
migration. The default file systems are: /, /home, /opt, /tmp, /usr,
/var, and any file system with a mount path beginning with: /home/,
/opt/, /tmp/, /usr/, /var/.
lvmmigrate displays the following information on the standard output:
disks and file system names that are marked for migration, disk areas
and file systems to be backed up by the user, and instructions for
After executing lvmmigrate, the user must back up the file systems and
any raw device section having useful data to tape. The system is then
reinstalled on logical volumes using the configuration information
recorded by lvmmigrate.
lvmmigrate recognizes the following options:
-d disk_special_file Use the specified root disk for
reinstallation. Without this option,
the current root disk (where root file
system / is currently located) is
assumed and the configuration is
recorded in the boot section.
Hewlett-Packard Company - 1 - HP-UX Release 11i: November 2000
-e file_system ... Exclude each specified default file
system from the root volume group. Note
that the / file system cannot be
-f Force the recording of configuration
information. Information is recorded in
a LIF file named CUSTOM in the boot
section. Without this option, if there
is a file system or LVM record in the
boot section, no write is done and a
warning message is displayed.
-i file_system ... Include each specified file system in
the root volume group, along with the
default file systems.
-n Perform a "no write" operation for
preview purposes. Migration information
is displayed on the terminal screen, but
is not recorded in the boot section of
the disk. The CUSTOM LIF file is not
written, but the files /tmp/LVMMIGRATE
and /tmp/LVMMIGRATE.CFG are still
-v Display all disks, file systems, and
possible raw sections present in the
Prepare a system for migration to root logical volumes. Create a file
in the LIF area that the cold-install can use to read default
configuration information. Specify verbose mode. Create files
/tmp/LVMMIGRATE and /tmp/LVMMIGRATE.CFG:
Display a detailed list of the disks, file systems, and possible raw
data sections present in the current system.
lvmmigrate -v -n
Include file system /mnt in the root volume group for migration and
exclude file system /usr/source. Write configuration information in
the boot section of disk /dev/dsk/c1t0d0:
lvmmigrate -d /dev/dsk/c1t0d0 -i /mnt -e /usr/source
Use of the -f option results in overwriting the contents of the boot
Hewlett-Packard Company - 2 - HP-UX Release 11i: November 2000
section. Before using the -f option be sure to back up all data on
the boot section of the disk specified with the -d option.
If there is no LIF volume, lvmmigrate uses lifinit to create it (see
lifinit(1)). If file CUSTOM already exists in the LIF volume,
lvmmigrate rewrites it.
Caution: All data on disks being used for reinstallation must be
backed up to a separate device because the install process overwrites
data on all disks used in the new root volume group.
Hewlett-Packard Company - 3 - HP-UX Release 11i: November 2000