There are three different methods/ways to mirror logical volume in hp-ux.
1) Using the dfault value you can extend your logical volume -
# lvextend -m 1 /dev/vgname/lvolName
This is simple hp-ux mirroring. LVEXTEND will mirror the logical volume to the next immediate disk/LUN e.g. cxtxdx
2) Assuming you want to mirror you logical volume on a specific disk/LUN.
# lvextend -m 1 /dev/vgname/lvolname /dev/dsk/cxtxdx
Mirror logical volume to the given disk/LUN e.g. cxtxdx
Using “lvdisplay /dev/vgname/lvolname -v” , you can confirm if your logical volume is mirrored to the disk as defined in lvextend.
3) The third method involves amending/creating /etc/lvmpvg
# vi /etc/lvmpvg
This will allow you to have a strict policy (see # man lvextend) for mirroring using Physical Volume group file.
# cat /etc/lvmpvg
PVG /dev/vgname
PVG PVG
/dev/dsk/c0t1d0
/dev/dsk/c0t1d1
/dev/dsk/c0t1d2
PVG PVGm1 (Mirror PV)
/dev/dsk/c1t2d0
/dev/dsk/c1t2d1
/dev/dsk/c1t2d2
From the above example, the first 3 devices in the lvmpvg file are the primary devices. The next 3 devices in the lvmpvg file are the mirror devices.
# mount /dev/vgname/lvolname (make sure the file system is mounted)
#lvchange -a g /dev/vgname/lvol (you are telling the logical volume to use lvmpvg file)
This will force the logical volume to create mirror on to another set of 3 devices as defined in lvmpvg file – under PVGm1.
So, now if you use lvxtend without any device names, it should create a mirror on the devices as defined under PVGm1.
#lvextend -m 1 /dev/vgname/lvol – (This should create a mirror on PV in PVGm1 group)
- Mirroring Logical Volumes in 3 ways
Your IP Address is:
38.107.191.118
Clap



