How to mirror a logical volume

From Wiki-UX.info
Jump to: navigation, search


Abstract[edit]

This article shows the standard procedure to mirror a LVM logical volume to another Physical Volume. This procedure does not cover mirroring LVM boot disks.

HP-UX 11i v1 (11.11) / 11i v2 (11.23)[edit]

1. Identify the available disk to mirror the <vgname> logical volumes.

# strings /etc/lvmtab | grep dev
/dev/<vgname>
/dev/dsk/c3t3d0
# ioscan –funC disk
disk      0  1/0/1/0/0/1/3.0.6   sdisk    CLAIMED     DEVICE       HP 36.4GST336607FC
                           /dev/dsk/c3t6d0   /dev/rdsk/c3t6d0
disk      1  1/0/1/0/0/1/3.#.0   sdisk    CLAIMED     DEVICE       HP 36.4GST336607FC
                            /dev/dsk/c#t#d#   /dev/rdsk/c#t#d#

2. Create a LVM Physical Volume.

# pvcreate /dev/rdsk/c#t#d#

3. Add the disk to <vgname> to the volume group.

# vgextend <vgname> /dev/dsk/c#t#d#

4. Mirror all <vgname> logical volumes in the new physical volume.

# lvextend –m 1 /dev/<vgname>/lvol# /dev/dsk/c#t#d#

Authors[edit]