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

3219 Commits

Author SHA1 Message Date
Christine Caulfield
c35df82da9 Block SIGINT & SIGTERM in clvmd subthreads so they don't delay shutdown.
Patch from Xinwei Hu, Thanks
2009-03-24 11:49:15 +00:00
Takahiro Yasui
fbd97a3425 Restore log_suppress state when metadata backup file is up-to-date.
Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-23 22:57:27 +00:00
Takahiro Yasui
36881b0133 Remove old metadata backup file after renaming vg.
Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-23 22:29:06 +00:00
Takahiro Yasui
6a8feb3c26 Fix size and error message of memory allocation at backup initialization.
Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-23 21:56:32 +00:00
Takahiro Yasui
1d13e51826 Fix error message when adding metadata directory to internal list fails.
Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-23 21:13:37 +00:00
Petr Rockai
1b2e147cc8 Missed file from previous checkin. 2009-03-17 14:40:00 +00:00
Petr Rockai
a9d72f0e9d Some extra (paranoid) checks on dev_is_{md,swap} result. 2009-03-17 14:00:58 +00:00
Petr Rockai
3402ccd488 Detect and wipe swap signatures in pvcreate. 2009-03-17 13:59:56 +00:00
Dave Wysochanski
d917c98cd8 Fix some clean rules, fix previous distclean checkin.
In libdm/Makefile.in, we need to cleanup the symlink properly.
Adding to CLEAN_TARGETS seemed like the simplest way to do this
in the current build framework.  We could redo dependencies for
VERSIONED_SHLIB, but for now just add to CLEAN_TARGETS.

For scripts/Makefile.in, we should be adding to DISTCLEAN_TARGETS.
The generic rule in make.tmpl.in takes care of the cleanup.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-16 20:00:10 +00:00
Dave Wysochanski
f5ac9a9495 Fix some distclean rules.
By gnu coding stds, 'distclean' should remove all files generated
by ./configure in addition to what 'clean' does.

Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-16 18:28:04 +00:00
Milan Broz
d726767f14 Fix warning in previous commit. 2009-03-16 15:19:29 +00:00
Milan Broz
7f436a0f39 Fix lv_count when manipulating with snapshots and max_lv is set.
Patch fixes these problems:
 - during the snapshot creation process, it needs create 2 LVs,
   one is cow, second becomes snapshot.
   If the code fails in vg_add_snapshot, code lvcreate will not remove
   LV cow volume.

 - if max_lv is set and VG contains snapshot, it can happen that
   during the activation lv_count is temporarily increased over the limit
   and VG metadata are not properly processed
   see https://bugzilla.redhat.com/show_bug.cgi?id=490298

 - vgcfgrestore alows restore with max_lv set to lower valuer that actual
   LV count. This later leads to situation that max_lv is completely ignored.

 - vgck doesn't call vg_validate(). It should at least try:-)

Signed-off-by: Milan Broz <mbroz@redhat.com>
2009-03-16 14:34:57 +00:00
Dave Wysochanski
470304e2a2 Remove unnecessary includes in lvm_base.c.
We would like to declare our handles pv_t, vg_t, and lv_t in
the external library header lvm.h.  However, these are already
defined in metadata-exported.h for the use of some of the
in-progress liblvm APIs.  Thus, we cannot both define
them in lvm.h and include metadata-exported.h in the external
library C files.  We could use preprocessor tricks (#ifndef)
but for now we just avoid the include.
2009-03-10 15:38:46 +00:00
Milan Broz
01a3cb443e Fix clvmd build after liblvm commit. 2009-03-10 12:10:12 +00:00
Dave Wysochanski
47e1baf1e4 Fix error messages when PV uuid or pe_start reading fails.
Author: Takahiro Yasui <tyasui@redhat.com>
Committer: Dave Wysochanski <dwysocha@redhat.com>
2009-03-09 15:42:10 +00:00
Dave Wysochanski
d0e0cb9973 Add missing liblvm/.exported_symbols 2009-03-08 18:58:53 +00:00
Dave Wysochanski
fac0314c58 Fix liblvm version symlink. 2009-03-08 18:10:39 +00:00
Dave Wysochanski
4df86ce1ac Remove unnecessary linker flags for liblvm. 2009-03-08 17:29:26 +00:00
Dave Wysochanski
77986fa71a Add DSO generation for new LVM application library.
Fix test/api/test build.
2009-03-08 17:06:55 +00:00
Dave Wysochanski
227301e041 Move lvm.h from lib to liblvm. 2009-03-06 22:49:48 +00:00
Dave Wysochanski
e0c64c6c35 Add new liblvm build directory and move lvm_base.c.
The original liblvm.a has been moved to liblvm-internal.a.
We now use liblvm.a for the new application library and build
it inside liblvm directory.

Change dependencies so tools depend on liblvm application library,
and application library depends on liblvm internal.
2009-03-06 16:19:52 +00:00
Dave Wysochanski
0bf8455b64 Rename liblvm to liblvm-internal.
Make preparation for using liblvm for new application library.
2009-03-06 16:17:28 +00:00
Christine Caulfield
436cd05156 Fix unlocks in clvmd-corosync.
The DLM unlock returns EUNLOCK in the lksb on success, not 0
2009-03-06 11:29:38 +00:00
Milan Broz
fe3a28e2cc Fix possible increasing in memory allocation if refreshing_context
(for example when CLVMD_CMD_LOCK_VG for is called during vgscan).

If clvmd calls LV lock, it calls
    /* clean the pool for another command */
	dm_pool_empty(cmd->mem);
to clean up memory pool after command.

Unfortunately, do_refresh_cache() do not call this
and because during it operation it allocates some memory,
the pool increases.

Also do_refresh_cache should use lvm_lock
(it manipulates with lvm internal data).

The same applies for lvm_backup command.

Signed-off-by: Milan Broz <mbroz@redhat.com>
2009-03-05 16:25:35 +00:00
Alasdair Kergon
ab5be5f065 post-release 2009-03-03 18:25:05 +00:00
Milan Broz
c3b50730b8 vgname_from_mda now tries to parse for vgname even
if rlocn not defined (there is no metadata area).

In most cases it fails in validate_name(),
unfortunately there are situatuions, when
validate_name is ok and later code fails with
checksum error.

Reproducer:

# dd if=/dev/zero of=/dev/loop0

# pvcreate --metadatasize 637k /dev/loop0
  Physical volume "/dev/loop0" successfully created

# pvs /dev/loop0
  /dev/loop0: Checksum error
      PV         VG   Fmt  Attr PSize PFree
        /dev/loop0      lvm2 --   1.00M 1.00M

Signed-off-by: Milan Broz <mbroz@redhat.com>

-
2009-03-03 16:35:32 +00:00
Alasdair Kergon
3361724033 pre-release 2009-03-03 13:03:03 +00:00
Alasdair Kergon
81680dce3c Fix last check-ins: seg can be NULL. 2009-02-28 20:04:24 +00:00
Alasdair Kergon
2b23864219 . 2009-02-28 19:43:42 +00:00
Alasdair Kergon
ed82bfd2ba Attempt cleanup in child before execing new binary in exec_cmd() 2009-02-28 00:54:06 +00:00
Alasdair Kergon
8a4e6cac0a . 2009-02-27 23:55:15 +00:00
Alasdair Kergon
bc175d2870 fsadm cleanups & release prep 2009-02-27 23:40:11 +00:00
Alasdair Kergon
e2997b7328 autoreconf (using fedora 10 for this now) 2009-02-25 23:33:30 +00:00
Milan Broz
83d026861c pe_start can be overwritten in VG metadata, so it is not PV label-only field. 2009-02-25 23:31:06 +00:00
Milan Broz
7b1c853bd9 Try to avoid full rescan if label scan is enough. 2009-02-25 23:29:06 +00:00
Alasdair Kergon
edf47283de Use pkgconfig to obtain corosync library details during configuration. (kabi) 2009-02-25 22:41:12 +00:00
Christine Caulfield
b36d715a92 Fix error returns in clvmd-corosync interface to DLM.
Thanks to Xinwei Hu for spotting this.
2009-02-25 14:33:00 +00:00
Dave Wysochanski
82c29eedc0 Update vgchange and vgmknodes man pages to include --refresh.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-02-25 13:17:40 +00:00
Zdenek Kabelac
c8669f6b13 Fixed bug where lvresize option -t was not properly passed to fsadm.
Using argv[] list in exec_cmd() to allow more params for external commands.
Fsadm does not allow checking mounted filesystem.
Fsadm no longer accepts 'any other key' as 'no' answer to y/n.
Fsadm improved handling of command line options.
2009-02-24 15:48:00 +00:00
Thomas Woerner
049cbb75b8 Fix include/.symlinks for lvm2.h to lvm.h renaming
Author: Thomas Woerner <twoerner@redhat.com>
2009-02-24 13:13:56 +00:00
Thomas Woerner
5f4b7a2644 Added files lib/lvm.h and lib/lvm_base.c:
New structure lvm (used as an alias to cmd_context), new type definition lvm_t
for the lvm handle. Added functions lvm_create, lvm_destroy and
lvm_reload_config using the new handle.

Modified test/api/test.c:
Use new lvm.h header file and lvm_t handle.

Removed lib/lvm2.h


Author: Thomas Woerner <twoerner@redhat.com>
2009-02-24 13:03:45 +00:00
Milan Broz
0241c10fd6 Fix validation of dataalignment value introduced in previous commit. 2009-02-23 16:53:42 +00:00
Alasdair Kergon
ec6a6fbef2 Move tools/version.h to lib/misc/lvm-version.h.
Split LVM_VERSION into MAJOR, MINOR, PATCHLEVEL, RELEASE and RELEASE_DATE.
2009-02-22 22:11:58 +00:00
Alasdair Kergon
7ac8b7c340 Add system_dir parameter to create_toolcontext() and call it system_dir
everywhere for consistency.
2009-02-22 21:14:37 +00:00
Milan Broz
47870122d7 Comment out pvcreate pagesize alignment test for now. 2009-02-22 19:32:28 +00:00
Alasdair Kergon
8929ce6651 Add --dataalignment to pvcreate to specify alignment of data area. (mbroz)
This patch is not fully tested and leaves some related bugs unfixed.

Intended behaviour of the code now:

  pe_start in the lvm2 format PV label header is set only by pvcreate (or
vgconvert -M2) and then preserved in *all* operations thereafter.

  In some specialist cases, after the PV is added to a VG, the pe_start
field in the VG metadata may hold a different value and if so, it
overrides the other one for as long as the PV is in such a VG.

  Currently, the field storing the size of the data area in the PV label
header always holds 0.  As it only has meaning in the context of a
volume group, it is calculated whenever the PV is added to a VG (and can
be derived from extent_size and pe_count in the VG metadata).
2009-02-22 19:00:26 +00:00
Alasdair Kergon
47c0f6ae76 Fix interrupt unblocking after vgcreate, for example: drop_cached_metadata()
previously left _vg_lock_count incremented.
Other locks are always held during drop_cached_metadata() so there's no
need to increment+decrement it.
2009-02-22 16:13:57 +00:00
Alasdair Kergon
277534474e Provide da and mda locations in debug message when writing text format label. 2009-02-20 23:19:28 +00:00
Alasdair Kergon
45bec96725 Mention the restriction on file descriptors at invocation on the lvm man page. 2009-02-20 01:47:02 +00:00
Petr Rockai
62b248d2ed In testsuite's not.c, print a notice when program dies of a fatal signal. 2009-02-17 19:37:28 +00:00