]> 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)
commitd3582e025277861ef184e7a5d099f6e7138a7dce
tree71dff0c80893daa7593586bf4258170a974cf078
parenta80192b6a7dcb08224db1e2623fc6c5d5b9975f4
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.032669 seconds and 5 git commands to generate.