Dave Wysochanski
11647ad01c
Use del_pvl_from_vgs() in vgreduce paths.
...
Somehow these got missed in earlier patches.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-13 17:26:20 +00:00
Dave Wysochanski
0adfbfd5ea
Call add_pvl_to_vgs() and del_pvl_from_vgs() from more places.
...
Now that we have library functions to add/delete a pv from the vg->pvs
list, call them from everywhere.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-13 17:26:03 +00:00
Alasdair Kergon
770dc81b8e
Introduce is_missing_pv().
2010-03-16 14:37:38 +00:00
Petr Rockai
3dfeaca59b
Also clean up MISSING devices in --removemissing --force in vgreduce.
2009-12-17 13:54:46 +00:00
Alasdair Kergon
651ff9b328
Add lots of missing stack debug messages to tools.
...
Make readonly locking available as locking type 4.
Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
2009-09-14 22:47:49 +00:00
Dave Wysochanski
fd443e0245
Remove redundant validate_name in vgreduce.
...
This check is now done in vg_read_for_update, thanks to mornfall.
Should be no functional change.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-24 11:13:36 +00:00
Petr Rockai
21a98eda88
Port process_each_pv to new vg_read.
2009-07-15 05:50:22 +00:00
Petr Rockai
19089ba331
Refuse to open VG with MISSING_PVs for update unless handles_missing_pvs is set.
2009-07-15 05:47:55 +00:00
Dave Wysochanski
4c35d6dee6
Remove unneeded LOCK_NONBLOCKING from vg_read() API.
...
Remove unneeded LOCK_NONBLOCKING from vg_read() API and tools that
use it. We no longer need this flag anywhere since we now automatically
set LCK_NONBLOCK inside lock_vol() if vgs_locked().
For further details, see:
commit d52b3fd3fe
Author: Dave Wysochanski <dwysocha@redhat.com>
Date: Wed May 13 13:02:52 2009 +0000
Remove NON_BLOCKING lock flag from tools and set a policy to auto-set.
As a simplification to the tools and further liblvm, this patch pushes
the setting of NON_BLOCKING lock flag inside the lock_vol() call.
The policy we set is if any existing VGs are currently locked, we
set the NON_BLOCKING flag.
At some point it may make sense to add this flag back if we get an
RFE from a liblvm user, but for now let's keep it as simple as
possible.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2009-07-08 14:33:17 +00:00
Dave Wysochanski
542ef24d9f
Convert vgreduce to use vg_read_for_update.
...
Sun May 3 12:50:58 CEST 2009 Petr Rockai <me@mornfall.net>
* Convert vgreduce to use vg_read_for_update.
Rebased 6/26/2009 - Dave W.
2009-07-01 17:01:46 +00:00
Petr Rockai
1f164ad9d0
- Ignore suspended devices during repair (Milan).
...
- Call vgreduce --removemissing (without --force) automatically to clean up bad
PVs (Milan).
2009-06-15 14:47:39 +00:00
Alasdair Kergon
25a2e7b80e
Pre-release cleanups.
2009-05-21 03:04:52 +00:00
Dave Wysochanski
5a820745ce
Remove NON_BLOCKING lock flag from tools and set a policy to auto-set.
...
As a simplification to the tools and further liblvm, this patch pushes
the setting of NON_BLOCKING lock flag inside the lock_vol() call.
The policy we set is if any existing VGs are currently locked, we
set the NON_BLOCKING flag.
Should be no functional change.
2009-05-13 13:02:52 +00:00
Milan Broz
cd978f74da
Fix vgreduce --removemissing failure exit code.
2009-04-22 17:00:28 +00:00
Milan Broz
043b13625b
Properly release VG memory pool in all CLI tools.
2009-04-10 10:01:38 +00:00
Milan Broz
ea0cdd28c1
Separate PV label attributes which do not need parse metadata when reporting.
...
When reporting explicitly label attributes (pv_uuid for example), we do not
need to read metadata.
This patch separate the label fileds and removes scan_vgs_for_pvs
in process_each_pv() if not needed.
(There should be no user visible change in output.)
2009-02-09 09:45:49 +00:00
Alasdair Kergon
8544a8a254
Rename vg_read() to vg_read_internal(). (mornfall)
2009-01-26 19:01:32 +00:00
Alasdair Kergon
2c44337bd5
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Alasdair Kergon
6e410af1d6
fix last release
2008-09-19 15:44:03 +00:00
Alasdair Kergon
8c5bcdabab
Improve the way VGs with PVs missing are handled so manual intervention
...
is required in fewer circumstances. (mornfall)
2008-09-19 06:42:00 +00:00
Alasdair Kergon
7a71d71a94
remove unused var
2008-09-19 03:45:34 +00:00
Alasdair Kergon
324e23b72d
Avoid shuffling remaining mirror images when removing one, retaining primary.
2008-09-18 19:56:50 +00:00
Alasdair Kergon
6eb44b5091
Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.
...
Add (empty) orphan VGs to lvmcache during initialisation.
Fix orphan VG name used for format_pool.
2008-04-08 12:49:21 +00:00
Alasdair Kergon
bb097a97ea
split orphan VG by format type
2008-02-06 15:47:28 +00:00
Alasdair Kergon
2871881859
undo a few 'stack' moves
2008-01-30 14:17:29 +00:00
Alasdair Kergon
67cdbd7e4d
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Alasdair Kergon
c51b9fff19
Use stack return macros throughout.
2008-01-30 13:19:47 +00:00
Alasdair Kergon
db24ceca33
rename lv_remap_error
2008-01-17 13:54:05 +00:00
Alasdair Kergon
5cf3c51857
lvconvert/vgreduce fixes
2008-01-17 13:13:54 +00:00
Alasdair Kergon
72baf0c345
Maintain lists of stacked LV segments using each LV.
2008-01-16 19:00:59 +00:00
Alasdair Kergon
cd1525ac51
note pvmove breakage
2007-11-19 18:24:08 +00:00
Alasdair Kergon
57d921e953
more vg_read lock fixes
2007-11-15 21:30:52 +00:00
Alasdair Kergon
223c62e7b7
Avoid nested vg_reads when processing PVs in VGs and fix associated locking.
2007-11-14 18:41:05 +00:00
Alasdair Kergon
a6b22cf317
readahead activation code (but no dm support yet)
2007-11-12 20:51:54 +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
d6b1de30fe
Convert vg->status checks to use vg_check_status function.\nRename status_flags to status in vg_check_status.
2007-06-19 04:36:12 +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
9dcbe73897
Convert pv->size to get_pv_size
2007-06-13 23:02:51 +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
Alasdair Kergon
b9b260119f
Add a few missing pieces of vgname command line validation.
2007-03-09 21:25:33 +00:00
Alasdair Kergon
9397354a33
Support the /dev/mapper prefix on most command lines.
2007-03-09 20:47:41 +00:00
Alasdair Kergon
aa350ef426
Fix some &->&& vgreduce cmdline validation. [Andre Noll]
2007-01-31 16:26:23 +00:00
Alasdair Kergon
7c0cd2730c
Avoid vgreduce error when mirror code removes the log LV.
2007-01-09 23:14:35 +00:00
Alasdair Kergon
4dc0ec2253
Adjust some alignments for ia64 and sparc.
...
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
fe748f0092
fix vgreduce clustered check
2006-09-07 23:23:45 +00:00