[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4


recreatevg Command

Purpose

Recreates a volume group that already exists on a specified set of disks. Imports and varies on the volume group.

Syntax

recreatevg [ -y VGname ] [ -p ] [ -f ] [ -Y Lv_Prefix | -l LvNameFile ] [ -L Label_Prefix ] [ -n ] PVname...

Description

The recreatevg command recreates a volume group on a set of disks that are mirrored from another set of disks belonging to a specific volume group. This command allocates new physical volume identifiers (PVID) for the member disks, as the PVIDs are also duplicated by the disk mirroring. Similarly, duplicated logical volume members (LVM) are given new names with the user specified prefixes.

Notes:
  1. The recreatevg command removes all logical volumes that are fully or partially existed on the physical volumes that are not specified on the command line.
  2. The recreatevg command gives a warning if the log logical volume for a file system does not exists on the disks specified on the command line.
  3. The recreatevg command fails if the input list does not match the list compiled from the Volume Group Descriptor Area (VGDA).

Flags


-f Allows a volume group that does not have all disks available to be recreated.
-l LvNameFile Changes logical volume names to the name specified by NameFile. Entries must be in the format LV:NEWLV1. All logical volumes that are not included in LvNameFile are recreated with default system generated names.
-L Label_Prefix Changes the labels of logical volumes on the VG being recreated to this prefix. You must modify the /etc/filesystems stanza manually if a simple modification of the mount point is not enough to define the stanza uniquely.
-n Specifies that after recreatevg the volume group is imported but varied off. Default is imported and vary on.
-p Disables the automatic generation of the new PVIDs. If the -p flag is used, you must ensure that there are no duplicated PVIDs on the system. All the disks that are hardware mirrored must have their PVIDs changed to a unique value.
-y VGname Allows the volume group name to be specified rather than having the name generated automatically. Volume group names must be unique system wide and can range from 1 to 15 characters. The name cannot begin with a prefix already defined in the PdDv class in the Device Configuration database for other devices. The new volume group name is sent to standard output.
-Y Lv_Prefix Causes the logical volumes on the volume group being recreated to be renamed with this prefix. The total length of the prefix and the logical volume name must be less than or equal to 15 characters. If the length exceeds 15 characters, the logical volume is renamed with a default name. The name cannot begin with a prefix already defined in the PdDv class of the Device Configuration Database, nor be a name already used by another device.

Security

Access Control: You must have root authority to run this command.

Examples

  1. To recreate a volume group that contains three physical volumes, type:

    recreatevg hdisk1 hdisk2 hdisk3
    

    The volume group on hdisk1, hdisk2, and hdisk3 is recreated with an automatically generated name, which is displayed.

  2. To recreate a volume group on hdisk1 with the new name testvg, type:

    recreatevg -y testvg hdisk1
    
  3. To recreate a volume group on hdisk14, recreate all logical volumes in that volume group, and rename them with the prefix newlv, type:

    recreatevg -Y newlv hdisk14
    

Files


/usr/sbin   Directory where the recreatevg command resides.

Related Information

The chvg command, chlv command.

The Managing Logical Volume Storage in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]