summaryrefslogtreecommitdiffstats
path: root/tools/args.h
diff options
context:
space:
mode:
authorJonathan Earl Brassow <jbrassow@redhat.com>2010-01-08 22:00:31 +0000
committerJonathan Earl Brassow <jbrassow@redhat.com>2010-01-08 22:00:31 +0000
commit72e0743621e9127cc4ea9f6fd735559f72f2e1ab (patch)
tree71e60a15b38e598531502b080d54c4b462592530 /tools/args.h
parentc9f27b1ca177b6fcbeb28c16f9476b935680edac (diff)
downloadlvm2-72e0743621e9127cc4ea9f6fd735559f72f2e1ab.tar.gz
lvm2-72e0743621e9127cc4ea9f6fd735559f72f2e1ab.tar.xz
lvm2-72e0743621e9127cc4ea9f6fd735559f72f2e1ab.zip
This patch adds the capability to split off a mirror legs.
It is pretty much the same as reducing the number of mirror legs, but we just don't delete them afterwards. The following command line interface is enforced: prompt> lvconvert --splitmirror <n> -n <name> <VG>/<LV> where 'n' is the number of images to split off, and where 'name' is the name of the newly split off logical volume. If more than one leg is split off, a new mirror will be the result. The newly split off mirror will have a 'core' log. Example: [root@bp-01 LVM2]# !lvs lvs -a -o name,copy_percent,devices LV Copy% Devices lv 100.00 lv_mimage_0(0),lv_mimage_1(0),lv_mimage_2(0),lv_mimage_3(0) [lv_mimage_0] /dev/sdb1(0) [lv_mimage_1] /dev/sdc1(0) [lv_mimage_2] /dev/sdd1(0) [lv_mimage_3] /dev/sde1(0) [lv_mlog] /dev/sdi1(0) [root@bp-01 LVM2]# lvconvert --splitmirrors 2 --name split vg/lv /dev/sd[ce]1 Logical volume lv converted. [root@bp-01 LVM2]# !lvs lvs -a -o name,copy_percent,devices LV Copy% Devices lv 100.00 lv_mimage_0(0),lv_mimage_2(0) [lv_mimage_0] /dev/sdb1(0) [lv_mimage_2] /dev/sdd1(0) [lv_mlog] /dev/sdi1(0) split 100.00 split_mimage_0(0),split_mimage_1(0) [split_mimage_0] /dev/sde1(0) [split_mimage_1] /dev/sdc1(0) It can be seen that '--splitmirror <n>' is exactly the same as '--mirrors -<n>' (note the minus sign), except there is the additional notion to keep the image being detached from the mirror instead of just throwing it away. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Diffstat (limited to 'tools/args.h')
-rw-r--r--tools/args.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/args.h b/tools/args.h
index 85f6a3cf..b41c275e 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -50,6 +50,7 @@ arg(nosync_ARG, '\0', "nosync", NULL, 0)
arg(resync_ARG, '\0', "resync", NULL, 0)
arg(corelog_ARG, '\0', "corelog", NULL, 0)
arg(mirrorlog_ARG, '\0', "mirrorlog", string_arg, 0)
+arg(splitmirrors_ARG, '\0', "splitmirrors", int_arg, 0)
arg(repair_ARG, '\0', "repair", NULL, 0)
arg(use_policies_ARG, '\0', "use-policies", NULL, 0)
arg(monitor_ARG, '\0', "monitor", yes_no_arg, 0)