]> sourceware.org Git - lvm2.git/log
lvm2.git
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.

11 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>
11 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.

11 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.

11 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.

11 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.

11 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>
11 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>
11 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>
11 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.

11 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.

11 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.

11 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

11 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:"

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

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

11 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.

11 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.

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

11 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.

11 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

11 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

11 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.

11 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

11 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

11 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.

11 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

11 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.

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

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

11 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.

11 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.

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

11 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.

11 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

11 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

11 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

11 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).

11 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

11 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

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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).

11 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).

11 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

11 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

11 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

11 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

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

11 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.

11 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.

11 years ago[lv|vg]change: Allow limited metadata changes when PVs are missing
Jonathan Brassow [Wed, 10 Oct 2012 16:33:10 +0000 (11:33 -0500)]
[lv|vg]change:  Allow limited metadata changes when PVs are missing

A while back, the behavior of LVM changed from allowing metadata changes
when PVs were missing to not allowing changes.  Until recently, this
change was tolerated by HA-LVM by forcing a 'vgreduce --removemissing'
before trying (again) to add tags to an LV and then activate it.  LVM
mirroring requires that failed devices are removed anyway, so this was
largely harmless.  However, RAID LVs do not require devices to be removed
from the array in order to be activated.  In fact, in an HA-LVM
environment this would be very undesirable.  Device failures in such an
environment can often be transient and it would be much better to restore
the device to the array than synchronize an entirely new device.

There are two methods that can be used to setup an HA-LVM environment:
"clvm" or "tagging".  For RAID LVs, "clvm" is out of the question because
RAID LVs are not supported in clustered VGs - not even in an exclusively
activated manner.  That leaves "tagging".  HA-LVM uses tagging - coupled
with 'volume_list' - to ensure that only one machine can have an LV active
at a time.  If updates are not allowed when a PV is missing, it is
impossible to add or remove tags to allow for activation.  This removes
one of the most basic functionalities of HA-LVM - site redundancy.  If
mirroring or RAID is used to replicate the storage in two data centers
and one of them goes down, a server and a storage device are lost.  When
the service fails-over to the alternate site, the VG will be "partial".
Unable to add a tag to the VG/LV, the RAID device will be unable to
activate.

The solution is to allow vgchange and lvchange to alter the LVM metadata
for a limited set of options - --[add|del]tag included.  The set of
allowable options are ones that do not cause changes to the DM kernel
target (like --resync would) or could alter the structure of the LV
(like allocation or conversion).

11 years agoWHATS_NEW: update
Peter Rajnoha [Wed, 10 Oct 2012 15:36:37 +0000 (17:36 +0200)]
WHATS_NEW: update

11 years ago man: dmsetup mangle also processes UUIDs now
Peter Rajnoha [Wed, 10 Oct 2012 15:04:56 +0000 (17:04 +0200)]
 man: dmsetup mangle also processes UUIDs now

11 years agodmsetup: also apply 'mangle' command for UUIDs
Peter Rajnoha [Wed, 10 Oct 2012 15:03:47 +0000 (17:03 +0200)]
dmsetup: also apply 'mangle' command for UUIDs

Compared to names, UUIDs can't be renamed once they are created
for a device. The 'mangle' command will just issue an error message
about a need for manual intervention in this case - reactivating the
device (remove + create) does the job as the defualt mangling mode
used is "auto" and that will assign a correct mangled form the UUID.

11 years agodmsetup: add mangled/unmangled_uuid to for info -c
Peter Rajnoha [Wed, 10 Oct 2012 15:02:59 +0000 (17:02 +0200)]
dmsetup: add mangled/unmangled_uuid to for info -c

Following the same logic already used for name mangling.

11 years agolibdm: introduce and use DEV_UUID macro
Peter Rajnoha [Wed, 10 Oct 2012 15:02:19 +0000 (17:02 +0200)]
libdm: introduce and use DEV_UUID macro

To automatically prefer mangled UUID over unmangled UUID. The same
logic that is already used for dm name mangling...

11 years agolibdm: unmangle dm UUIDs on dm ioctl return
Peter Rajnoha [Wed, 10 Oct 2012 15:01:42 +0000 (17:01 +0200)]
libdm: unmangle dm UUIDs on dm ioctl return

11 years agolibdm: add mangling support for dm_task_set_newuuid
Peter Rajnoha [Wed, 10 Oct 2012 15:01:13 +0000 (17:01 +0200)]
libdm: add mangling support for dm_task_set_newuuid

11 years agolibdm: add mangling support for dm_task_set_uuid
Peter Rajnoha [Wed, 10 Oct 2012 15:00:41 +0000 (17:00 +0200)]
libdm: add mangling support for dm_task_set_uuid

Also, add a new field to struct dm_task called "mangled_uuid" that
will store mangled form of uuid if it differs from original uuid.

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