Monday, December 7, 2015

How to create a Striped Logical Volume in HP-UX LVM | How to create a Spanned Logical Volume in HP-UX | How to create a concatenated LV in HP-UX LVM

  1. How to create a striped LV on HP-UX?

Answer: The creation of striped LV can be done as below.

lvcreate -L <LV_SIZE_IN_MB> -I <Stripe_UNIT_SIZE> -i <number_of_stripes> -n <LV_NAME> /dev/<VG_NAME>

  1. How to create a spanned Logical Volume?
The Spanned logical volume gets the Physical Extents from the multiple PVs in a VG. This can also be called to be similar as implementation of the Concatenated volume.
The creation can be done as follows.

lvcreate -n my_spanned_lv /dev/vg01

This creates an LV of 0 size in the VG vg01 with the LV Name as my_spanned_lv.

Extend this LV to the disks of the VGs as shown.

Assuming that the VG contains three PVs as /dev/dsk/c6t0d0 /dev/dsk/c6t0d1 and /dev/dsk/c6t0d2 and I want 333 MB coming from each disk, we can do the following.

lvextend -L 333 /dev/vg01/my_spanned_lv /dev/dsk/c6t0d0
lvextend -L 333 /dev/vg01/my_spanned_lv /dev/dsk/c6t0d1

lvextend -L 333 /dev/vg01/my_spanned_lv /dev/dsk/c6t0d2

No comments:

Post a Comment