lvsplit(1M)
Requires Optional HP MirrorDisk/UX Software
NAME
lvsplit − split mirrored LVM logical volume into two logical volumes
SYNOPSIS
/sbin/lvsplit [-A autobackup] [-s suffix] lv_path ...
Remarks
This command requires the installation of the optional HP MirrorDisk/UX software (not included in the standard HP-UX operating system) before it can be used. lvsplit cannot be performed if the volume group is activated in shared mode.
DESCRIPTION
The lvsplit command splits a single- or double-mirrored logical volume lv_path into two logical volumes. A new logical volume is created containing one copy of the data. The original logical volume is appropriately reset as unmirrored or single-mirrored.
If the -s option is specified, the new logical volume name has the form lv_pathsuffix. If -s is not specified, suffix defaults to b, as in lv_pathb.
If more than one lv_path is specified on the command line, lvsplit ensures that all logical volumes are brought offline together in one system call, ensuring predictable results among the logical volumes. Up to 127 logical volumes can be specified on the command line. All logical volumes must belong to the same volume group, and there must be enough unused logical volumes remaining in the volume group to hold the newly split logical volumes. A volume group can contain up to 255 logical volumes.
Whenever a mirrored logical volume is split into two logical volumes, a bit map is stored that keeps track of all writes to either logical volume in the split pair. When the two logical volumes are subsequently merged using lvmerge, the bit map is used to decide which areas of the logical volumes need to be resynchronized (see lvmerge(1M)). This bit map remains in existence until the merge is completed, until one of the logical volumes is extended, reduced, or split again, or until the system is rebooted.
The new logical volume must be checked with the fsck command before it is mounted (see fsck(1M)). lvsplit flushes the file system to a consistent state except for pipes and unlinked but open files.
To rejoin two split copies of a logical volume, use the lvmerge command (see lvmerge(1M)).
Options and Arguments
lvsplit recognizes the following options and arguments:
lv_path The block device path name of a logical volume. Up to 127 logical volumes in the same volume group can be specified at one time.
-A autobackup Set automatic backup for this invocation of this command. autobackup can have one of the following values:
y Automatically back up configuration changes made to the logical volume. This is the default.
After this command executes, the vgcfgbackup command (see vgcfgbackup(1M)) is executed for the volume group to which the logical volume belongs.
n Do not back up configuration changes this time.
-s suffix Specify the suffix to use to identify the new logical volume. The new logical volume name has the form lv_pathsuffix. If -s is omitted, suffix defaults to b, as in lv_pathb.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)).
EXAMPLES
Split the mirrored logical volume /dev/vg00/lvol1 into two copies. Call the new logical volume /dev/vg00/lvol1backup:
lvsplit -s backup /dev/vg00/lvol1
Split an online logical volume which is currently mounted on /usr so that a backup can take place:
lvsplit /dev/vg00/lvol1
fsck /dev/vg00/lvol1b
mount /dev/vg00/lvol1b /usr.backup
Perform a backup operation, then:
umount /usr.backup
lvmerge /dev/vg00/lvol1b /dev/vg00/lvol1
Split two logical volumes at the same time:
lvsplit /dev/vg00/database1 /dev/vg00/database2
Perform operation on split logical volumes, then rejoin them:
lvmerge /dev/vg00/database1b /dev/vg00/database1
lvmerge /dev/vg00/database2b /dev/vg00/database1
WARNINGS
After a two way mirrored logical volume has been split once, it cannot be split again without merging the logical volumes using the lvmerge command (see lvmerge(1M)).
SEE ALSO
lvcreate(1M), lvextend(1M), lvmerge(1M).
Hewlett-Packard Company — HP-UX Release 10.20: July 1996