diff options
author | Jonathan Earl Brassow <jbrassow@redhat.com> | 2011-11-30 02:02:10 +0000 |
---|---|---|
committer | Jonathan Earl Brassow <jbrassow@redhat.com> | 2011-11-30 02:02:10 +0000 |
commit | 0c506d9a40536c30f5150e3b4b7c9c1df285bc74 (patch) | |
tree | cf713241be300e3b7a356c35d17cf5c6ce052882 /lib/raid/raid.c | |
parent | 910440212b9c1a96e60288457e168c139b9466cf (diff) | |
download | lvm2-0c506d9a40536c30f5150e3b4b7c9c1df285bc74.tar.gz lvm2-0c506d9a40536c30f5150e3b4b7c9c1df285bc74.tar.xz lvm2-0c506d9a40536c30f5150e3b4b7c9c1df285bc74.zip |
Support the ability to replace specific devices in a RAID array.
RAID is not like traditional LVM mirroring. LVM mirroring required failed
devices to be removed or the logical volume would simply hang. RAID arrays can
keep on running with failed devices. In fact, for RAID types other than RAID1,
removing a device would mean substituting an error target or converting to a
lower level RAID (e.g. RAID6 -> RAID5, or RAID4/5 to RAID0). Therefore, rather
than removing a failed device unconditionally and potentially allocating a
replacement, RAID allows the user to "replace" a device with a new one. This
approach is a 1-step solution vs the current 2-step solution.
example> lvconvert --replace <dev_to_remove> vg/lv [possible_replacement_PVs]
'--replace' can be specified more than once.
example> lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lv
Diffstat (limited to 'lib/raid/raid.c')
-rw-r--r-- | lib/raid/raid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/raid/raid.c b/lib/raid/raid.c index c3fc4b13..445146b0 100644 --- a/lib/raid/raid.c +++ b/lib/raid/raid.c @@ -183,7 +183,7 @@ static int _raid_add_target_line(struct dev_manager *dm __attribute__((unused)), } for (s = 0; s < seg->area_count; s++) - if (seg_lv(seg, s)->status & LV_NOTSYNCED) + if (seg_lv(seg, s)->status & LV_REBUILD) rebuilds |= 1 << s; if (!dm_tree_node_add_raid_target(node, len, _raid_name(seg), |