Alasdair Kergon
6f434cd94a
Rename vg_read() to vg_read_internal(). (mornfall)
2009-01-26 19:01:32 +00:00
Alasdair Kergon
a2bfad1c29
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Dave Wysochanski
b698ab9011
Fix vgsplit internal counting of snapshot LVs.
2008-04-23 14:33:06 +00:00
Alasdair Kergon
9ec26ed481
missing stack
2008-04-15 14:57:12 +00:00
Dave Wysochanski
e5a1db2392
Update vgsplit to only restrict split with active LVs involved in split.
...
Existing code will reject a vgsplit if any LVs in the source VG are active.
This patch updates vgsplit to only check LVs involved in the split.
2008-04-10 21:34:53 +00:00
Alasdair Kergon
ffc61f31de
.
2008-04-10 20:02:04 +00:00
Alasdair Kergon
e612871ea7
more pre-release cleanup
2008-04-10 19:59:43 +00:00
Alasdair Kergon
456e42257c
make list_move consistent with other list fns
2008-04-10 19:14:27 +00:00
Dave Wysochanski
57cb22ff3c
Add vg_is_clustered() helper function.
...
Should be no functional change.
2008-04-10 17:09:32 +00:00
Dave Wysochanski
0162abdcae
Minor vgsplit cleanups.
2008-04-10 02:15:56 +00:00
Dave Wysochanski
5801171518
Add _move_one_lv() helper function for vgsplit.
2008-04-10 01:30:22 +00:00
Dave Wysochanski
9b2147f608
Fix vgsplit to only move hidden 'snapshotN' LVs when necessary.
...
This bug has been around for a long time as far as I can tell.
Without this fix, a vgsplit would unconditionally move the
'hidden/internal' snapshot LVs, and result in corrupted metadata
in the following case:
vg1: contains lv1, lv1snap, both on pvset1
vg1: contains lv2, on pvset2
"vgsplit vg1 vg2 pvset2"
would result in "snapshot0" hidden LV being moved to vg2, and
the origin and cow being left in vg1. The tools detect the
corruption in vg2, but not in vg1.
2008-04-09 20:56:06 +00:00
Dave Wysochanski
c59745f9dd
Update vgsplit to take "-n LogicalVolumeName" on the commandline.
2008-04-09 13:47:13 +00:00
Dave Wysochanski
9c181fa3d3
Fix vgsplit error display - fully remove log_suppress.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2008-04-08 21:47:54 +00:00
Dave Wysochanski
3af0b1eb90
Fix vgsplit error paths to release vg_to lock.
2008-04-08 21:38:09 +00:00
Dave Wysochanski
49f7cfefd7
Fix vgsplit locking and remove unneeded error messages when split into new VG.
...
When vg_lock_and_read() calls were added, they were done so incorrectly for
the destination VG (vg_to). This resulted in the VG lock not obtained when
a new VG was the destination (vg_lock_and_read() would fail in the vg_read()
clause, which would then release the lock before returning NULL), and could
result in corrupted destination VG.
The fix was to put back the original lock_vol() and vg_read() calls for 'vg_to'.
The failure of vg_read() indicates "vg does not exist", and we key off that
to determine whether we are dealing with a new or existing VG as the
destination.
The first two error messages were also the result of the incorrect
vg_lock_and_read() calls:
Volume group "new" not found
cluster request failed: Invalid argument
New volume group "new" successfully split from "vg"
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=438249
2008-04-02 19:30:12 +00:00
Dave Wysochanski
fc365092f6
Suppress "Volume group not found" message when vgsplit of new VG.
2008-04-02 13:08:49 +00:00
Dave Wysochanski
fc0ec1e71e
Use list_move() in applicable places.
2008-03-26 17:26:32 +00:00
Dave Wysochanski
b1a4eac7a8
Refactor _move_pv() in vgsplit.
...
Should be no functional change.
2008-02-29 00:13:48 +00:00
Alasdair Kergon
1ddd4509dc
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Dave Wysochanski
d2eaff3204
Fix vgsplit test mode
2008-01-22 03:49:39 +00:00
Dave Wysochanski
95a69f99ba
Fix vgsplit - print different message on successful split of existing / new vg
...
Fix vgsplit - fix a couple error paths that forgot to call unlock_vg
Update vgsplit test cases
2008-01-22 03:25:45 +00:00
Dave Wysochanski
71d609895a
Fix vgsplit - print error if vgcreate option given w/existing vg destination
...
Fix vgsplit - reject split if metadata types or clustered attributes differ
Fix vgsplit - remove physicalextentsize option
Add vgsplit test cases
2008-01-22 02:48:53 +00:00
Dave Wysochanski
dad73465fc
Create vgs_are_compatible() fn to check whether vgs are compatible for merging.
...
Add new vgmerge and vgsplit tests to check rejection of incompatible vgs.
Cleanup comments.
Bugzilla: bz251992
---
lib/metadata/metadata-exported.h | 3 +
lib/metadata/metadata.c | 89 +++++++++++++++++++++++++++++++++-
test/t-vgmerge-usage.sh | 101 +++++++++++++++++++++++++++++++++++++++
test/t-vgsplit-operation.sh | 20 +++++++
tools/vgmerge.c | 69 --------------------------
tools/vgsplit.c | 5 -
6 files changed, 215 insertions(+), 72 deletions(-)
2008-01-16 19:54:39 +00:00
Dave Wysochanski
628d3bff45
Move more parameter validation into the library.
...
Update vgrename to call validate_vg_rename_params().
Fix vgcreate and vgsplit default arguments by adding defaults parameter to
fill_vg_create_params().
Add t-vgrename-usage.sh test.
Bugzilla: bz251992
---
tools/toollib.c | 32 ++++++++------------------------
tools/toollib.h | 5 ++---
tools/vgcreate.c | 35 +++++++++++++++++++++--------------
tools/vgrename.c | 35 ++++++-----------------------------
tools/vgsplit.c | 21 ++++++++++++++-------
5 files changed, 51 insertions(+), 77 deletions(-)
2008-01-15 22:56:30 +00:00
Dave Wysochanski
38857ba29e
Allow vgcreate options as input to vgsplit when new vg is split destination.
2008-01-14 21:07:58 +00:00
Dave Wysochanski
1c7520ec8f
Allow vgsplit into existing vg.
...
Add vgsplit tests to validate operation for new and existing vg destinations.
2008-01-11 21:43:16 +00:00
Dave Wysochanski
b2d68bd3d2
Refactor vgsplit for accepting existing vg as destination
2008-01-11 20:17:18 +00:00
Alasdair Kergon
7f722fe7d3
Fix --addtag to drop @ prefix from name
2007-11-15 21:59:11 +00:00
Alasdair Kergon
f01dd16a27
another vg_lock_and_read
2007-11-15 02:53:49 +00:00
Alasdair Kergon
df49287e5f
Convert some vg_reads into vg_lock_and_reads
2007-11-15 02:20:03 +00:00
Alasdair Kergon
705b96c6f9
Fix orphan-related locking in pvdisplay and pvs.
...
Fix missing VG unlocks in some pvchange error paths.
Add some missing validation of VG names.
Rename validate_vg_name() to validate_new_vg_name().
Change orphan lock to VG_ORPHANS.
Change format1 to use ORPHAN as orphan VG name.
2007-11-02 20:40:05 +00:00
Dave Wysochanski
9691ecc839
Add pv_dev_name() to access PV device name.
...
Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2007-10-12 14:29:32 +00:00
Alasdair Kergon
d080291150
Clean up numerous compiler warnings that crept in recently.
...
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
3f507a26fb
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Dave Wysochanski
c1490e2f7b
Fix error introduced with previous checkin
2007-07-23 21:10:36 +00:00
Dave Wysochanski
b004fe9556
Add CORRECT_INCONSISTENT and FAIL_INCONSISTENT flags to vg_lock_and_read
2007-07-23 21:03:42 +00:00
Dave Wysochanski
67142ad046
Add vg_lock_and_read() external library function.
2007-07-23 17:27:55 +00:00
Milan Broz
b228dfaf2c
Fix vgsplit if splitting all PVs from VG.
2007-06-28 17:59:34 +00:00
Dave Wysochanski
c75d4af4bc
Remove get_ prefix from get_pv_* functions
2007-06-15 22:16:55 +00:00
Dave Wysochanski
f88a4b7760
Convert pv->dev to get_pv_dev
2007-06-13 23:29:33 +00:00
Dave Wysochanski
f88fd88c38
Convert pv->pe_count to get_pv_pe_count
2007-06-13 22:11:29 +00:00
Dave Wysochanski
6e15145af1
Convert pv->pe_alloc_count to get_pv_pe_alloc_count
2007-06-13 22:04:45 +00:00
Dave Wysochanski
8b370b7cc1
Add vg_check_status to consolidate vg status flags checks and error messages.
2007-06-06 19:40:28 +00:00
Milan Broz
e0592c58b3
Fix and clarify vgsplit error messages.
2007-05-15 13:01:41 +00:00
Milan Broz
66f28e193a
Fix vgsplit for lvm1 format (set and validate VG name in PVs metadata).
...
Split metadata areas in vgsplit properly.
2007-03-23 12:43:17 +00:00
Alasdair Kergon
6ebdad3102
Add a few missing pieces of vgname command line validation.
2007-03-09 21:25:33 +00:00
Alasdair Kergon
0fd6ce546f
Fix vgsplit to handle mirrors.
...
Reorder fields in reporting field definitions.
2007-01-29 23:01:18 +00:00
Alasdair Kergon
459023d171
Free memory in _raw_read_mda_header() error paths.
...
Fix ambiguous vgsplit error message for split LV.
Fix lvextend man page typo.
2007-01-09 21:12:41 +00:00
Alasdair Kergon
860cf80703
Propagate clustered flag in vgsplit and require resizeable flag.
2006-10-13 13:22:44 +00:00