]> sourceware.org Git - lvm2.git/log
lvm2.git
10 years agolvchange: backup final metadata
Zdenek Kabelac [Fri, 19 Sep 2014 13:16:26 +0000 (15:16 +0200)]
lvchange: backup final metadata

Shift backup after final metadata commit.

Synchronize with wiping.

10 years agotools: common handling of --persistent option
Zdenek Kabelac [Fri, 19 Sep 2014 12:57:02 +0000 (14:57 +0200)]
tools: common handling of --persistent option

Move common code for reading and processing
of --persistent arguments for lvcreate and lvchange
into lvmcmdline.

Reuse validate_major_minor() routine for validation.

Don't blindly activate LVs after change in cluster
and instead only local reactivation is supported.
(we have now many limited targets now).

Dropping 'sigint_caught()' handling, since
prompt() is resolving this case itself.

10 years agometadata: validate major, minor numbers
Zdenek Kabelac [Fri, 19 Sep 2014 12:51:41 +0000 (14:51 +0200)]
metadata: validate major, minor numbers

Validate major, minor numbers after reading them from metadata.

10 years agocleanup: use const for cmd context
Zdenek Kabelac [Fri, 19 Sep 2014 12:29:12 +0000 (14:29 +0200)]
cleanup: use const for cmd context

10 years agocleanup: switch to use CHANGE_AEY
Zdenek Kabelac [Fri, 19 Sep 2014 12:28:28 +0000 (14:28 +0200)]
cleanup: switch to use CHANGE_AEY

Since for other enums we use 'Y' or 'N' use it with 'AE' as well.

10 years agowipe_lv: move sync_local_dev_names in front
Zdenek Kabelac [Fri, 19 Sep 2014 09:06:31 +0000 (11:06 +0200)]
wipe_lv: move sync_local_dev_names in front

Synchronize things before checking for locally active volume.

10 years agomemlock: drop uneeded lock
Zdenek Kabelac [Thu, 18 Sep 2014 23:09:36 +0000 (01:09 +0200)]
memlock: drop uneeded lock

Avoid doing buffered operation within memory lock.

10 years agomemlock: ensure memory is allocation before locking
Zdenek Kabelac [Thu, 18 Sep 2014 23:07:32 +0000 (01:07 +0200)]
memlock: ensure memory is allocation before locking

strerror may mmap ram if it was not yet used.
dm_udev_get_sync_support  may initilize udev if it was still not used.

10 years agodebug: mmap traps mmap and mmap64 on i386
Zdenek Kabelac [Thu, 18 Sep 2014 22:59:46 +0000 (00:59 +0200)]
debug: mmap traps mmap and mmap64 on i386

Add code to trap both mmap implementation on 32bit arch.
Use dlsym()
Use hlt instraction instead of int3 - generates usable stack trace
when problem is catched.

10 years agoWHATS_NEW
Zdenek Kabelac [Thu, 18 Sep 2014 16:19:16 +0000 (18:19 +0200)]
WHATS_NEW

10 years agomakefiles: fix linking of PIE code
Zdenek Kabelac [Thu, 18 Sep 2014 16:14:21 +0000 (18:14 +0200)]
makefiles: fix linking of PIE code

PIE documentation:
:
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html
http://lfs.osuosl.org/hlfs/view/unstable/glibc/chapter02/pie.html

suggest to suply -fPIE (or -fpie) with -pie
during executable compilation.

When -fPIC and -fPIE are used together - -fPIE wins

Drop usage of -DPIE - we are not using this flag anywhere

TODO: cleanup linking flags

10 years agodebug: enhance trap of mmap
Zdenek Kabelac [Thu, 18 Sep 2014 14:56:13 +0000 (16:56 +0200)]
debug: enhance trap of mmap

Don't install trap for mlockall case
Add another code path for -fPIE compilation,
in this case the address of mmap function is 'plt' address.

10 years agocleanup: update message
Zdenek Kabelac [Wed, 17 Sep 2014 22:53:42 +0000 (00:53 +0200)]
cleanup: update message

10 years agodebug: catch mmap with -DDEBUG_MEMLOCK
Zdenek Kabelac [Wed, 17 Sep 2014 22:40:45 +0000 (00:40 +0200)]
debug: catch mmap with -DDEBUG_MEMLOCK

10 years agocleanup: detect unsupported options earlier
Zdenek Kabelac [Wed, 17 Sep 2014 21:31:51 +0000 (23:31 +0200)]
cleanup: detect unsupported options earlier

Avoid unnecessary converions of pool.

10 years agocache: Enable cache segment type by default.
Alasdair G Kergon [Wed, 17 Sep 2014 22:13:15 +0000 (23:13 +0100)]
cache: Enable cache segment type by default.

10 years agolvconvert: Further restrictions on cache/pools.
Alasdair G Kergon [Wed, 17 Sep 2014 22:00:41 +0000 (23:00 +0100)]
lvconvert: Further restrictions on cache/pools.

Would be better to define what is supported not what isn't, but this'll
have to do for now.

10 years agolvconvert: Disallow mixing of cache and thin pools.
Alasdair G Kergon [Wed, 17 Sep 2014 16:11:01 +0000 (17:11 +0100)]
lvconvert: Disallow mixing of cache and thin pools.

--cachepool can't take a thin pool and --thinpool can't take a
cache pool.

10 years agolvconvert: Restrict use of cache LVs.
Alasdair G Kergon [Wed, 17 Sep 2014 15:41:58 +0000 (16:41 +0100)]
lvconvert: Restrict use of cache LVs.

Refuse use of -m and -s with cache LVs until full support
can be provided.

10 years agocleanup: Remove metadata.h from tools dir.
Alasdair G Kergon [Wed, 17 Sep 2014 14:50:24 +0000 (15:50 +0100)]
cleanup: Remove metadata.h from tools dir.

metadata.h is meant to be internal to the library.
metadata-exported.h contains the things needed by tools.

10 years agovgchange: support clustered conversion for active lv
Zdenek Kabelac [Wed, 17 Sep 2014 12:27:46 +0000 (14:27 +0200)]
vgchange: support clustered conversion for active lv

If we want to support conversion of VG to clustered type,
we currently need to relock active LV to get proper DLM lock.

So add extra loop after change of VG clustered attribute
to exlusively activate all active top level LVs.

When doing change -cy -> -cn  we should validate LVs are not
active on other cluster nodes - we could be sure about this only
when with local exclusive activation - for other types
we require user to deactivate volumes first.

As a workaround for this limitation there is always
locking_type = 0 which amongs other skip the detection
of active LVs.

FIXME:
 clvmd should handle looks for cluster locking type all the time.

10 years agolocking: add locking_supports_remote_queries
Zdenek Kabelac [Wed, 17 Sep 2014 12:21:41 +0000 (14:21 +0200)]
locking: add locking_supports_remote_queries

Add function to detect whether locking could be used to
query for lock type so we could recognize exclusive
activation.

10 years agocache-pool: Fix specification of cachemode when converting to cache-pool
Jonathan Brassow [Wed, 17 Sep 2014 03:19:53 +0000 (22:19 -0500)]
cache-pool:  Fix specification of cachemode when converting to cache-pool

Failure to copy the 'feature_flags' lvconvert_param to the matching
lv_segment field meant that when a user specified the cachemode argument,
the request was not honored.

10 years agoclean-up: better macro usage
Jonathan Brassow [Wed, 17 Sep 2014 02:24:14 +0000 (21:24 -0500)]
clean-up:  better macro usage

Use 'lv_is_mirror' instead of 'lv_is_mirrored && !lv_is_raid' - both
are the same as asking if the non-RAID mirror implementation is being
used.

10 years agovgchange: disable cluster convert for active LVs
Zdenek Kabelac [Tue, 16 Sep 2014 09:41:28 +0000 (11:41 +0200)]
vgchange: disable cluster convert for active LVs

While we could probably reacquire some type of lock when
going from non-clustered to clustered vg, we don't have any
single road back to drop the lock and keep LV active.

For now keep it safe and prohibit conversion when LV
is active in the VG.

10 years agova_list: properly pass va_list through functions
Zdenek Kabelac [Mon, 15 Sep 2014 13:33:56 +0000 (15:33 +0200)]
va_list: properly pass va_list through functions

Code should not just pass va_list arg through the function
as args could be passed in many strange ways.
Use va_copy().

For details look in i.e.:

http://julipedia.meroh.net/2011/09/using-vacopy-to-safely-pass-ap.html

10 years agodevices: Detect rotational devices.
Alasdair G Kergon [Mon, 15 Sep 2014 23:44:25 +0000 (00:44 +0100)]
devices: Detect rotational devices.

Add dev_is_rotational() for future use by allocation code.

10 years agomirrors: Fix checks for mirror/raid/pvmove LVs.
Alasdair G Kergon [Mon, 15 Sep 2014 23:13:46 +0000 (00:13 +0100)]
mirrors: Fix checks for mirror/raid/pvmove LVs.

Try to enforce consistent macro usage along these lines:

lv_is_mirror - mirror that uses the original dm-raid1 implementation
               (segment type "mirror")
lv_is_mirror_type - also includes internal mirror image and log LVs

lv_is_raid - raid volume that uses the new dm-raid implementation
             (segment type "raid")
lv_is_raid_type - also includes internal raid image / log / metadata LVs

lv_is_mirrored - LV is mirrored using either kernel implementation
                 (excludes non-mirror modes like raid5 etc.)

lv_is_pvmove - internal pvmove volume

10 years agocmirror: fix endian issues on s390
Liuhua Wang [Sat, 13 Sep 2014 07:08:28 +0000 (02:08 -0500)]
cmirror: fix endian issues on s390

Cmirrord has endian bugs, which cause failure to lvcreate a mirrored lv
on s390.
- data_size is uint32, should not use xlate64 to convert, which will
  cause data_size 0 after xlate.
- request_type and data_size still used by local(v5_data_switch),
  should convert later.  If request_type xlate too early, it will
  cause request_type judge error; if data_size xlate too early, it
  will cause coredump in case DM_ULOG_CLEAR_REGION.
- when receiving package in clog_request_from_network. vp[0] will always
  be little endian.  We could use xlate64(vp[0]) == vp[0] to decide if
  the local node is little endian or not.

Signed-off-by: Lidong Zhong<lzhong@suse.com> & Liuhua Wang <lwang@suse.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
10 years agocleanup: fix last commit
Alasdair G Kergon [Mon, 15 Sep 2014 21:04:14 +0000 (22:04 +0100)]
cleanup: fix last commit

10 years agocleanup: Use lv_is_ macros.
Alasdair G Kergon [Mon, 15 Sep 2014 20:33:53 +0000 (21:33 +0100)]
cleanup: Use lv_is_ macros.

Use lv_is_* macros throughout the code base, introducing
lv_is_pvmove, lv_is_locked, lv_is_converting and lv_is_merging.

lv_is_mirror_type no longer includes pvmove.

10 years agotests: update lv_no_exists
Zdenek Kabelac [Mon, 15 Sep 2014 11:45:43 +0000 (13:45 +0200)]
tests: update lv_no_exists

On successful exit path remove debug.log file.

10 years agotest: test there is no leak of LV on error path
Zdenek Kabelac [Mon, 15 Sep 2014 11:44:41 +0000 (13:44 +0200)]
test: test there is no leak of LV on error path

10 years agothin: check for active lv
Zdenek Kabelac [Mon, 15 Sep 2014 11:42:43 +0000 (13:42 +0200)]
thin: check for active lv

Before calling deactivate, check the lv is actually active,
as we may reach this 'bad' error path with pool_lv inactive.

10 years agoWHATS_NEW for filter-related changes
Petr Rockai [Sat, 13 Sep 2014 15:34:13 +0000 (17:34 +0200)]
WHATS_NEW for filter-related changes

10 years agolibdm: finish the comment
Peter Rajnoha [Fri, 12 Sep 2014 13:35:57 +0000 (15:35 +0200)]
libdm: finish the comment

10 years agolibdm: fix dm_is_dm_major to not issue error about missing /proc lines for dm module.
Peter Rajnoha [Fri, 12 Sep 2014 13:17:57 +0000 (15:17 +0200)]
libdm: fix dm_is_dm_major to not issue error about missing /proc lines for dm module.

This is probably better approach than 3880ca5ecad1761bd13a190c58f8f85fdd7cd0e1.

If dm module is not loaded during dm_is_dm_major call, there are no
lines for dm in /proc/devices, of course. Normally, dm_is_dm_major
is called to check existing devices, hence if module is not loaded,
we can expect there's no DM device present at the same time so we
can directly return 0 here (meaning the major number being inspected
is not dm device's one).

See also https://bugzilla.redhat.com/show_bug.cgi?id=1059711.

10 years agorevert: commit 3880ca5ecad1761bd13a190c58f8f85fdd7cd0e1
Peter Rajnoha [Fri, 12 Sep 2014 13:16:08 +0000 (15:16 +0200)]
revert: commit 3880ca5ecad1761bd13a190c58f8f85fdd7cd0e1

There's a better solution to this...

10 years agocleanup: skip unused assign
Zdenek Kabelac [Fri, 12 Sep 2014 09:39:31 +0000 (11:39 +0200)]
cleanup: skip unused assign

Reset of tmp_names is only needed in else{} path.

10 years agocleanup: avoid strlen() we know max size
Zdenek Kabelac [Fri, 12 Sep 2014 09:35:51 +0000 (11:35 +0200)]
cleanup: avoid strlen() we know max size

Just use max NAME_LEN size buffer and copy the name.

10 years agocleanup: simplify _extract_image_components
Zdenek Kabelac [Thu, 11 Sep 2014 20:55:12 +0000 (22:55 +0200)]
cleanup: simplify _extract_image_components

Reorder test - first check for writable flag and then allocate.

10 years agocleanup: missing error message
Zdenek Kabelac [Thu, 11 Sep 2014 21:32:54 +0000 (23:32 +0200)]
cleanup: missing error message

10 years agocleanup: better error messages
Zdenek Kabelac [Thu, 11 Sep 2014 21:32:37 +0000 (23:32 +0200)]
cleanup: better error messages

10 years agoraid: destroy allocation handle on error path
Zdenek Kabelac [Fri, 12 Sep 2014 09:37:01 +0000 (11:37 +0200)]
raid: destroy allocation handle on error path

Don't leak ah memory pool on error path.

10 years agocleanup: update _alloc_image_component function
Zdenek Kabelac [Fri, 12 Sep 2014 09:48:41 +0000 (11:48 +0200)]
cleanup: update _alloc_image_component function

Return allocated volume directly instead of 1/0.

10 years agocleanup: plain code reindent
Zdenek Kabelac [Thu, 11 Sep 2014 18:08:56 +0000 (20:08 +0200)]
cleanup: plain code reindent

Just simple reindent and brace changes.

10 years agodebug: add missing stack trace on error path
Zdenek Kabelac [Thu, 11 Sep 2014 18:11:44 +0000 (20:11 +0200)]
debug: add missing stack trace on error path

10 years agoraid: use _generate_raid_name
Zdenek Kabelac [Fri, 12 Sep 2014 09:39:48 +0000 (11:39 +0200)]
raid: use _generate_raid_name

Use new function to get implicit name validation
(so we do not exit with internal error on metadata validation).

10 years agoraid: add function for name creation
Zdenek Kabelac [Fri, 12 Sep 2014 09:30:00 +0000 (11:30 +0200)]
raid: add function for name creation

Add name for construction and validation of raid subvolume
name with a given suffix.

TODO: check if reusable for mirrors as well.

10 years agoraid: check result of get_segtype_from_string
Zdenek Kabelac [Fri, 12 Sep 2014 09:48:51 +0000 (11:48 +0200)]
raid: check result of get_segtype_from_string

Error here is rather highly unpexpected for these types, but
stay consistent with rest of the code and don't use unchecked value.

10 years agoraid: add missing archive call
Zdenek Kabelac [Fri, 12 Sep 2014 09:30:38 +0000 (11:30 +0200)]
raid: add missing archive call

Before starting to update raid metadata, archive existing unmodified one.

10 years agoraid: add missing vg_revert
Zdenek Kabelac [Thu, 11 Sep 2014 17:58:28 +0000 (19:58 +0200)]
raid: add missing vg_revert

After failing vg_write() and suspend_lv() there was missing vg_revert() call.

10 years agoraid: add missing backups
Zdenek Kabelac [Thu, 11 Sep 2014 17:05:40 +0000 (19:05 +0200)]
raid: add missing backups

Add backup() calls that were missing after successful update
of metadata.

10 years agoallocation: use vg memory pool
Zdenek Kabelac [Thu, 11 Sep 2014 17:00:13 +0000 (19:00 +0200)]
allocation: use vg memory pool

Looks like forgotten memory allocation related to VG used cmd mem pool.

10 years agolibdm: use dm-mod autoloading during dm_is_dm_major call if needed
Peter Rajnoha [Fri, 12 Sep 2014 10:49:37 +0000 (12:49 +0200)]
libdm: use dm-mod autoloading during dm_is_dm_major call if needed

For dm_is_dm_major to determine whether the major number given as
an argument belongs to a DM device, libdm code needs to know what
the actual DM major is to do the comparison.

It may happen that the dm-mod module is not loaded during this
call and so for the completness let's try our best before we start
giving various errors - we can still make use of dm-mod autoloading,
though only since kernels 2.6.36 where this feature was introduced.

10 years agoconf: add allocation/physical_extent_size config option for default PE size of VGs.
Peter Rajnoha [Fri, 12 Sep 2014 08:03:12 +0000 (10:03 +0200)]
conf: add allocation/physical_extent_size config option for default PE size of VGs.

Removes a need to use "vgcreate -s <desired PE size>" all the
time time just to override hardcoded default which is 4096KiB.

10 years agofilters: fix incorrect filter indexing in composite filter array
Peter Rajnoha [Thu, 11 Sep 2014 07:30:03 +0000 (09:30 +0200)]
filters: fix incorrect filter indexing in composite filter array

Caused by recent changes - a7be3b12dfe7388d1648595e6cc4c7a1379bb8a7.
If global filter was not defined, then part of the code
creating composite filter (the cmd->lvmetad_filter) incorrectly
increased index value even if this global filter was not created
as part of the composite filter. This caused a gap with "NULL"
value in the composite filter array which ended up with the rest
of the filters after the gap to be ignored and also it caused a mem
leak when destroying the composite filter.

10 years agotests: test for rename of snapshot
Zdenek Kabelac [Wed, 10 Sep 2014 20:02:18 +0000 (22:02 +0200)]
tests: test for rename of snapshot

10 years agolvmetad: Differentiate between filtered and truly missing devices.
Petr Rockai [Wed, 10 Sep 2014 10:45:52 +0000 (12:45 +0200)]
lvmetad: Differentiate between filtered and truly missing devices.

We used to print an error message whenever we tried to deal with devices that
lvmetad knew about but were rejected by a client-side filter. Instead, we now
check whether the device is actually absent or only filtered out and only print
a warning in the latter case.

10 years agotest: Add a test for MD component detection in pvscan --cache.
Petr Rockai [Tue, 9 Sep 2014 15:25:29 +0000 (17:25 +0200)]
test: Add a test for MD component detection in pvscan --cache.

10 years agolvmetad: Re-organise filters to properly avoid scans of component devices.
Petr Rockai [Tue, 9 Sep 2014 15:16:40 +0000 (17:16 +0200)]
lvmetad: Re-organise filters to properly avoid scans of component devices.

If a PV label is exposed both through a composite device (MD for example) and
through its component devices, we always want the PV that lvmetad sees to be the
composite, since this is what all LVM commands (including activation) will then
use. If pvscan --cache is triggered for multiple clones of the same PV, the last
to finish wins. This patch basically re-arranges the filters so that
component-device filters are part of the global_filter chain, not of the
client-side filter chain. This has a subtle effect on filter evaluation order,
but should not alter visible semantics in the non-lvmetad case.

10 years agodev-cache: Filter wipe does not guarantee a full /dev scan.
Petr Rockai [Tue, 9 Sep 2014 15:14:35 +0000 (17:14 +0200)]
dev-cache: Filter wipe does not guarantee a full /dev scan.

The code in dev_iter_create assumes that if a filter can be wiped, doing so will
always trigger a call to _full_scan. This is not true for composite filters
though, since they can always be wiped in principle, but there is no way to know
that a component filter inside will exist that actually triggers the scan.

10 years agodebug: turn message into debug
Zdenek Kabelac [Wed, 10 Sep 2014 08:10:13 +0000 (10:10 +0200)]
debug: turn message into debug

This message should be printed only for activation commands,
however since the handling of this flag is not correct
(rhbz 1140029) and will require further changes,
do now just a minor change and switch message into log_debug
(so it's not printed i.e. with every  'lvs -v')

10 years agotests: test for rename of snapshot
Zdenek Kabelac [Tue, 9 Sep 2014 18:17:47 +0000 (20:17 +0200)]
tests: test for rename of snapshot

10 years agolv_rename: actual fix for snapshot
Zdenek Kabelac [Tue, 9 Sep 2014 18:15:51 +0000 (20:15 +0200)]
lv_rename: actual fix for snapshot

By my rebasing mistake it's been eliminated from previous patch set.

10 years agolv_update_and_reload: replace code sequence
Zdenek Kabelac [Tue, 9 Sep 2014 12:40:32 +0000 (14:40 +0200)]
lv_update_and_reload: replace code sequence

Use lv_update_and_reload() and lv_update_and_reload_origin()
to handle write/suspend/commit/resume sequence.

In few places this properly handle vg_revert() after suspend failure,
and also ensures there is metadata backup after successful vg_commit().

10 years agolvconvert: use lv_update_and_reload
Zdenek Kabelac [Mon, 8 Sep 2014 20:48:42 +0000 (22:48 +0200)]
lvconvert: use lv_update_and_reload

Use lib function.

10 years agolv_manip: remove vg_revert
Zdenek Kabelac [Mon, 8 Sep 2014 20:39:58 +0000 (22:39 +0200)]
lv_manip: remove vg_revert

vg_commit is supposed to have implicit revert handling.
(however as of now it needs fixes).

10 years agolv_rename: fix snapshot rename
Zdenek Kabelac [Tue, 9 Sep 2014 16:47:27 +0000 (18:47 +0200)]
lv_rename: fix snapshot rename

Fix rename operation for snapshot (cow) LV.
Only the snapshot's origin has the lock and by mistake suspend
and resume has been called for the snapshot LV.
This further made volumes unusable in cluster.

So instead of suspend and resuming list of LVs,
we need to just suspend and resume origin.

As the sequence write/suspend/commit/resume
is widely used in lvm2 code base - move it to
new lv_update_and_reload function.

10 years agocleanup: add stacktrace for error path
Zdenek Kabelac [Mon, 8 Sep 2014 20:36:42 +0000 (22:36 +0200)]
cleanup: add stacktrace for error path

10 years agoso: make sure shared libs are built with RELRO option
Peter Rajnoha [Thu, 4 Sep 2014 08:52:41 +0000 (10:52 +0200)]
so: make sure shared libs are built with RELRO option

In addition to using RELRO for daemons, use this option for shared
libraries. See also commit a65ab773b4ddb06e87d678d3b2f4d0ca3e5b9fd0.

10 years agopost-release
Alasdair G Kergon [Mon, 1 Sep 2014 00:53:44 +0000 (01:53 +0100)]
post-release

10 years agopre-release v2_02_111
Alasdair G Kergon [Mon, 1 Sep 2014 00:51:47 +0000 (01:51 +0100)]
pre-release

10 years agocleanup: drop extra ()
Zdenek Kabelac [Fri, 29 Aug 2014 09:58:16 +0000 (11:58 +0200)]
cleanup: drop extra ()

Pure  '==' test doesn't need extra ().

10 years agocleanup: drop duplicate const
Zdenek Kabelac [Fri, 29 Aug 2014 09:51:53 +0000 (11:51 +0200)]
cleanup: drop duplicate const

No need to specify 'const' twice in these cases.

10 years agocleanup: assignment into ()
Zdenek Kabelac [Thu, 28 Aug 2014 11:53:36 +0000 (13:53 +0200)]
cleanup: assignment into ()

Put is_float=1 into () - so the intention is obvious.
Remove uneeded extra check for for  *s != 0,
since it's already checked for either digit or '.'.

10 years agomakefiles: include path missing
Zdenek Kabelac [Fri, 29 Aug 2014 10:51:28 +0000 (12:51 +0200)]
makefiles: include path missing

For deps calcs path for blkid.h needs to be known.

10 years agoWHATS_NEW
Zdenek Kabelac [Fri, 29 Aug 2014 11:00:16 +0000 (13:00 +0200)]
WHATS_NEW

10 years agoclvmd: use correctly sized buffers for sscanf
Zdenek Kabelac [Fri, 29 Aug 2014 10:00:05 +0000 (12:00 +0200)]
clvmd: use correctly sized buffers for sscanf

sscanf needs extra 1 char for '\0'

10 years agoWHATS_NEW_DM
Zdenek Kabelac [Fri, 29 Aug 2014 10:57:30 +0000 (12:57 +0200)]
WHATS_NEW_DM

10 years agolibdm: revert incorrect path length size for sscanf
Zdenek Kabelac [Fri, 29 Aug 2014 09:52:45 +0000 (11:52 +0200)]
libdm: revert incorrect path length size for sscanf

Commit 94786a3bbf0b68883a2618c9bc25fc88e367f9f8 introduced
another bug - since sscanf needs extra 1 byte for \0.

Since there is no easy way to do a macro evaluation for (PATH_MAX-1)
and string concatation of this number to get resulting (%4095s) - let's
go with easiest path and restore extra byte for 0.

Other option would be to prepare sscanf parsing string in runtime.

But lets resolve it when we look at PATH_MAX handling later...

10 years agolvextend: Reinstate --nosync logic for mirrors.
Alasdair G Kergon [Wed, 27 Aug 2014 23:40:09 +0000 (00:40 +0100)]
lvextend: Reinstate --nosync logic for mirrors.

Reinstate the logic for syncing extensions of mirrors created with
--nosync.  (Inadvertently disabled by the approximate allocation
changes.)

10 years agoWHATS_NEW
Zdenek Kabelac [Wed, 27 Aug 2014 14:52:32 +0000 (16:52 +0200)]
WHATS_NEW

10 years agocache: fix allocation size
Zdenek Kabelac [Wed, 27 Aug 2014 14:45:39 +0000 (16:45 +0200)]
cache: fix allocation size

Commit 0b3d0e79f694ac9dc5a29270b2f791a250980058 caused regression
in allocation of cache pool. This patch is restoring corect size
for allocation.

10 years agocache: Clean-up error message.
Jonathan Brassow [Mon, 25 Aug 2014 00:44:37 +0000 (19:44 -0500)]
cache: Clean-up error message.

It is not an internal error message to report to the user that they
cannot create a cache LV on top of a cache LV.  It is simply not
supported yet.

10 years agopost-release
Alasdair G Kergon [Tue, 26 Aug 2014 15:41:18 +0000 (16:41 +0100)]
post-release

10 years agopre-release v2_02_110
Alasdair G Kergon [Tue, 26 Aug 2014 15:34:14 +0000 (16:34 +0100)]
pre-release

10 years agorevert: commit 8d00499167f010b82ea6ddebcc6b22ec170002f9
Peter Rajnoha [Tue, 26 Aug 2014 15:07:37 +0000 (17:07 +0200)]
revert: commit 8d00499167f010b82ea6ddebcc6b22ec170002f9

Let's test this more...

10 years agotests: thin and volume_list testing
Zdenek Kabelac [Tue, 26 Aug 2014 10:26:17 +0000 (12:26 +0200)]
tests: thin and volume_list testing

10 years agotests: fix volume list test
Zdenek Kabelac [Tue, 26 Aug 2014 10:09:03 +0000 (12:09 +0200)]
tests: fix volume list test

Proper use of \" escaping and shell vars.

10 years agocleanup: indent and stacktrack
Zdenek Kabelac [Tue, 26 Aug 2014 09:39:51 +0000 (11:39 +0200)]
cleanup: indent and stacktrack

Add missing stacktrace on error path
and newline indent.

10 years agocleanup: check pv_count is not 0
Zdenek Kabelac [Thu, 21 Aug 2014 13:38:18 +0000 (15:38 +0200)]
cleanup: check pv_count is not 0

Since we already detect writemostly_ARG is non-zero
make it obvious pv_count will also be non-zero in this case.

10 years agocleanup: use unsigned 1bit elements
Zdenek Kabelac [Thu, 21 Aug 2014 13:37:39 +0000 (15:37 +0200)]
cleanup: use unsigned 1bit elements

Avoid using signed 'int' type for 1 bit size.

10 years agocleanup: never return uninitialized buffer
Zdenek Kabelac [Thu, 21 Aug 2014 13:35:29 +0000 (15:35 +0200)]
cleanup: never return uninitialized buffer

Coverity noticed this function may return untouched buffer,
however in this state can't really happen, but anyway
ensure on error path the buffer will have zero lenght string.

10 years agolibdm: add check transaction_id after message
Zdenek Kabelac [Thu, 21 Aug 2014 13:39:27 +0000 (15:39 +0200)]
libdm: add check transaction_id after message

Add extra safety detection for thin pool transaction id
and query pool status after confirmed message.

In case there is a missmatch, immeditelly abort further
processing.

10 years agothin: fix volume_list support
Zdenek Kabelac [Tue, 26 Aug 2014 10:10:29 +0000 (12:10 +0200)]
thin: fix volume_list support

Fixing problem, when user sets volume_list and excludes thin pools
from activation. In this case pool return 'success' for skipped activation.

We need to really check the volume it is actually active to properly
to remove queued pool messages. Otherwise the lvm2 and kernel
metadata started to go async since lvm2 believed, messages were submitted.

Add also better check for threshold when create a new thin volume.
In this case we require local activation of thin pool so we are able
to check pool fullness.

10 years agothin: more forced ignoring of pool failure
Zdenek Kabelac [Tue, 26 Aug 2014 09:53:56 +0000 (11:53 +0200)]
thin: more forced ignoring of pool failure

Support also 'vgremove -ff' to properly remove even inactive/broken thin pools.
Update messages to use 'print_unless_silent' for the forced case.

10 years agocleanup: consolidate lv_layout and lv_role reporting
Peter Rajnoha [Mon, 25 Aug 2014 08:02:32 +0000 (10:02 +0200)]
cleanup: consolidate lv_layout and lv_role reporting

This patch makes the keyword combinations found in "lv_layout" and
"lv_role" much more understandable - there were some ambiguities
for some of the combinations which lead to confusion before.

Now, the scheme used is:

LAYOUTS ("how the LV is laid out"):
===================================
[linear] (all segments have number of stripes = 1)

[striped] (all segments have number of stripes > 1)

[linear,striped] (mixed linear and striped)

raid (raid layout always reported together with raid level, raid layout == image + metadata LVs underneath that make up raid LV)
  [raid,raid1]
  [raid,raid10]
  [raid,raid4]
  [raid,raid5] (exact sublayout not specified during creation - default one used - raid5_ls)
    [raid,raid5,raid5_ls]
    [raid,raid5,raid6_rs]
    [raid,raid5,raid5_la]
    [raid,raid5,raid5_ra]
  [raid6,raid] (exact sublayout not specified during creation - default one used - raid6_zr)
    [raid,raid6,raid6_zr]
    [raid,raid6,raid6_nc]
    [raid,raid6,raid6_ns]

[mirror] (mirror layout == log + image LVs underneath that make up mirror LV)

thin (thin layout always reported together with sublayout)
  [thin,sparse] (thin layout == allocated out of thin pool)
  [thin,pool] (thin pool layout == data + metadata volumes underneath that make up thin pool LV, not supposed to be used for direct use!!!)

[cache] (cache layout == allocated out of cache pool in conjunction with cache origin)
  [cache,pool] (cache pool layout == data + metadata volumes underneath that make up cache pool LV, not supposed to be used for direct use!!!)

[virtual] (virtual layout == not hitting disk underneath, currently this layout denotes only 'zero' device used for origin,thickorigin role)

[unknown] (either error state or missing recognition for such layout)

ROLES ("what's the purpose or use of the LV - what is its role"):
=================================================================
- each LV has either of these two roles at least:  [public] (public LV that users may use freely to write their data to)

  [public] (public LV that users may use freely to write their data to)
  [private] (private LV that LVM maintains; not supposed to be directly used by user to write his data to)

- and then some special-purpose roles in addition to that:

  [origin,thickorigin] (origin for thick-style snapshot; "thick" as opposed to "thin")
  [origin,multithickorigin] (there are more than 2 thick-style snapshots for this origin)
  [origin,thinorigin] (origin for thin snapshot)
  [origin,multithinorigin] (there are more than 2 thin snapshots for this origin)
  [origin,extorigin] (external origin for thin snapshot)
  [origin,multiextoriginl (there are more than 2 thin snapshots using this external origin)
  [origin,cacheorigin] (cache origin)

  [snapshot,thicksnapshot] (thick-style snapshot; "thick" as opposed to "thin")
  [snapshot,thinsnapshot] (thin-style snapshot)

  [raid,metadata] (raid metadata LV)
  [raid,image] (raid image LV)

  [mirror,image] (mirror image LV)
  [mirror,log] (mirror log LV)
  [pvmove] (pvmove LV)

  [thin,pool,data] (thin pool data LV)
  [thin,pool,metadata] (thin pool metadata LV)

  [cache,pool,data] (cache pool data LV)
  [cache,pool,metadata] (cache pool metadata LV)

  [pool,spare] (pool spare LV - common role of LV that makes it used for both thin and cache repairs)

10 years agoreport: use dm_report_field_string_list_unordered for reporting lv_layout and lv_role...
Peter Rajnoha [Mon, 25 Aug 2014 08:05:27 +0000 (10:05 +0200)]
report: use dm_report_field_string_list_unordered for reporting lv_layout and lv_role fields

This makes it a bit more readable since we can report more general
layouts/roles first and keywords describing the LV more precisely
afterwards in the list.

10 years agoreport: add dm_report_field_string_list_unsorted
Peter Rajnoha [Mon, 25 Aug 2014 08:04:08 +0000 (10:04 +0200)]
report: add dm_report_field_string_list_unsorted

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