1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00
Commit Graph

113 Commits

Author SHA1 Message Date
Milan Broz
2f7ee08288 Fix tools to report error when stopped by user.
(And do not produce internal error message.)
2009-12-03 19:18:33 +00:00
zkabelac
3dc1945b44 minor code comment update 2009-11-04 12:39:56 +00:00
Alasdair Kergon
22e91979bb Don't attempt to restart pvmoves when deactivating LVs in vgchange.
Restart lvconverts in vgchange by sharing lv_spawn_background_polling.
2009-09-29 20:22:35 +00:00
Alasdair Kergon
013f27e3e6 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
Petr Rockai
2997acf9dc Make lvchange --refresh only take a read lock on volume group. 2009-08-13 14:27:32 +00:00
Petr Rockai
2a4c743edd Remove lockingfailed().
We provide a lock type that behaves like no_locking, but is not
  clustered. Moreover, it also forbids any write locks. This magically (and
  consistently) prevents use of clustered VGs, or changing local VGs with
  --ignorelockingfailure. As a bonus, we can remove the special hacks in a few
  places. Of course, people looking for trouble can always set their locking_type
  to 0 to override.
2009-07-15 05:49:47 +00:00
Petr Rockai
a9d820ed2f Take just a read lock when activating in lvchange. 2009-07-15 05:48:36 +00:00
Petr Rockai
fa059a59a8 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
3479d0ee30 Rework the toollib interface (process_each_*) on top of new vg_read.
Sun May  3 12:32:30 CEST 2009  Petr Rockai <me@mornfall.net>
  * Rework the toollib interface (process_each_*) on top of new vg_read.

Rebased 6/26/09 by Dave W.
- Add skipping message to process_each_lv
- Remove inconsistent_t.
2009-07-01 17:00:50 +00:00
Milan Broz
42e922d587 Round readahead more inteligently and print warning.
Round readahead at least to one page up.
Print warning instead of verbose message.
2009-06-06 22:00:20 +00:00
Milan Broz
8189910b5a Fix convert polling to ignore LV with different UUID.
When mirror convert polling is started (mainly as backgound process,
in lvchange -a y or in lvconvert itself) it tries to read VG
and LV identified by its name.

Unfortunatelly, the VG can have already different LV under the same name,
and various more or less funny things can happen (note that
_finish_lvconvert_mirror suspends the volume for example).

(the typical example is our testing script which continuously recreates
LVs under the same name in the same VG.)

This patch adds optional uuid parameter which helps to properly
select the monitoring object. For lvconvert polling it is set to LV UUID
and both _get_lvconvert_vg and _get_lvconvert_lv uses it to read proper VG/LV.

(In the pvmove case it is NULL, here we poll for physical volume name).
2009-06-01 14:43:27 +00:00
Alasdair Kergon
880d9bb33f Suppress 'removed' messages displayed when internal LVs are removed.
Fix lvchange -a and -p for sparse LVs.
Fix lvcreate --virtualsize to activate the new device immediately.
2009-05-27 18:19:21 +00:00
Milan Broz
b4747ad67f Use lock query instead of activate_lv_excl
- switch lvremove to not force activate volume when removing
 - ditto for force resync

 - fix some wrong return codes in lvchange_resync()
2009-05-20 09:55:33 +00:00
Milan Broz
c94f02648c Merge lv_is_displayable and lv_is_visible.
Displayable and visible is the same thing.

volumes_count(vg) is now vg_visible_lvs() and always
returns number of LVs from user perspective.
2009-05-13 21:27:43 +00:00
Alasdair Kergon
174f5a3a49 Add sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).
Add lvs origin_size field.
Fix linux configure --enable-debug to exclude -O2.

Still a few rough edges, but hopefully usable now:
  lvcreate -s vg1 -L 100M --virtualoriginsize 1T
2009-04-25 01:17:59 +00:00
Dave Wysochanski
0cf1e72ed1 Remove some trailing whitespace so git won't complain. 2009-04-22 12:46:25 +00:00
Milan Broz
5800560602 Move metadata backup call after vg_commit.
The backup() call store metadata from memory.

But in cluster backup() call performs
remote nodes metadata backup and it reads data from disk.

For metadata backup consistency,
patch moves all backup() calls after vg_commit.

(Moreover, some tools already do that this way.)
2009-04-21 14:31:57 +00:00
prajnoha
370dc2d727 Fix vgrename using UUID in case there are VGs with the same name. 2008-12-19 14:22:48 +00:00
Dave Wysochanski
211b07a2e2 Create global is_static() to eliminate from the library init function.
Very simple / crude method of removing 'is_static' from initialization.
Why should we require an application tell us whether it is linked
statically or dynamically to libLVM?  If the application is linked
statically, but libraries exist and dlopen() calls succeed, why
do we care if it's statically linked?
2008-12-18 05:27:17 +00:00
prajnoha
481618826d Added displayable_lvs_in_vg and lv_is_displayable functions to deal with
the counts of visible LVs from user's perspective consistently throughout
the code.
2008-12-04 15:54:26 +00:00
Alasdair Kergon
5936ac58c2 Change lvchange exit status to indicate if any part of the operation failed. 2008-07-31 13:03:01 +00:00
Zdeněk Kabeláč
949c1ab517 Improve/Fix read ahead 'auto' calculation for stripe_size
Fix lvchange output for -r auto setting if auto is already set
Add testcase for read ahead
2008-06-18 11:32:14 +00:00
Alasdair Kergon
2d4cf0c9f5 Temporarily disable dmeventd mirror monitoring during lvchange --resync. 2008-05-21 14:10:11 +00:00
Dave Wysochanski
57cb22ff3c Add vg_is_clustered() helper function.
Should be no functional change.
2008-04-10 17:09:32 +00:00
Alasdair Kergon
1ddd4509dc Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
Alasdair Kergon
6af3f4f4cf Use stack return macros throughout. 2008-01-30 13:19:47 +00:00
Alasdair Kergon
ad2e7218cb Refactor mirror log attachment code. 2008-01-26 00:25:04 +00:00
Alasdair Kergon
917637fa9b Fix internal metadata corruption in lvchange --resync. 2008-01-26 00:13:45 +00:00
Alasdair Kergon
06b103c8d4 Various lvconvert/polldaemon-related fixes from NEC. See lvm-devel
for original patches & explanations.
2008-01-10 18:35:51 +00:00
Alasdair Kergon
403779437c round readahead to multiple of page size in tools 2007-12-05 19:24:32 +00:00
Alasdair Kergon
c74fa11518 readahead activation code (but no dm support yet) 2007-11-12 20:51:54 +00:00
Alasdair Kergon
c0eff8a07f Enhance the management of readahead settings. 2007-11-09 16:51:54 +00:00
Alasdair Kergon
3f507a26fb Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
Alasdair Kergon
bb6d3b6cfd Add --ignoremonitoring to disable all dmeventd interaction. 2007-06-18 14:14:33 +00:00
Petr Rockai
10e4254e7d Allow keyboard interrupts in yes_no_prompt(). Add code to toollib.c
loops and to pvcreate.c, lvchange.c and lvresize.c to handle
interrupted prompts.
2007-06-15 10:11:14 +00:00
Alasdair Kergon
d0f7067471 lvm.static no longer interacts with dmeventd unless explicitly asked to. 2007-01-24 23:43:27 +00:00
Alasdair Kergon
f4bd12e8e9 register->monitor etc. 2007-01-19 22:21:45 +00:00
Alasdair Kergon
c975a100b1 Report dmeventd mirror monitoring status. 2007-01-12 20:38:30 +00:00
Alasdair Kergon
a10227eb03 Prevent permission changes on active mirrors. 2007-01-10 19:56:39 +00:00
Alasdair Kergon
45be8a836b fix last check-in: lv->size is in sectors 2006-11-03 21:07:15 +00:00
Alasdair Kergon
954b6032e7 Fix mirror log LV writing to set all bits in whole LV. 2006-11-02 23:33:20 +00:00
Alasdair Kergon
05195e2b1d try forcesync -> resync 2006-10-24 17:18:25 +00:00
Alasdair Kergon
e5692a4721 fix forcesync local active detection 2006-10-24 15:30:33 +00:00
Alasdair Kergon
312e6a0d31 Add lvchange --forcesync. 2006-10-23 23:03:55 +00:00
Alasdair Kergon
d84c5391f7 Retain activation state after changing LV minor number with --force. 2006-10-13 21:33:31 +00:00
Alasdair Kergon
92a6746e70 Fix activation logic in lvchange --persistent. 2006-07-10 19:39:14 +00:00
Alasdair Kergon
445dd17db3 Add --monitor to vgcreate and lvcreate to control dmeventd registration.
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
2006-05-12 19:16:48 +00:00
Alasdair Kergon
45dca55fc8 Make SIZE_SHORT the default for display_size().
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
e092ce51f6 Attempt to load missing targets using modprobe.
Simplify dev_manager_info().
2005-10-17 18:00:02 +00:00
Alasdair Kergon
a08b85dbc8 Change LV locking macros to take lv instead of lvid. 2005-08-15 12:00:04 +00:00