mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
metadata: format_text: provide more detailed error message when metadata too large for PV mda
Also, leave out the note about "circular buffer" which is an internal imeplementation detail anyway and not quite informational for users: Before this patch: $ vgcreate vg1 /dev/sda VG vg1 metadata too large for circular buffer Failed to write VG vg1. With this patch applied: $ vgcreate vg1 /dev/sda VG vg1 metadata too large: size of metadata to write is 691 bytes while PV metadata area size on /dev/sda is 512 bytes. Failed to write VG vg1.
This commit is contained in:
parent
e04424e87e
commit
3d03e504cd
@ -655,8 +655,11 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
|
||||
if ((new_wrap && old_wrap) ||
|
||||
(rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset)) ||
|
||||
(mdac->rlocn.size >= mdah->size)) {
|
||||
log_error("VG %s metadata too large for circular buffer",
|
||||
vg->name);
|
||||
log_error("VG %s metadata too large: size of metadata to write "
|
||||
"is %" PRIu64 " bytes while PV metadata area size "
|
||||
"on %s is %" PRIu64 " bytes.",
|
||||
vg->name, mdac->rlocn.size,
|
||||
dev_name(mdac->area.dev), mdah->size);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user