Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual page 45

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

striped. The number of stripes cannot be greater than the number of physical volumes in the volume
group (unless the --alloc anywhere argument is used).
If the underlying physical devices that make up a striped logical volume are different sizes, the
maximum size of the striped volume is determined by the smallest underlying device. For example, in
a two-legged stripe, the maximum size is twice the size of the smaller device. In a three-legged stripe,
the maximum size is three times the size of the smallest device.
The following command creates a striped logical volume across 2 physical volumes with a stripe of
64kB. The logical volume is 50 gigabytes in size, is named gfslv, and is carved out of volume group
vg0.
lvcreate -L 50G -i2 -I64 -n gfslv vg0
As with linear volumes, you can specify the extents of the physical volume that you are using for the
stripe. The following command creates a striped volume 100 extents in size that stripes across two
physical volumes, is named stripelv and is in volume group testvg. The stripe will use sectors
0-50 of /dev/sda1 and sectors 50-100 of /dev/sdb1.
# lvcreate -l 100 -i2 -nstripelv testvg /dev/sda1:0-50 /dev/sdb1:50-100
Using default stripesize 64.00 KB
Logical volume "stripelv" created
4.4.1.3. Creating Mirrored Volumes
When you create a mirrored volume, you specify the number of copies of the data to make with the -
m argument of the lvcreate command. Specifying -m1 creates one mirror, which yields two copies
of the file system: a linear logical volume plus one copy. Similarly, specifying -m2 creates two mirrors,
yielding three copies of the file system.
The following command creates a mirrored logical volume with a single mirror. The volume is 50
gigabytes in size, is named mirrorlv, and is carved out of volume group vg0:
lvcreate -L 50G -m1 -n mirrorlv vg0
An LVM mirror divides the device being copied into regions that, by default, are 512KB in size. You
can use the -R argument of the lvcreate command to specify the region size in MB. You can also
change the default region size by editing the mirror_region_size setting in the lvm.conf file.
Note
Due to limitations in the cluster infrastructure, cluster mirrors greater than 1.5TB cannot
be created with the default region size of 512KB. Users that require larger mirrors should
increase the region size from its default to something larger. Failure to increase the region
size will cause LVM creation to hang and may hang other LVM commands as well.
As a general guideline for specifying the region size for mirrors that are larger than 1.5TB,
you could take your mirror size in terabytes and round up that number to the next power
Creating Logical Volumes
33

Advertisement

Table of Contents
loading

Table of Contents