mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
vgmerge: support option --poolmetadataspare
This commit is contained in:
parent
9cbc9e8296
commit
4b856476e9
@ -1,6 +1,6 @@
|
||||
Version 2.03.13 -
|
||||
===============================
|
||||
Support --poolmetadataspare with vgsplit.
|
||||
Support --poolmetadataspare with vgsplit and vgmerge.
|
||||
Fix detection of active components of external origin volume.
|
||||
Add vdoimport tool to support conversion of VDO volumes.
|
||||
Support configurable allocation/vdo_pool_header_size.
|
||||
|
@ -27,6 +27,8 @@ of both VGs fit into the destination VG's limits.
|
||||
.br
|
||||
[ \fB-l\fP|\fB--list\fP ]
|
||||
.br
|
||||
[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
|
||||
.br
|
||||
[ COMMON_OPTIONS ]
|
||||
.ad b
|
||||
.RE
|
||||
@ -147,6 +149,13 @@ Display long help text.
|
||||
Disable locking.
|
||||
.
|
||||
.HP
|
||||
\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
|
||||
.br
|
||||
Enable or disable the automatic creation and management of a
|
||||
spare pool metadata LV in the VG. A spare metadata LV is reserved
|
||||
space that can be used when repairing a pool.
|
||||
.
|
||||
.HP
|
||||
\fB--profile\fP \fIString\fP
|
||||
.br
|
||||
An alias for --commandprofile or --metadataprofile, depending
|
||||
|
@ -1847,7 +1847,7 @@ DESC: Add devices from all accessible VGs to the devices file.
|
||||
---
|
||||
|
||||
vgmerge VG VG
|
||||
OO: --autobackup Bool, --list
|
||||
OO: --autobackup Bool, --list, --poolmetadataspare Bool
|
||||
ID: vgmerge_general
|
||||
|
||||
---
|
||||
|
@ -64,6 +64,8 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to,
|
||||
struct lv_list *lvl1, *lvl2;
|
||||
int r = ECMD_FAILED;
|
||||
int lock_vg_from_first = 0;
|
||||
struct logical_volume *lv;
|
||||
int poolmetadataspare = arg_int_value(cmd, poolmetadataspare_ARG, DEFAULT_POOL_METADATA_SPARE);
|
||||
|
||||
if (!strcmp(vg_name_to, vg_name_from)) {
|
||||
log_error("Duplicate volume group name \"%s\"", vg_name_from);
|
||||
@ -185,6 +187,10 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to,
|
||||
/* Flag up that some PVs have moved from another VG */
|
||||
vg_to->old_name = vg_from->name;
|
||||
|
||||
/* Check whether size of pmspare is big enough now for merged VG */
|
||||
if (!handle_pool_metadata_spare(vg_to, 0, &vg_to->pvs, poolmetadataspare))
|
||||
goto_bad;
|
||||
|
||||
/* store it on disks */
|
||||
log_verbose("Writing out updated volume group");
|
||||
if (!vg_write(vg_to) || !vg_commit(vg_to))
|
||||
|
Loading…
Reference in New Issue
Block a user