ignored.
The following command creates a mirrored logical volume with a single mirror. The volume is
500 megabytes in size, it is named
mirrorlv
, and it is carved out of volume group
vg0
. The first
leg of the mirror is on device
/dev/sda1
, the second leg of the mirror is on device
/dev/sdb1
,
and the mirror log is on
/dev/sdc1
.
lvcreate -L 500M -m1 -n mirrorlv vg0 /dev/sda1 /dev/sdb1 /dev/sdc1
The following command creates a mirrored logical volume with a single mirror. The volume is
500 megabytes in size, it is named
mirrorlv
, and it is carved out of volume group
vg0
. The first
leg of the mirror is on extents 0 through 499 of device
/dev/sda1
, the second leg of the mirror is
on extents 0 through 499 of device
/dev/sdb1
, and the mirror log starts on extent 0 of device
/dev/sdc1
. These are 1MB extents. If any of the specified extents have already been allocated,
they will be ignored.
lvcreate -L 500M -m1 -n mirrorlv vg0 /dev/sda1:0-499 /dev/sdb1:0-499
/dev/sdc1:0
4.1.4. Changing Mirrored Volume Configuration
You can convert a logical volume from a mirrored volume to a linear volume or from a linear
volume to a mirrored volume with the
lvconvert
command. You can also use this command to
reconfigure other mirror parameters of an existing logical volume, such as
corelog
.
When you convert a logical volume to a mirrored volume, you are basically creating mirror legs
for an existing volume. This means that your volume group must contain the devices and space
for the mirror legs and for the mirror log.
If you lose a leg of a mirror, LVM converts the volume to a linear volume so that you still have
access to the volume, without the mirror redundancy. After you replace the leg, you can use the
lvconvert
command to restore the mirror. This procedure is provided in
Section 3, “Recovering
from LVM Mirror Failure”
.
The following command converts the linear logical volume
vg00/lvol1
to a mirrored logical
volume.
lvconvert -m1 vg00/lvol1
The following command converts the mirrored logical volume
vg00/lvol1
to a linear logical
volume, removing the mirror leg.
lvconvert -m0 vg00/lvol1
Creating Logical Volumes
37
Содержание GLOBAL FILE SYSTEM 5.0
Страница 1: ...LVM Administrator s Guide Configuration and Administration 5 0 ISBN N A Publication date...
Страница 4: ...LVM Administrator s Guide...
Страница 8: ...viii...
Страница 18: ...6...
Страница 28: ...16...
Страница 32: ...20...
Страница 80: ...68...
Страница 90: ...78...
Страница 92: ...80...
Страница 94: ...82...
Страница 112: ...100...