Alasdair Kergon
2c44337bd5
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Dave Wysochanski
8e8baf89c0
Fix vgsplit internal counting of snapshot LVs.
2008-04-23 14:33:06 +00:00
Alasdair Kergon
082628eb2c
missing stack
2008-04-15 14:57:12 +00:00
Dave Wysochanski
c5421d1554
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
f72dd2c732
.
2008-04-10 20:02:04 +00:00
Alasdair Kergon
3a370b7350
more pre-release cleanup
2008-04-10 19:59:43 +00:00
Alasdair Kergon
0b2a795ece
make list_move consistent with other list fns
2008-04-10 19:14:27 +00:00
Dave Wysochanski
985ca02b6a
Add vg_is_clustered() helper function.
...
Should be no functional change.
2008-04-10 17:09:32 +00:00
Dave Wysochanski
8965ff4bcf
Minor vgsplit cleanups.
2008-04-10 02:15:56 +00:00
Dave Wysochanski
3998882f2f
Add _move_one_lv() helper function for vgsplit.
2008-04-10 01:30:22 +00:00
Dave Wysochanski
eec663aa3b
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
85f5392e52
Update vgsplit to take "-n LogicalVolumeName" on the commandline.
2008-04-09 13:47:13 +00:00
Dave Wysochanski
e80512dd52
Fix vgsplit error display - fully remove log_suppress.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2008-04-08 21:47:54 +00:00
Dave Wysochanski
9ac3596d63
Fix vgsplit error paths to release vg_to lock.
2008-04-08 21:38:09 +00:00
Dave Wysochanski
cbfbc6766e
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
e283bda91d
Suppress "Volume group not found" message when vgsplit of new VG.
2008-04-02 13:08:49 +00:00
Dave Wysochanski
8e32e58e00
Use list_move() in applicable places.
2008-03-26 17:26:32 +00:00
Dave Wysochanski
a8bffd6c70
Refactor _move_pv() in vgsplit.
...
Should be no functional change.
2008-02-29 00:13:48 +00:00
Alasdair Kergon
67cdbd7e4d
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Dave Wysochanski
77ec1997b3
Fix vgsplit test mode
2008-01-22 03:49:39 +00:00
Dave Wysochanski
c1f2ce3938
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
1ce224d13f
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
d865615e9a
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
8868a4ffc2
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
b8daca8570
Allow vgcreate options as input to vgsplit when new vg is split destination.
2008-01-14 21:07:58 +00:00
Dave Wysochanski
3853d11fc8
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
6fcfb4048b
Refactor vgsplit for accepting existing vg as destination
2008-01-11 20:17:18 +00:00
Alasdair Kergon
b6f4f0c748
Fix --addtag to drop @ prefix from name
2007-11-15 21:59:11 +00:00
Alasdair Kergon
fed2f391ff
another vg_lock_and_read
2007-11-15 02:53:49 +00:00
Alasdair Kergon
e5f7352bef
Convert some vg_reads into vg_lock_and_reads
2007-11-15 02:20:03 +00:00
Alasdair Kergon
d38bf3616c
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
1b8de4cb25
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
21bc366486
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
be6845999b
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Dave Wysochanski
d2f218cc46
Fix error introduced with previous checkin
2007-07-23 21:10:36 +00:00
Dave Wysochanski
4f629c3bba
Add CORRECT_INCONSISTENT and FAIL_INCONSISTENT flags to vg_lock_and_read
2007-07-23 21:03:42 +00:00
Dave Wysochanski
891c3d298b
Add vg_lock_and_read() external library function.
2007-07-23 17:27:55 +00:00
Milan Broz
b9567c9561
Fix vgsplit if splitting all PVs from VG.
2007-06-28 17:59:34 +00:00
Dave Wysochanski
ff77bb1ab6
Remove get_ prefix from get_pv_* functions
2007-06-15 22:16:55 +00:00
Dave Wysochanski
b7dd5ac374
Convert pv->dev to get_pv_dev
2007-06-13 23:29:33 +00:00
Dave Wysochanski
ec26c285c2
Convert pv->pe_count to get_pv_pe_count
2007-06-13 22:11:29 +00:00
Dave Wysochanski
aeea47205b
Convert pv->pe_alloc_count to get_pv_pe_alloc_count
2007-06-13 22:04:45 +00:00
Dave Wysochanski
c221b0bc21
Add vg_check_status to consolidate vg status flags checks and error messages.
2007-06-06 19:40:28 +00:00
Milan Broz
b3b0f199ae
Fix and clarify vgsplit error messages.
2007-05-15 13:01:41 +00:00
Milan Broz
851002b87d
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
b9b260119f
Add a few missing pieces of vgname command line validation.
2007-03-09 21:25:33 +00:00
Alasdair Kergon
ce4c33102f
Fix vgsplit to handle mirrors.
...
Reorder fields in reporting field definitions.
2007-01-29 23:01:18 +00:00
Alasdair Kergon
e62436fc70
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
805dad5940
Propagate clustered flag in vgsplit and require resizeable flag.
2006-10-13 13:22:44 +00:00
Alasdair Kergon
dc4d7417f7
When using local file locking, skip clustered VGs.
...
Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
2006-09-02 01:18:17 +00:00