Cette commande très pratique permet notamment de couper une copie miroir en vue d'une sauvegarde 'à froid'.

En effet, il suffit de stopper les applications, utiliser cette commande pour couper le LV et remonter une des copies sous un autre nom, de sauvegarder ce nouveau FS et de raccrocher ensuite la copie.

 

Un arrêt court de la production est possible, juste durant le temps de la coupure du FS( pour que les fichiers soient correctement fermés).

 

Ci-dessous la description plus détaillée en anglais.

 

 

splitlvcopy Command

Purpose

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

Syntax

splitlvcopy-f ] [  -y NewLogicalVolumeName ] [  -Y Prefix ] LogicalVolume CopiesPhysicalVolume ... ]

Description

Notes:

  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.

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 command

fsck /dev/NewLogicalVolume

before the new filesystem can be mounted.

You can not 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. Documentation for splitlvcopy consists of this man page.

Flags

-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 filesystems.

-y NewLogicalVolumeName

Specifies the name of the new logical volume to move copies to 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

Copies

Specifies the maximum number of physical partitions that remain in LogicalVolume 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:

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 and Trusted AIX 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 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:

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.

Files

/usr/sbin/splitlvcopy

Contains the splitlvcopy command.

/tmp

Contains the temporary files created while the splitlvcopy command is running.

Related Information

Commands: rmlvcopy and mklv.

 

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone