splitlvcopy Command

Purpose

Splits copies from one logical volume and creates a new logical volume from them.

Syntax

splitlvcopy [-f ] [-k] [-y NewLogicalVolumeName ] [-Y Prefix ] LogicalVolume Copies [PhysicalVolume ... ]

splitlvcopy [-f ] [-k] [-y NewLogicalVolumeName ] [-Y Prefix ] [-p mirror pool,...] LogicalVolume Copies

Description

Note:
  1. To use this command, you must either have root user authority or be a member of the system group.
  2. The splitlvcopy command is not allowed on a snapshot volume group or a volume group that has a snapshot volume group.
  3. The splitlvcopy command copies the passphrase authentication methods from the original encrypted logical volume to the new encrypted logical volume.
  4. If the original logical volume has Platform keystore (PKS) method, the splitlvcopy command adds new PKS method in new encrypted logical volume if the PKS key slots are available.
  5. The splitlvcopy command deletes the key server method in new encrypted logical volume. Use the -k flag to copy the key server method from the original encrypted logical volume.
  6. The splitlvcopy command deletes the key file authentication method in new encrypted logical volume.
Attention: Although the splitlvcopy command can split logical volumes that are open, including logical volumes containing mounted filesystems, this is not recommended. You may lose consistency between LogicalVolume and NewLogicalVolume if the logical volume is accessed by multiple processes simultaneously. When splitting an open logical volume, you implicitly accept the risk of potential data loss and data corruption associated with this action. To avoid the potential corruption window, close logical volumes before splitting and unmount filesystems before splitting.

The splitlvcopy command removes copies from each logical partition in LogicalVolume and uses them to create NewLogicalVolume. The Copies parameter determines the maximum number of physical partitions that remain in LogicalVolume after the split. Therefore, if LogicalVolume has 3 copies before the split, and the Copies parameter is 2, LogicalVolume will have 2 copies after the split and NewLogicalVolume will have 1 copy. You can not split a logical volume so that the total number of copies in LogicalVolume and NewLogicalVolume after the split is greater than the number of copies in LogicalVolume before the split.

The NewLogicalVolume will have all the same logical volume characteristics as LogicalVolume. If LogicalVolume does not have a logical volume control block the command will succeed with a warning message and creates NewLogicalVolume without a logical volume control block.

There are additional considerations to take when splitting a logical volume containing a filesystem. After the split there will be two logical volumes but there will only be one entry in the /etc/filesystems file which refers to LogicalVolume. To access NewLogicalVolume as a filesystem you must create an additional entry in /etc/filesystems with a different mount point which refers to NewLogicalVolume. If the mount point does not already exist, you have to create it before the new filesystem can be mounted. In addition, if NewLogicalVolume was created while LogicalVolume was open, you have to run the fsck /dev/NewLogicalVolumecommand before the new filesystem can be mounted.

You cannot use the System Management Interface Tool (SMIT) to run this command. Message catalogs are not supported for this command and therefore the error messages are provided in English only with no message catalog numbers.

Flags

Item Description
-f Specifies to split open logical volumes without requesting confirmation. By default, splitlvcopy requests confirmation before splitting an open logical volume. This includes open raw logical volumes and logical volumes containing mounted file systems.
-k Copies the key server method from the original encrypted logical volume to the new logical volume.
-p mirrorpool Specifies the mirror pool from which the logical volume copy must be split to create a new logical volume.
-y NewLogicalVolumeName Specifies the name of the new logical volume to move copies from LogicalVolume.
-Y Prefix Specifies the Prefix to use instead of the prefix in a system-generated name for the new logical volume. The prefix must be less than or equal to 13 characters. A name cannot begin with a prefix already defined in the PdDv class in the Device Configuration Database for other devices, nor be a name already used by another device.

Parameters

Item Description
Copies Specifies the maximum number of physical partitions that remain in logical volume after the split.
LogicalVolume Specifies the logical volume name or logical volume ID to split.
PhysicalVolume Specifies the physical volume name or the physical volume ID to remove copies from.

Exit Status

This command returns the following exit values:

Item Description
0 Successful completion.
>0 An error occurred.

Security

Access Control: You must have root authority to run this command or be a member of the system group.

Attention RBAC users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations that are associated with this command, see the lssecattr command or the getcmdattr subcommand.

Auditing Events: N/A

Examples

  • To split one copy of each logical partition belonging to logical volume named oldlv which currently has 3 copies of each logical partition, and create the logical volume newlv, enter the following command:

    splitlvcopy -y newlv oldlv 2

    Each logical partition in the logical volume oldlv now has two physical partitions. Each logical partition in the logical volume newlv now has one physical partition.

  • To split the copy of the lv00 logical volume in the mp2 and the mp3 mirror pools to create a logical volume, enter the following command:
    splitlvcopy -p mp2,mp3 lv00 1

Files

Item Description
/usr/sbin/splitlvcopy Contains the splitlvcopy command.
/tmp Contains the temporary files created while the splitlvcopy command is running.