1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

4165 Commits

Author SHA1 Message Date
Zdenek Kabelac
814aebc4e9 Use $(top_builddir) for inclusion of make.tmpl in Makefiles. 2010-03-04 09:51:37 +00:00
Zdenek Kabelac
c2fa9fa909 Use datarootdir and fix warning during configure process:
config.status: WARNING:  'make.tmpl.in' seems to ignore the --datarootdir setting.
2010-03-04 09:48:19 +00:00
Zdenek Kabelac
e24fb506a5 Usage of AC_PROG_SED and AC_PROG_MKDIR_P requires autoconf version 2.61. 2010-03-04 09:46:38 +00:00
Mike Snitzer
c485fe183e Handle a misaligned device that reports a -1 alignment_offset.
The kernel's blk_stack_limits() function may flag a device as
'misaligned'.  If it does the alignment_offset will be -1.

Update set_pe_align_offset() to accommodate this corner case.
2010-03-02 21:56:14 +00:00
Alasdair Kergon
16d9293bd7 Extend core allocation code in preparation for mirrored log areas. 2010-03-01 20:00:20 +00:00
Fabio M. Di Nitto
630e13edd8 - fix whitespaces all over (tabs/spaces)
- increase timeout to 30 secs (on Chrissie request)
- source both cluster and clvmd for options (like all the other cluster
  init scripts)
- add clustered_vgs and _lvs commodity fns
- move rh_status* fns at the top, so they can be reused
- heavily cleanup start and stop fns from redundant code and unnecessary
  loops
- improve output from different operations
- make the init script lsb compliant
- don´t force kill of the daemon, send only a TERM signal and then wait
for it to exit
- Resolves rhbz#533247
2010-02-26 13:07:43 +00:00
Milan Broz
65752052e1 Remove lvs_in_vg_activated_by_uuid_only call.
There is no difference from lvs_in_vg_activated now,
convert all users to this call.
2010-02-24 20:01:40 +00:00
Milan Broz
ab9663f394 Always query device by uuid only.
lvm2 devices have always UUID set even if imported from lvm1 metadata.

Patch removes name argument from dev_manager_info call and converts
all activation related calls to use query by UUID.

Also it simplifies mknode call (which is the only user on mknodes parameter).
2010-02-24 20:00:56 +00:00
Dave Wysochanski
1a443ddd20 Update WHATS_NEW. 2010-02-24 18:21:15 +00:00
Dave Wysochanski
322633e1f5 Add Doxygen file for lvm2app to generate documentation from lvm2app.h.
A simple Doxygen file for lvm2app documentation.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:54 +00:00
Dave Wysochanski
3fe35b3283 Update doxygen comments for lvm2app.h.
Fix add/remove tag function headers.
Fix a lot of little problems with doxygen comments.
Clarify the basic objects and their handles, and place functions with their
appropriate handles/objects.
All this cleanup moves automatic documentation of lvm2app much closer to being
useful as official documentation.  In the future I will add some examples
and plan to build the examples as part of the unit tests.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:44 +00:00
Dave Wysochanski
d8c4949f3e Update lvm2app interactive unit test for vg/lv tags.
Simple test of vg/lv tag addition/deletion.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:35 +00:00
Dave Wysochanski
a6ca9ac0bc Add lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().
Add lvm2app functions to manage LV tags.
For lvm_lv_get_tags(), we return a list of tags, similar to other
functions that return lists.  An empty list is returned if there
are no tags.  NULL is returned if there is a problem obtaining
the list of tags.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:26 +00:00
Dave Wysochanski
a8ab586770 Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().
Add lvm2app functions to manage VG tags.
For lvm_vg_get_tags(), we return a list of tags, similar to other
functions that return lists.  An empty list is returned if there
are no VG tags.  NULL is returned if there is a problem obtaining
the list of tags.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:18 +00:00
Dave Wysochanski
ccc2e192a0 Add tag_list_copy() supporting function inside lvm2app.
Add a supporting function to copy a list of internal tags to lvm2app list.
We need to put this here because of the lvm_str_list_t type which we export
in lvm2app.h.  If we didn't export this type, we could put this in the
internal library and use struct str_list.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:10 +00:00
Dave Wysochanski
3c23ff0f2e Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()
We need to allocate memory for the tag and copy the tag value before we
add it to the list of tags.  We could put this inside lvm2app since the
tools keep their memory around until vg_write/vg_commit is called, but
we put it inside the internal library to minimize code in lvm2app.
We need to copy the tag passed in by the caller to ensure the lifetime of
the memory until the {vg|lv} handle is released.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:57 +00:00
Dave Wysochanski
cd69ee7453 Refactor lvchange_tag() to call lv_change_tag() library function.
Similar refactoring to vgchange - pull out common parts and put into
library function for reuse.  Should be no functional change.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:49 +00:00
Dave Wysochanski
aee205752a Refactor vgcreate to call new vg_change_tag() function.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:40 +00:00
Dave Wysochanski
e17bcc7432 Refactor _vgchange_tag() to vg_change_tag() library function.
Pull out common code to be called from tools as well as lvm2app.
Leave archive() at tool level so we can use from vgcreate
as well as vgchange.  Should be no functional change.
- add stack macro in vgchange

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:05 +00:00
Petr Rockai
f59b0f3e07 Add _mlog devices to dependency trees using UUID, not name, in activation. 2010-02-23 15:49:52 +00:00
Petr Rockai
2fbeba9c32 Relax a check on blkid exit value, which seems to be different in different
versions. Fixes a spurious test failure introduced with -o pipefail.
2010-02-22 14:47:55 +00:00
Mike Snitzer
4bdebfd151 Do not reload origin again in lv_remove_single() if it had a merging
snapshot.  vg_remove_snapshot() will have already performed the required
reload.
2010-02-17 23:36:45 +00:00
Mike Snitzer
a5ec3e3827 Refactor snapshot-merge deptree and device removal to support info-by-uuid
Add a merging snapshot to the deptree, using the "error" target, rather
than avoid adding it entirely.  This allows proper cleanup of the -cow
device without having to rename the -cow to use the origin's name as a
prefix.

Move the preloading of the origin LV, after a merge, from
lv_remove_single() to vg_remove_snapshot().  Having vg_remove_snapshot()
preload the origin allows the -cow device to be released so that it can
be removed via deactivate_lv().  lv_remove_single()'s deactivate_lv()
reliably removes the -cow device because the associated snapshot LV,
that is to be removed when a snapshot-merge completes, is always added
to the deptree (and kernel -- via "error" target).

Now when the snapshot LV is removed both the -cow and -real devices
get removed using uuid rather than device name.  This paves the way
for us to switch over to info-by-uuid queries.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2010-02-17 22:59:46 +00:00
Petr Rockai
943c443426 In testsuite, catch also failures that happen in the middle of a pipeline. 2010-02-17 15:41:28 +00:00
Dave Wysochanski
97d91b30e6 Add nightly test to cover vg/lv tags add/delete.
Simple nightly test coverage for adding / deleting lv/vg tags via
create and change functions.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-16 17:49:18 +00:00
Dave Wysochanski
6371bcbe55 Add get_{pv|vg|lv}_field() nightly test helper functions.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-16 17:48:46 +00:00
Alasdair Kergon
13d8501f1c use lvm2app to refer to library now 2010-02-16 01:14:34 +00:00
Alasdair Kergon
9e7b0091bb post-release 2010-02-16 00:27:01 +00:00
Alasdair Kergon
c97cbf8c08 pre-release 2010-02-15 23:53:15 +00:00
Zdenek Kabelac
00da033166 Update 2010-02-15 20:32:27 +00:00
Zdenek Kabelac
d251e86856 Use dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1' 2010-02-15 20:27:33 +00:00
Dave Wysochanski
c8a5d26667 Update lvm2app.h comments to remove hidden VG comment list vgnames/vgids.
Peter recently fixed lvm_list_vg_names() and lvm_list_vg_uuids() so they
no longer return hidden names.  Remove the comment in lvm2app.h.
2010-02-15 19:55:49 +00:00
Zdenek Kabelac
4979d41a98 * update for last 3 commits 2010-02-15 18:42:51 +00:00
Zdenek Kabelac
d98d855918 Fix dm_report_field_uint64 to really use 64bit.
(function is currently not in use)
2010-02-15 18:36:48 +00:00
Zdenek Kabelac
810349313a Cleanup float arithmetic gcc warning. 2010-02-15 18:35:06 +00:00
Zdenek Kabelac
88c4995d1d * add more 'const' - fixes gcc constness warning 2010-02-15 18:34:00 +00:00
Peter Rajnoha
b9259173d0 Add LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable to suppress error
and warning mesages while --ignorelockingfailure is used.
2010-02-15 16:46:56 +00:00
Peter Rajnoha
5ef2c36a6b Remove hard-coded rule to skip _mimage devices in 11-dm-lvm.rules.
There's a tiny period of time when the _mimage device is visible during
downconversion from mirror to linear. Since it is visible, we need to
create the symlinks, otherwise warning messages will be issued about udev
not creating those symlinks. We have to rely on udev flags completely.
2010-02-15 16:38:22 +00:00
Peter Rajnoha
b7117425ab Update man page for dmsetup: --udevcookie, udevcreatecookie and udevreleasecookie. 2010-02-15 16:32:24 +00:00
Peter Rajnoha
be40fe90ae Use udev transactions in testsuite. 2010-02-15 16:30:13 +00:00
Peter Rajnoha
3c134e0165 Don't use LVM_UDEV_DISABLE_CHECKING environment variable anymore.
Set the state automatically based on udev and libdevmapper dev path comparison.
If these paths differ, disable udev checking.
2010-02-15 16:26:48 +00:00
Peter Rajnoha
f0e073fcdc Several changes in dmsetup and libdevmapper:
- add DM_UDEV_DISABLE_LIBRARY_FALLBACK udev flag to rely on udev only

 - export dm_udev_create_cookie function to create new cookies on demand

 - add --udevcookie, udevcreatecookie and udevreleasecookie for dmsetup
   (to support "udev transactions" where one cookie value can be used for
    several dmsetup calls)

 - don't use DM_UDEV_DISABLE_CHECKING env. var. anymore and set the state
   automatically (based on udev and libdevmapper dev path comparison)
2010-02-15 16:21:33 +00:00
Peter Rajnoha
acbb93a383 Rename "stat" to "status" in dmeventd_snapshot.c.
Otherwise "warning: declaration of ‘stat’ shadows a global declaration"
will appear because it shadows "stat" from stat.h.
2010-02-15 12:55:20 +00:00
Dave Wysochanski
5ffe56d800 Update simple lvm2app unit test for new size apis.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-14 03:23:07 +00:00
Dave Wysochanski
629efc6a89 Export lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.
We add these exports to show the pv_size and pv_free and dev_size
fields.
Fixes rhbz561423.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-14 03:21:37 +00:00
Dave Wysochanski
ed3329eb45 Fix off by 512 sizes for lvm2app.
Internally we store sizes in sectors, but lvm2app exports sizes
in bytes.  We could get fancier and allow units configuration but
this fix should do for now.

Fixes rhbz561422.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-14 03:21:06 +00:00
Mike Snitzer
a5ce579672 Add 'fail_if_percent_unsupported' arg to _percent() and _percent_run(). 2010-02-10 15:56:20 +00:00
Mike Snitzer
15816a3b8c Add 'fail_if_percent_unsupported' arg to _percent() and _percent_run().
We unfortunately don't yet _know_, in dev_manager_snapshot_percent(), if
a snapshot-merge target is active (activation is deferred if dev is
open); so we can't short-circuit origin devices based purely on existing
LVM LV attributes.

Set 'fail_if_percent_unsupported' in dev_manager_snapshot_percent() for
a merging origin LV, otherwise passing unsupported LV types to _percent
will lead to a default successful return with percent_range as
PERCENT_100.

For a merging origin, PERCENT_100 will result in a polldaemon that runs
infinitely (because completion is PERCENT_0).
2010-02-10 14:38:24 +00:00
Mike Snitzer
d6bf26af8e Remove false "failed to find tree node for <lv>" error from _cached_info().
When activating a merging origin it is valid, and expected, to not have
a node in the deptree for both the origin and its merging snapshot.  The
_cached_info() caller is only concerned with whether a device is open.
If there isn't a node in the tree the associated device is definitely
not open.
2010-02-08 23:28:06 +00:00
Petr Rockai
57f5ec5d6c Make lvconvert --repair --use-policies exit with success when no action is needed. 2010-02-06 07:44:16 +00:00