Create Snapshot Virtual Disk Wizard: Additional Instructions for AIX - LVM Logical Virtual Disks

Use the following procedure to create  on a  running AIX 4.3.3 (or higher), using LVM Logical Virtual Disks. Failure to complete the steps listed might result in an inaccurate point-in-time image of the .

For a process overview of the snapshot virtual disk creation process, see Create Snapshot Virtual Disk Wizard: Process Overview - UNIX with Virtual Disk Manager Virtual Disks.

Snapshot virtual disks might be reused (for frequent or nightly backups) or may be created for one-time usage (for speculative change or upgrade testing). For instructions on how to reuse a disabled snapshot virtual disk, see Reusing Snapshot Virtual Disks.

Creating a Snapshot Virtual Disk

Use the following procedure to create a snapshot virtual disk.

Important: The following restrictions apply when attempting to create snapshot virtual disks on AIX:

Important: Stop all I/O activity to the source virtual disk at this point (or suspend data transfer). This action ensures that an accurate point-in-time image of the source virtual disk is captured.

Important: If an AIX disk group has more than one virtual disk, create snapshot virtual disks for each of the virtual disks in the disk group.

1

Blink the disk group (on which the snapshot virtual disk is to be based), and unmount its associated file systems.

2

At the host prompt, type the following, and press Enter:

umount mount-point

where mount-point is the name of the file system being unmounted.

3

Start the storage management software.

The Enterprise Management Window is displayed.

4

Launch an  by selecting the  in either the Tree view or the Table view and then selecting Tools >> Manage Storage Array.

The Array Management Window is opened in a separate window.

5

Within the Logical View of the Array Management Window, select a , and create a snapshot virtual disk using one of the following methods:

  • Create Snapshot Virtual Disk Wizard, accessed using an Array Management Window. For more information, see Creating a Snapshot Virtual Disk Using the Snapshot Virtual Disk Wizard.
  • Create a snapshot virtual disk using either the Script Editor or a command line shell on the host operating system. Type the following command, and press Enter:

    create snapshotVirtual Disk

    For command reference information on creating a snapshot virtual disk, refer to the Enterprise Management Window online help.

6

Assign a  between the snapshot virtual disks and the host that will access the snapshot virtual disks.

You can define virtual disk-to-LUN mappings by using one of the following methods:

  • Storage Partitioning Wizard, which helps you to quickly define a single . It guides you through the major steps required to specify which host will access a virtual disk and the associated logical unit numbers. For more information, see Using the Storage Partitioning Wizard.
  • Create a virtual disk-to-LUN mapping using either the Script Editor or a command line shell on the host operating system. Type the following command, and press Enter:

    create mapping virtual disk

    For command reference information on creating a virtual disk-to-LUN mapping, refer to the Enterprise Management Window online help.

7

Log in to the host as root.

8

Run the  utility (or an operating-system specific utility) to ensure that the host operating system recognizes the snapshot virtual disks.

To use the hot_add utility, at the host prompt, type the following command, and press Enter:

hot_add

Several minutes might elapse while the computer is accessing the physical disks. When the program is finished, a dialog is displayed with the following message:

Storage Array nodes have been updated

The new virtual disks are now available to you through the operating system.

9

Run the  utility to associate the  with a host operating system storage array and to ensure that the virtual disk name and the operating system storage array name (assigned by the operating system) correlate.

Look for the newly created snapshot virtual disk names, and note the names of the associated operating system storage array name. For example, you created a snapshot virtual disk named accountingMight14 and its associated operating system storage array name is hdisk4.

10

At the host prompt, type the following command, and press Enter:

lspv

A list of all the physical virtual disks recognized by the host operating system is displayed.

11

Look for the operating system storage array name of your snapshot virtual disk or virtual disks in the list. The listing shows a physical virtual disk ID (PVID) for this virtual disk that is the same as the PVID for the associated source virtual disk. This similarity is because the snapshot virtual disk contains the same disk group data structures as the source virtual disk.

12

Clear the PVID for the snapshot virtual disks. At the host prompt, type the following command, and press Enter:

chdev - l os_device_name -a pv=clear

where os_device_name is the operating system storage array name of the snapshot virtual disk. Repeat for each snapshot virtual disk in the AIX disk group.

13

Re-create a new disk group. The recreatevg command, available in usr/sbin/, reads the disk group data structure inside a virtual disk and reconstructs it. The command allocates new (PVIDs) to the snapshot virtual disks and enables access to the snapshot virtual disk for the selected host.

Important: If the recreatevg command is not available in AIX 4.3.3., install the AIX version 4.3.3 Recommended Maintenance Level 06 (AIX 4330-06) maintenance package.

At the host prompt, type the following command, and then press Enter:

recreatevg -y virtual disk-group-name -L /directory-name os-device-name

  • where virtual disk-group-name is the user-defined name to be assigned to the snapshot disk group.
  • where directory-name is the name of the directory where you want to mount the snapshot virtual disk.
  • where os-device-name is the operating system storage array name of the snapshot virtual disk. If your AIX disk group is made up of more than one snapshot virtual disk, add an os-device-name for each virtual disk.

The disk group is re-created and contains the snapshot virtual disk or virtual disks.

14

Mount the file system to its intended host. At the host prompt, type the following command, and press Enter:

mount mount-point

where mount-point is the name of the file system being mounted. Include the directory-name used in step 13.

15

Ensure that the logical virtual disks are back online. At the host prompt, type the following command, and press Enter:

df -k

A list of the mounted disks is displayed.

16

Use the snapshot virtual disk with your backup application, for speculative testing, or with another application.

17

When the snapshot virtual disk is no longer required, unmount the file system. At the host prompt, type the following command, and press Enter:

umount mount-point

where mount-point is the name of the file system being unmounted.

18

Delete the disk group created in step 13 that contains the snapshot virtual disks. At the host prompt, type the following command, and press Enter:

varyoffvg virtual disk-group-name

exportvg virtual disk-group-name

where virtual disk-group-name is the name of the snapshot disk group.

19

Disable or delete the snapshot virtual disk or virtual disks.

If you disable the snapshot virtual disk instead of deleting it, you can retain the snapshot virtual disk and its associated . Then, when you need to create a different snapshot of the same source virtual disk, you can re-create the disabled snapshot virtual disk. This action takes less time than creating a new snapshot virtual disk and stops any reduction in performance that might occur if the snapshot virtual disk remains available.

For information on disabling or recreating a snapshot, see Disabling a Snapshot Virtual Disk and Re-creating a Snapshot Virtual Disk. For information on deleting a snapshot virtual disk, see Deleting a Virtual Disk.

For command reference information on disabling, re-creating, and deleting a snapshot virtual disk, refer to the Enterprise Management Window online help.

Reusing Snapshot Virtual Disks

Important: All I/O activity to the source virtual disk should be stopped at this point (or data transfer suspended). This situation ensures that an accurate point-in-time image of the source virtual disk is captured.

Important: If the recreatevg command is not available in AIX 4.3.3., install the AIX version 4.3.3 Recommended Maintenance Level 06 (AIX 4330-06) maintenance package.

Typically, after a snapshot virtual disk has been created, it would be disabled until a new point-in-time image of the same source virtual disk is required. Create a new point-in-time image of the same source virtual disk. Use the following procedure to reuse snapshot virtual disks.

1

Unmount the file systems in the disk group on which the snapshot virtual disk is to be based.

At the host prompt, type the following command, and press Enter:

umount mount-point

where mount-point is the name of the file system being unmounted.

2

Run the hot_add utility (or an operating-system specific utility) to ensure that the host operating system recognizes the snapshot virtual disk.

To use the hot_add utility, at the host prompt, type the following command, and press Enter:

hot_add

Several minutes might pass while the computer is accessing the physical disks. When the program is finished, a dialog is displayed with the following message:

Storage Array nodes have been updated

The new virtual disks should now be available to you through the operating system.

3

In the storage management software, re-create the snapshot virtual disks by using one of the following methods:

  • Select Virtual Disk >> Snapshot >> Re-create in the Array Management Window. For more information, see Re-creating a Snapshot Virtual Disk.
  • Re-create a snapshot virtual disk using either the Script Editor or a command line interface on the host operating system. Type the following command, and press Enter:

    recreateSnapshot virtual disk

    For command reference information on re-creating a snapshot virtual disk, refer to the Enterprise Management Window online help.

4

Clear the PVID for the snapshot virtual disks. At the host prompt, type the following command, and press Enter:

chdev - l os_device_name -a pv=clear

where os_device_name is the operating system storage array name of the snapshot virtual disk. Repeat for each snapshot virtual disk in the AIX disk group.

5

Re-create a new disk group. At the host prompt, type the following, and then press Enter:

recreatevg -y virtual disk-group-name -L /directory-name os-device-name

  • where virtual disk-group-name is the user-defined name to be assigned to the snapshot disk group.
  • where directory-name is the name of the directory where you want to mount the snapshot virtual disk.
  • where os-device-name is the operating system storage array name of the snapshot virtual disk. If your AIX disk group will be made up of more than one snapshot virtual disk, add an os-device-name for each virtual disk.

The disk group is re-created and contains the snapshot virtual disk or virtual disks.

The recreatevg command, available in usr/sbin/, reads the disk group data structure inside a virtual disk and reconstructs it. The command allocates new PVIDs to the snapshot virtual disks and enable access to the snapshot virtual disk for the selected host.

6

Mount the file system to its intended host. At the host prompt, type the following command, and then press Enter:

mount mount-point

where mount-point is the name of the file system being mounted. Include the directory-name used in step 5.

7

Ensure that the logical virtual disks are back online. At the host prompt, type the following command, and press Enter:

df -k

A list of the mounted disks is displayed.

8

Use the snapshot virtual disk with your backup application (or another application).

9

When the snapshot virtual disk is no longer required, disable the snapshot virtual disk.

If you disable the snapshot virtual disk instead of deleting it, you can retain the snapshot virtual disk and its associated repository virtual disk. Then, when you need to create a different snapshot of the same source virtual disk, you can re-create the disabled snapshot virtual disk. This takes less time than creating a new snapshot virtual disk and stops any reduction in performance that might occur if the snapshot virtual disk remains available.

For more information, see Disabling a Snapshot Virtual Disk and Re-creating a Snapshot Virtual Disk. For command reference information on disabling and re-creating a snapshot virtual disk, refer to the Enterprise Management Window online help.

Related Topics

Create Snapshot Virtual Disk Wizard: Additional Instructions

Learn About Creating Snapshot Virtual Disks

Creating a Snapshot Virtual Disk Using the Snapshot Wizard