]> sourceware.org Git - lvm2.git/commit
Add the ability to convert linear LVs to RAID1
authorJonathan Earl Brassow <jbrassow@redhat.com>
Fri, 7 Oct 2011 14:52:26 +0000 (14:52 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Fri, 7 Oct 2011 14:52:26 +0000 (14:52 +0000)
commit50a48b38f5bee242c7906cc22c100bde7f475e84
tree71dff0c80893daa7593586bf4258170a974cf078
parent76ab2642004d56add4f0ddd2924f0e2baefde1a6
Add the ability to convert linear LVs to RAID1

Example:
~> lvconvert --type raid1 -m 1 vg/lv

The following steps are performed to convert linear to RAID1:
1) Allocate a metadata device from the same PV as the linear device
   to provide the metadata/data LV pair required for all RAID components.
2) Allocate the required number of metadata/data LV pairs for the
   remaining additional images.
3) Clear the metadata LVs.  This performs a LVM metadata update.
4) Create the top-level RAID LV and add the component devices.

We want to make any failure easy to unwind.  This is why we don't create the
top-level LV and add the components until the last step.  Should anything
happen before that, the user could simply remove the unnecessary images.  Also,
we want to ensure that the metadata LVs are cleared before forming the array to
prevent stale information from polluting the new array.

A new macro 'seg_is_linear' was added to allow us to distinguish linear LVs
from striped LVs.
WHATS_NEW
lib/metadata/raid_manip.c
lib/metadata/segtype.h
test/t-lvconvert-raid.sh
tools/commands.h
tools/lvconvert.c
This page took 0.034071 seconds and 5 git commands to generate.