]> sourceware.org Git - lvm2.git/log
lvm2.git
11 years agopython-lvm: Memory leaks & seg. fault fixes
Tony Asleson [Thu, 25 Oct 2012 22:31:11 +0000 (17:31 -0500)]
python-lvm: Memory leaks & seg. fault fixes

Issues found (thus far) in unit test developemnt for python bindings.

Added Py_DECREF(ptr) in liblvm_lvm_vg_open & liblvm_lvm_vg_create
in error paths so that we correctly clean up memory.

Added a call to lvm_vg_close when we remove a vg.  The code was
clearing out the vg pointer which prevented us from actually
calling lvm_vg_close in the close path.

liblvm_lvm_vg_create_lv_linear was not initializing
lvobj->parent_vgobj and if lvm_vg_create_lv_linear failed
we went through liblvm_lv_dealloc on clean up and tried to
Py_DECREF an invalid pointer.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agoWHATS_NEW: latest changes under libdm 1.02.78
Peter Rajnoha [Thu, 25 Oct 2012 14:29:35 +0000 (16:29 +0200)]
WHATS_NEW: latest changes under libdm 1.02.78

11 years agolvmetad: whats_new + more explanation for previous commit
Peter Rajnoha [Thu, 25 Oct 2012 12:47:45 +0000 (14:47 +0200)]
lvmetad: whats_new + more explanation for previous commit

11 years agolvmetad: Disable and warn when locking_type is 3.
Petr Rockai [Thu, 25 Oct 2012 12:30:03 +0000 (14:30 +0200)]
lvmetad: Disable and warn when locking_type is 3.

11 years agomirror: Avoid reading mirrors with failed devices in mirrored log
Jonathan Brassow [Thu, 25 Oct 2012 05:42:45 +0000 (00:42 -0500)]
mirror:  Avoid reading mirrors with failed devices in mirrored log

Commit 9fd7ac7d035f0b2f8dcc3cb19935eb181816bd76 did not handle mirrors
that contained mirrored logs.  This is because the status line of the
mirror does not give an indication of the health of the mirrored log,
as you can see here:
        [root@bp-01 lvm2]# dmsetup status vg-lv vg-lv_mlog
        vg-lv: 0 409600 mirror 2 253:6 253:7 400/400 1 AA 3 disk 253:5 A
        vg-lv_mlog: 0 8192 mirror 2 253:3 253:4 7/8 1 AD 1 core
Thus, the possibility for LVM commands to hang still persists when mirror
have mirrored logs.  I discovered this while performing some testing that
does polling with 'pvs' while doing I/O and killing devices.  The 'pvs'
managed to get between the mirrored log device failure and the attempt
by dmeventd to repair it.  The result was a very nasty block in LVM
commands that is very difficult to remove - even for someone who knows
what is going on.  Thus, it is absolutely essential that the log of a
mirror be recursively checked for mirror devices which may be failed
as well.

Despite what the code comment says in the aforementioned commit...
+ * _mirrored_transient_status().  FIXME: It is unable to handle mirrors
+ * with mirrored logs because it does not have a way to get the status of
+ * the mirror that forms the log, which could be blocked.
... it is possible to get the status of the log because the log device
major/minor is given to us by the status output of the top-level mirror.
We can use that to query the log device for any DM status and see if it
is a mirror that needs to be bypassed.  This patch does just that and is
now able to avoid reading from mirrors that have failed devices in a
mirrored log.

11 years agomirror: Avoid reading from mirrors that have failed devices
Jonathan Brassow [Wed, 24 Oct 2012 04:10:33 +0000 (23:10 -0500)]
mirror:  Avoid reading from mirrors that have failed devices

Addresses: rhbz855398 (Allow VGs to be built on cluster mirrors),
           and other issues.

The LVM code attempts to avoid reading labels from devices that are
suspended to try to avoid situations that may cause the commands to
block indefinitely.  When scanning devices, 'ignore_suspended_devices'
can be set so the code (lib/activate/dev_manager.c:device_is_usable())
checks any DM devices it finds and avoids them if they are suspended.

The mirror target has an additional mechanism that can cause I/O to
be blocked.  If a device in a mirror fails, all I/O will be blocked
by the kernel until a new table (a linear target or a mirror with
replacement devices) is loaded.  The mirror indicates that this condition
has happened by marking a 'D' for the faulty device in its status
output.  This condition must also be checked by 'device_is_usable()' to
avoid the possibility of blocking LVM commands indefinitely due to an
attempt to read the blocked mirror for labels.

Until now, mirrors were avoided if the 'ignore_suspended_devices'
condition was set.  This check seemed to suggest, "if we are concerned
about suspended devices, then let's ignore mirrors altogether just
in case".  This is insufficient and doesn't solve any problems.  All
devices that are suspended are already avoided if
'ignore_suspended_devices' is set; and if a mirror is blocking because
of an error condition, it will block the LVM command regardless of the
setting of that variable.

Rather than avoiding mirrors whenever 'ignore_suspended_devices' is
set, this patch causes mirrors to be avoided whenever they are blocking
due to an error.  (As mentioned above, the case where a DM device is
suspended is already covered.)  This solves a number of issues that weren't
handled before.  For example, pvcreate (or any command that does a
pv_read or vg_read, which eventually call device_is_usable()) will be
protected from blocked mirrors regardless of how
'ignore_suspended_devices' is set.  Additionally, a mirror that is
neither suspended nor blocking is /allowed/ to be read regardless
of how 'ignore_suspended_devices' is set.  (The latter point being the
source of the fix for rhbz855398.)

11 years agoWHATS_NEW: Entry for commit e1917809477c4850cc1094121001d61a2b70ef26
Jonathan Brassow [Wed, 24 Oct 2012 02:38:37 +0000 (21:38 -0500)]
WHATS_NEW:  Entry for commit e1917809477c4850cc1094121001d61a2b70ef26

WHATS_NEW commit for 'lvs' output change to add RAID 4/5/6 sync %age
to s/Copy%/Cpy%Sync/ output.

11 years agoRAID: Make RAID 4/5/6 display sync status under heading s/Copy%/Cpy%Sync
Jonathan Brassow [Wed, 24 Oct 2012 02:19:27 +0000 (21:19 -0500)]
RAID:  Make RAID 4/5/6 display sync status under heading s/Copy%/Cpy%Sync

The heading 'Copy%' is specific to PVMOVE volumes, but can be generalized
to apply to LVM mirrors also.  It is a bit awkward to use 'Copy%' for
RAID 4/5/6, however - 'Sync%' would be more appropriate.  This is why
RAID 4/5/6 have not displayed their sync status by any means available to
'lvs' yet.

Example (old):
[root@hayes-02 lvm2]# lvs vg
  LV      VG   Attr      LSize  Pool Origin Data%  Move Log Cpy%Sy Convert
  lv    vg   -wi-a----  1.00g
  raid1 vg   rwi-a-r--  1.00g                             100.00
  raid4 vg   rwi-a-r--  1.01g
  raid5 vg   rwi-a-r--  1.01g
  raid6 vg   rwi-a-r--  1.01g

This patch changes the heading to 'Cpy%Sync' and allows RAID 4/5/6 to print
their sync percent in this field.

Example (new):
[root@hayes-02 lvm2]# lvs vg
  LV    VG   Attr      LSize Pool Origin Data%  Move Log Cpy%Sync Convert
  lv    vg   -wi-a---- 1.00g
  raid1 vg   rwi-a-r-- 1.00g                               100.00
  raid4 vg   rwi-a-r-- 1.01g                               100.00
  raid5 vg   rwi-a-r-- 1.01g                               100.00
  raid6 vg   rwi-a-r-- 1.01g                               100.00

11 years agomirror/raid: Move 'copy_percent' to common code (mirror.c -> lv_manip.c)
Jonathan Brassow [Wed, 24 Oct 2012 01:33:54 +0000 (20:33 -0500)]
mirror/raid:  Move 'copy_percent' to common code (mirror.c -> lv_manip.c)

The 'copy_percent' function takes the 'extents_copied' field from each
segment in an LV to create the numerator for the ratio that is to
become the copy_percent.  (Otherwise known as the 'sync' percent for
non-pvmove uses, like mirror LVs and RAID LVs.)  This function safely
works on RAID - not just mirrors - so it is better to have it in
lv_manip.c rather than mirror.c.

There's a lot of different functions that do a lot of different things
in lv_manip.c, so I placed the function near a function in lv_manip.c
that it was close to in metadata-exported.h.  Different placement in the
file or a different name for the function may be useful.

11 years agopython-lvm: seg. fault in liblvm_lvm_percent_to_float
Tony Asleson [Tue, 23 Oct 2012 19:50:14 +0000 (14:50 -0500)]
python-lvm: seg. fault in liblvm_lvm_percent_to_float

The first parameter needs to be present even if it isn't being
used, otherwise the one any only parameter we get is null
which causes PyArg_ParseTuple to seg. fault.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agoudev_sync: cookie_set=1 on each dm_task_set_cookie call
Peter Rajnoha [Tue, 23 Oct 2012 09:40:53 +0000 (11:40 +0200)]
udev_sync: cookie_set=1 on each dm_task_set_cookie call

cookie_set variable found in the struct dm_task should be always
set to 1 after dm_task_set_cookie_call, even if udev_sync is disabled
as the cookie itself carries synchronization informations *as well as*
extra flags to control other aspects of udev support.

For example, one could disable the synchronization itself, but still
direct the libdm code to disable library fallback via
DM_UDEV_DISABLE_LIBRARY_FALLBACK flag. These extra flags still need
to be carried out!

A concrete example:
  $ dmsetup create test --table "0 1 zero" --noudevsync

This disables synchronization with udev. As the --verifyudev option is
not used, we don't want to do any corrections. In other words, we
need DM_UDEV_DISABLE_LIBRARY_FALLBACK flag to be used. However,
with --noudevsync this was not the case - the flag was ignored!

This patch fixes the case when noudevsync is used but there are still
some extra flags passed within the cookie flag part. The synchronization
part of the cookie stays zero (which is ok as dm_udev_wait call on such a
cookie is simply a NOOP).

11 years agoversion: update
Marian Csontos [Mon, 22 Oct 2012 12:16:06 +0000 (14:16 +0200)]
version: update

11 years agoclvmd: fix parsing of -d argument
Zdenek Kabelac [Fri, 19 Oct 2012 13:18:19 +0000 (15:18 +0200)]
clvmd: fix parsing of -d argument

clvmd -d option parsing was not working properly.

clvmd -d 2   (with space) has been ignored because of
'::' used in getopt string, and as failsafe it's been used '1'.

Later this debug_arg has been ignored and debug_opt was used
instead which happend to have value '1'.

Submitted-by: Robert Milasan <rmilasan at suse.com>
Reported-by: Robert Milasan <rmilasan at suse.com>
11 years agolvchange: support --yes option for --persistent
Zdenek Kabelac [Fri, 19 Oct 2012 12:16:15 +0000 (14:16 +0200)]
lvchange: support --yes option for --persistent

Support using command: lvchange --yes --persistent
to skip y|n prompt.

11 years agocleanup: fix typo in error message
Zdenek Kabelac [Fri, 19 Oct 2012 11:57:22 +0000 (13:57 +0200)]
cleanup: fix typo in error message

yes -> yet

11 years agopvcreate: fix leak on error path
Zdenek Kabelac [Thu, 18 Oct 2012 12:32:56 +0000 (14:32 +0200)]
pvcreate: fix leak on error path

Missing vg release on error path.
Add tests for few more error cases.

12 years agopython-lvm: Implement proper refcounting for parent objects
Andy Grover [Wed, 17 Oct 2012 19:55:25 +0000 (12:55 -0700)]
python-lvm: Implement proper refcounting for parent objects

Our object nesting:

lib -> VG -> LV -> lvseg
          -> PV -> pvseg

Implement refcounting and checks to ensure parent objects are not
dealloced before their children. Also ensure calls to self or child's
methods are handled cleanly for objects that have been closed or removed.

Ensure all functions that are object methods have a first parameter named
'self', for consistency

Rename local vars that reference a Python object to '*obj', in order to
differentiate from liblvm handles

Fix a misspelled pv method name

Signed-off-by: Andy Grover <agrover@redhat.com>
12 years agoUse lv_is_active instead of lv_info()
Zdenek Kabelac [Tue, 31 Jan 2012 22:42:53 +0000 (23:42 +0100)]
Use lv_is_active instead of lv_info()

Usage of lv_is_active makes it more obvious what is being checked.

12 years agocleanup: move log_error upward in code stack
Zdenek Kabelac [Tue, 16 Oct 2012 08:20:02 +0000 (10:20 +0200)]
cleanup: move log_error upward in code stack

Report log_error earlier.

12 years agocleanup: switch log_error to log_warn
Zdenek Kabelac [Tue, 16 Oct 2012 08:14:41 +0000 (10:14 +0200)]
cleanup: switch log_error to log_warn

Use log_warn to print non-fatal warning messages.

Use of log_error would confuse checker for testing
whether proper error has been reported for some real error.

12 years agocleanup: swap return values
Zdenek Kabelac [Tue, 16 Oct 2012 08:07:27 +0000 (10:07 +0200)]
cleanup: swap return values

Use lvm standard return code for success/fail  1/0.

12 years agopython-lvm: Update example to work with lvm object removal.
Tony Asleson [Mon, 15 Oct 2012 20:54:19 +0000 (13:54 -0700)]
python-lvm: Update example to work with lvm object removal.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
12 years agopython-lvm: whitespace and Yoda conditionals
Andy Grover [Mon, 15 Oct 2012 20:34:43 +0000 (13:34 -0700)]
python-lvm: whitespace and Yoda conditionals

Signed-off-by: Andy Grover <agrover@redhat.com>
12 years agopython-lvm: Remove liblvm object
Andy Grover [Mon, 15 Oct 2012 20:26:01 +0000 (13:26 -0700)]
python-lvm: Remove liblvm object

Instead of requiring users to create a liblvm object, and then calling
methods on it, the module acquires a liblvm handle as part of
initialization. This makes it impossible to instantiate a liblvm object
with a different systemdir, but there is an alternate envvar method for
that obscure use case.

Signed-off-by: Andy Grover <agrover@redhat.com>
12 years agoTEST: Re-add testing of lvconvert-raid for kernels < 3.2
Jonathan Brassow [Mon, 15 Oct 2012 20:43:15 +0000 (15:43 -0500)]
TEST:  Re-add testing of lvconvert-raid for kernels < 3.2

I'm not sure what 'BUG's were being encountered when the restriction
to limit lvconvert-raid.sh tests to kernels > 3.2 was added.  I do know
that there were BUG's that could be triggered when testing snapshots and
some of the earliest DM RAID available in the kernel.  I've taken out
the 3.2 kernel restriction and added a dm-raid >= 1.2 restriction instead.
This will allow the test to run on patched production kernels.

12 years agoRAID: Add "raid10" to lvcreate man page.
Jonathan Brassow [Mon, 15 Oct 2012 20:41:14 +0000 (15:41 -0500)]
RAID:  Add "raid10" to lvcreate man page.

In addition to reference to raid10 under the '--type' argument, an
example creating a RAID10 LV has been added.

12 years agoClean-up: Adjust message to be clearer on action taken and why
Jonathan Brassow [Mon, 15 Oct 2012 20:09:05 +0000 (15:09 -0500)]
Clean-up:  Adjust message to be clearer on action taken and why

A message is printed when the region_size of a RAID LV is adjusted
to allow for large (> ~1TB) LVs.  The message wasn't very clear.
Hopefully, this is better.

12 years agorelease: prepare for release v2_02_98
Alasdair G Kergon [Mon, 15 Oct 2012 14:19:32 +0000 (15:19 +0100)]
release: prepare for release

12 years agoscripts: blk-availability - use full name for clarity
Peter Rajnoha [Mon, 15 Oct 2012 14:10:58 +0000 (16:10 +0200)]
scripts: blk-availability - use full name for clarity

"Stopping blk-availability" -> "Stopping block device availability:"

12 years agolibdm: fix comments in libdevmapper.h
Peter Rajnoha [Mon, 15 Oct 2012 13:40:37 +0000 (15:40 +0200)]
libdm: fix comments in libdevmapper.h

12 years agolvmetad: rename DEBUG() to DEBUGLOG()
Alasdair G Kergon [Mon, 15 Oct 2012 13:20:11 +0000 (14:20 +0100)]
lvmetad: rename DEBUG() to DEBUGLOG()

DEBUG is already defined by -DDEBUG

12 years agoMakefiles: fix distclean dir dependency
Alasdair G Kergon [Mon, 15 Oct 2012 13:15:59 +0000 (14:15 +0100)]
Makefiles: fix distclean dir dependency

test distclean uses tools so must distclean tools after test

12 years agoscripts: blk-availability should be stopped before FCoE
Peter Rajnoha [Mon, 15 Oct 2012 12:50:17 +0000 (14:50 +0200)]
scripts: blk-availability should be stopped before FCoE

12 years agotest: resync is for mirror devices
Zdenek Kabelac [Mon, 15 Oct 2012 12:31:41 +0000 (14:31 +0200)]
test: resync is for mirror devices

12 years agolvchange: resync returns error on usupported volumes
Zdenek Kabelac [Mon, 15 Oct 2012 11:42:18 +0000 (13:42 +0200)]
lvchange: resync returns error on usupported volumes

12 years agothin: disable conversion of thin-pool to read-only
Zdenek Kabelac [Mon, 15 Oct 2012 11:41:38 +0000 (13:41 +0200)]
thin: disable conversion of thin-pool to read-only

This change is not yet supported.

12 years agotest: detect compilation with readline
Zdenek Kabelac [Mon, 15 Oct 2012 11:18:32 +0000 (13:18 +0200)]
test: detect compilation with readline

check lvm shell functionality only if compiled with readline.

12 years agothin: allow to create read-only thin-volumes
Zdenek Kabelac [Mon, 8 Oct 2012 09:23:52 +0000 (11:23 +0200)]
thin: allow to create read-only thin-volumes

Useful for i.e. read-only thin snapshots.

12 years agoscripts: blk-availability - use the same name for lock file
Peter Rajnoha [Mon, 15 Oct 2012 11:22:36 +0000 (13:22 +0200)]
scripts: blk-availability - use the same name for lock file

12 years agoRemove pvscan --cache from lvm2-lvmetad init script.
Peter Rajnoha [Mon, 15 Oct 2012 10:58:23 +0000 (12:58 +0200)]
Remove pvscan --cache from lvm2-lvmetad init script.

This is not needed anymore as the scan is called transparently
within the first LVM command that queries lvmetad.

12 years agolvmetad: Only print scanning messages when scanning 1 device.
Petr Rockai [Mon, 15 Oct 2012 10:44:19 +0000 (12:44 +0200)]
lvmetad: Only print scanning messages when scanning 1 device.

12 years agolvmetad: use -l for logging level not -d
Alasdair G Kergon [Mon, 15 Oct 2012 09:44:43 +0000 (10:44 +0100)]
lvmetad: use -l for logging level not -d

12 years agolvmetad: empty types string is ok
Zdenek Kabelac [Mon, 15 Oct 2012 09:02:15 +0000 (11:02 +0200)]
lvmetad: empty types string is ok

Since now return code is test - return OK for this case.

12 years agolvmetad: document and tidy cmdline args
Alasdair G Kergon [Mon, 15 Oct 2012 01:06:27 +0000 (02:06 +0100)]
lvmetad: document and tidy cmdline args

Try to bring the lvmetad usage text and man page closer to the code.
There seem to be 3 useful ways to use -d with lvmetad at the moment:
  -d all
  -d wire
  -d debug
(They can also be comma-separated like -d wire,debug.)
Prior to the last release, -d, -dd and -ddd were supported.
Fail if an unrecognised debug arg is supplied on the command line.
Change -V to report the same version as the lvm binary: previously it
just reported version 0.

12 years agolvmetad: fix previous commit
Zdenek Kabelac [Sun, 14 Oct 2012 22:44:31 +0000 (00:44 +0200)]
lvmetad: fix previous commit

Ooops patch conversion for gcc cleanup missed this line.

12 years agocleanup: readable test to check for 32bit overflow
Zdenek Kabelac [Thu, 19 Jan 2012 21:28:06 +0000 (22:28 +0100)]
cleanup: readable test to check for 32bit overflow

also swap return value 0 - fail, 1 - success.

12 years agothin: add support to unmount volumes
Zdenek Kabelac [Thu, 22 Mar 2012 17:29:38 +0000 (18:29 +0100)]
thin: add support to unmount volumes

Reset counter after thin pool resize failure.

If the pool goes above threshold, support unmounting
of all thin volumes if the lvextend fails to avoid
overfilling of the pool.

12 years agotest: speedup a bit
Zdenek Kabelac [Sun, 14 Oct 2012 17:45:59 +0000 (19:45 +0200)]
test: speedup a bit

Do not wait full 10s if the invalid snapshot is already dropped.

12 years agothin: lvextend will fail is autoextend is 0%
Zdenek Kabelac [Sun, 14 Oct 2012 17:43:25 +0000 (19:43 +0200)]
thin: lvextend will fail is autoextend is 0%

Since extending by 0% will not increase the size of pool,
return failure.

12 years agotest: coverage
Zdenek Kabelac [Sat, 13 Oct 2012 19:57:33 +0000 (21:57 +0200)]
test: coverage

Improve a bit code coverage.
Use lvm shell to reduce a bit CPU time.

12 years agolvmetad: fix leak of append on error path
Zdenek Kabelac [Sat, 13 Oct 2012 19:04:01 +0000 (21:04 +0200)]
lvmetad: fix leak of append on error path

12 years agocleanup: resolve dereferencing type-punned pointer
Zdenek Kabelac [Sat, 13 Oct 2012 18:51:07 +0000 (20:51 +0200)]
cleanup: resolve dereferencing type-punned pointer

fix gcc warning:
dereferencing type-punned pointer will break strict-aliasing rules
Replace call by value and pass just const pointer to pvid.

12 years agolvmetad: fix memory leaks in error paths
Zdenek Kabelac [Sat, 13 Oct 2012 17:19:50 +0000 (19:19 +0200)]
lvmetad: fix memory leaks in error paths

Destroy interator in error path.
Releasy any possible allocated buffer from buffer_append_f
and buffer_append_vf  in error path.

12 years agocleanup: used old C standard
Zdenek Kabelac [Sat, 13 Oct 2012 17:18:33 +0000 (19:18 +0200)]
cleanup: used old C standard

12 years agocleanup: drop unused assignment
Zdenek Kabelac [Sat, 13 Oct 2012 17:17:10 +0000 (19:17 +0200)]
cleanup: drop unused assignment

Since 'n' is later reassigned and unused between, drop it's first
assign.

12 years agolvmetad: move initialization in the inner loop
Zdenek Kabelac [Sat, 13 Oct 2012 17:15:15 +0000 (19:15 +0200)]
lvmetad: move initialization in the inner loop

Set append to NULL in the front of cycle, so the INTERNAL error path
is not leading to double-free of append pointer.

12 years agocleanup: add gcc printf __attribute__
Zdenek Kabelac [Sat, 13 Oct 2012 17:14:41 +0000 (19:14 +0200)]
cleanup: add gcc printf __attribute__

12 years agocleanup: remove unneeded headers
Zdenek Kabelac [Sat, 13 Oct 2012 17:13:25 +0000 (19:13 +0200)]
cleanup: remove unneeded headers

Header do not provide any needed symbols.

12 years agotest: update global_filter
Zdenek Kabelac [Fri, 12 Oct 2012 15:59:11 +0000 (17:59 +0200)]
test: update global_filter

use simplier filter for test suite

12 years agotest: typo fix from last commit
Zdenek Kabelac [Fri, 12 Oct 2012 15:35:44 +0000 (17:35 +0200)]
test: typo fix from last commit

12 years agotest: move global_filter only to mdata_string test
Zdenek Kabelac [Fri, 12 Oct 2012 15:27:29 +0000 (17:27 +0200)]
test: move global_filter only to mdata_string test

Tries to help with lvmetad test and pvdisplay and unknown device.

12 years agolvmetad: release_token without lvmetad
Zdenek Kabelac [Fri, 12 Oct 2012 15:16:28 +0000 (17:16 +0200)]
lvmetad: release_token without lvmetad

Missing wrapper when not building with lvmetad support

12 years agotest: use global_filter with initial content
Zdenek Kabelac [Fri, 12 Oct 2012 14:54:34 +0000 (16:54 +0200)]
test: use global_filter with initial content

12 years agodebug: do not play with fds with valgring
Zdenek Kabelac [Fri, 12 Oct 2012 14:52:38 +0000 (16:52 +0200)]
debug: do not play with fds with valgring

When valgrind usage is desired by user (--enable-valgrind-pool)
skip playing/closing/reopenning with descriptors - it makes
valgridng useless.

Make sleep delay for clvmd start longer.

12 years agolvmetead: release token
Zdenek Kabelac [Fri, 12 Oct 2012 14:50:38 +0000 (16:50 +0200)]
lvmetead: release token

Release allocated memory when destroing toolcontext

12 years agoblkdeactivate: fix long form of options
Peter Rajnoha [Fri, 12 Oct 2012 13:42:24 +0000 (15:42 +0200)]
blkdeactivate: fix long form of options

Actually, long form for -d and -l option is --dmoption and --lvmoption respectively.

12 years agoWHATS_NEW: update
Peter Rajnoha [Fri, 12 Oct 2012 12:47:40 +0000 (14:47 +0200)]
WHATS_NEW: update

12 years agoconfigure: autoreconf
Peter Rajnoha [Fri, 12 Oct 2012 12:45:26 +0000 (14:45 +0200)]
configure: autoreconf

12 years agoscripts: introduce blkdeactivate
Peter Rajnoha [Fri, 12 Oct 2012 12:37:57 +0000 (14:37 +0200)]
scripts: introduce blkdeactivate

blkdeactivate - utility to deactivate block devices

Traverses the tree of block devices and tries to deactivate them.
Currently, it supports device-mapper-based devices together with LVM.
See man/blkdeactivate.8 for more info.

It is targeted for use during shutdown to properly deactivate the
whole block device stack - systemd and init scripts are provided as
well. However, it might be used directly on command line too.

Please, see the commentary at the top of the blkdeactivate script
for dependencies and versions of other utilities required.

12 years agosystemd: add deps to order units more properly
Peter Rajnoha [Fri, 12 Oct 2012 12:21:25 +0000 (14:21 +0200)]
systemd: add deps to order units more properly

lvm2-activation-early.service (generated by activation generator) should
be ordered before cryptsetup.target.

lvm2-monitor.service should be ordered after lvm2-activation.service,
if used. The lvm2-activation.service will replace fedora-storage-init.service
and fedora-storage-init-late.service in the end, but let's have it
prepared now.

12 years agoUpdate WHATS_NEW.
Petr Rockai [Fri, 12 Oct 2012 11:24:06 +0000 (13:24 +0200)]
Update WHATS_NEW.

12 years agothin: prohibit lvcreate --thinpool with mirrors
Zdenek Kabelac [Fri, 12 Oct 2012 10:18:06 +0000 (12:18 +0200)]
thin: prohibit lvcreate --thinpool with mirrors

Disable --thinpool to be used with mirror on lvcreate.

12 years agothin: lvm2api return origin property for thin LV
Zdenek Kabelac [Fri, 12 Oct 2012 10:02:15 +0000 (12:02 +0200)]
thin: lvm2api return origin property for thin LV

12 years agolibdm: remove dm dev without error even with malformed UUID
Peter Rajnoha [Fri, 12 Oct 2012 09:53:04 +0000 (11:53 +0200)]
libdm: remove dm dev without error even with malformed UUID

On each ioctl return, the device UUID is decoded from \xNN format.
If the UUID of the device being *removed* is malformed (e.g. it
hasn't been corrected before), just remove it without any error
as the UUID is not needed anymore - the device is gone anyway.

Otherwise a misleading error message would be issued just after
the removal:
  # dmsetup remove test
  The UUID "a b" should be mangled but it contains blacklisted characters.
  Command failed

12 years agolvmetad: fix test for dm_asprintf
Zdenek Kabelac [Fri, 12 Oct 2012 09:34:15 +0000 (11:34 +0200)]
lvmetad: fix test for dm_asprintf

12 years agolvmetad: Fix the fix for 813766 (lvmetad connection warning).
Petr Rockai [Fri, 12 Oct 2012 09:16:38 +0000 (11:16 +0200)]
lvmetad: Fix the fix for 813766 (lvmetad connection warning).

12 years agolvmetad: validate dm_asprintf in buffer_append_vf
Zdenek Kabelac [Fri, 12 Oct 2012 08:57:01 +0000 (10:57 +0200)]
lvmetad: validate dm_asprintf in buffer_append_vf

Check result of dm_asprintf
Check buffer_append result
Declare vars in front

12 years agolvmetad: check result of buffer_realloc
Zdenek Kabelac [Fri, 12 Oct 2012 08:50:07 +0000 (10:50 +0200)]
lvmetad: check result of buffer_realloc

12 years agolvmetad: initialize cft value
Zdenek Kabelac [Fri, 12 Oct 2012 08:35:01 +0000 (10:35 +0200)]
lvmetad: initialize cft value

the error should not test garbage value.

12 years agolvmetad: Make --sysinit suppress connection failure warnings.
Petr Rockai [Fri, 12 Oct 2012 00:48:39 +0000 (02:48 +0200)]
lvmetad: Make --sysinit suppress connection failure warnings.

12 years agocleanup: fix compiler warnings
Zdenek Kabelac [Fri, 12 Oct 2012 08:15:30 +0000 (10:15 +0200)]
cleanup: fix compiler warnings

remove unused vars
move var declarations into the front of functions.
fix some sign warnings

12 years agopython: Add bindings for liblvm2app.
Alasdair G Kergon [Fri, 12 Oct 2012 01:08:47 +0000 (02:08 +0100)]
python: Add bindings for liblvm2app.

Use configure --enable-python_bindings to generate them.

Note that the Makefiles do not yet control the owner or permissions of
the two new files on installation.

12 years agolvmdump: Add -l, to collect a state dump from lvmetad.
Petr Rockai [Thu, 11 Oct 2012 20:42:20 +0000 (22:42 +0200)]
lvmdump: Add -l, to collect a state dump from lvmetad.

12 years agolvmdump: Fix systems with tr on PATH outside of /usr/bin.
Petr Rockai [Thu, 11 Oct 2012 20:39:40 +0000 (22:39 +0200)]
lvmdump: Fix systems with tr on PATH outside of /usr/bin.

12 years agotest: Add lvmetad-dump.sh.
Petr Rockai [Thu, 11 Oct 2012 18:32:25 +0000 (20:32 +0200)]
test: Add lvmetad-dump.sh.

12 years agolvmetad: Implement a "dump" request to capture lvmetad state.
Petr Rockai [Thu, 11 Oct 2012 18:31:29 +0000 (20:31 +0200)]
lvmetad: Implement a "dump" request to capture lvmetad state.

12 years agotest: Skip lvconvert-raid on kernels < 3.2 since they BUG out.
Petr Rockai [Thu, 11 Oct 2012 13:38:19 +0000 (15:38 +0200)]
test: Skip lvconvert-raid on kernels < 3.2 since they BUG out.

12 years agolibdaemon: Make buffer handling asymptotically more efficient.
Petr Rockai [Thu, 11 Oct 2012 12:17:17 +0000 (14:17 +0200)]
libdaemon: Make buffer handling asymptotically more efficient.

12 years agolvm2api: add defined lvm_percent_to_float
Zdenek Kabelac [Thu, 11 Oct 2012 15:25:14 +0000 (17:25 +0200)]
lvm2api: add defined lvm_percent_to_float

Implement function which was somehow missing from it's original
placement in the header file lvm2api.h.

12 years agothin: raise required version to 1.4
Zdenek Kabelac [Thu, 11 Oct 2012 12:07:35 +0000 (14:07 +0200)]
thin: raise required version to 1.4

Stay safe and require 1.4 (kernel 3.6) for non-power-of-2
support for thin pool chunk_size.

12 years agotest: Skip the topology test if setting up scsi_debug fails.
Petr Rockai [Thu, 11 Oct 2012 09:51:04 +0000 (11:51 +0200)]
test: Skip the topology test if setting up scsi_debug fails.

12 years agopvscan --cache: Also read metadata from LVM1 PVs (BZ 863401).
Petr Rockai [Wed, 10 Oct 2012 19:49:40 +0000 (21:49 +0200)]
pvscan --cache: Also read metadata from LVM1 PVs (BZ 863401).

12 years agolvmetad: Fix help output (flags and their meaning).
Petr Rockai [Wed, 10 Oct 2012 12:38:25 +0000 (14:38 +0200)]
lvmetad: Fix help output (flags and their meaning).

12 years agotest: use exclusive activation for created mirrors
Zdenek Kabelac [Wed, 10 Oct 2012 16:38:55 +0000 (18:38 +0200)]
test: use exclusive activation for created mirrors

12 years agotest: thin support for non power of 2 chunk size
Zdenek Kabelac [Wed, 10 Oct 2012 14:37:55 +0000 (16:37 +0200)]
test: thin support for non power of 2 chunk size

12 years agotest: drop clustered flag control from thin tests
Zdenek Kabelac [Wed, 10 Oct 2012 17:00:46 +0000 (19:00 +0200)]
test: drop clustered flag control from thin tests

12 years agotest: move common code for thin init
Zdenek Kabelac [Wed, 10 Oct 2012 12:57:02 +0000 (14:57 +0200)]
test: move common code for thin init

12 years agocleanup: fix typos
Zdenek Kabelac [Tue, 9 Oct 2012 17:42:26 +0000 (19:42 +0200)]
cleanup: fix typos

12 years agothin: support non power of 2 chunk size
Zdenek Kabelac [Thu, 2 Feb 2012 13:37:51 +0000 (14:37 +0100)]
thin: support non power of 2 chunk size

Support thin chunk size with multiple of 64KiB if user has
thin-pool target version at least 1.2.

12 years agoTEST: Add lvchange-partial.sh and vgchange-partial.sh to the test suite
Jonathan Brassow [Wed, 10 Oct 2012 16:47:04 +0000 (11:47 -0500)]
TEST:  Add lvchange-partial.sh and vgchange-partial.sh to the test suite

Commit 3501f17fd0fcec2a1fbb8aeecf228e86ee022d99 enables a limited set
of metadata updates for partial LV/VGs when issuing lvchange or vgchange.
These tests verify those changes operate as intended.

This page took 0.176224 seconds and 5 git commands to generate.