]> sourceware.org Git - lvm2.git/log
lvm2.git
10 years agothin: disable extension of reduced thin with etx.origin
Zdenek Kabelac [Tue, 28 Jan 2014 09:24:50 +0000 (10:24 +0100)]
thin: disable extension of reduced thin with etx.origin

Since we are currently incapable of providing zeroes for
reextended thin volume area, let's disable extension of
such already reduce thin volumes.

(in-release change)

10 years agodevices: support zvol
Zdenek Kabelac [Mon, 27 Jan 2014 12:13:32 +0000 (13:13 +0100)]
devices: support zvol

Support partitions on ZFS zvol.
Requested via https://bugzilla.redhat.com/show_bug.cgi?id=913597

Author: hakimian@aha.com

10 years agocache: Add DM interface for retrieving a cache's status
Jonathan Brassow [Mon, 27 Jan 2014 11:30:10 +0000 (05:30 -0600)]
cache:  Add DM interface for retrieving a cache's status

This patch defines a structure for holding all of the device-mapper
cache target's status information.  The associated function provides
an easy way for higher levels (LVM) to consume the information.

This patch finishes the device-mapper interface for the cache and
cachepool segment types (i.e. the cache target).

10 years agocache: New 'cache' segment type
Jonathan Brassow [Mon, 27 Jan 2014 11:29:35 +0000 (05:29 -0600)]
cache:  New 'cache' segment type

This patch adds the cache segment type - the second of two necessary
to create cache logical volumes.  This segment type references the
cachepool (the small fast device) and the origin (the large slow device);
linking them to create the cache device.  The cache device is the
hierarchical device-mapper device that the user ulitmately makes use
of.

The cache segment sources the information necessary to construct the
device-mapper cache target from the origin and cachepool segments to
which it links.

10 years agocache: New 'cachepool' segment type
Jonathan Brassow [Mon, 27 Jan 2014 11:27:16 +0000 (05:27 -0600)]
cache:  New 'cachepool' segment type

This patch adds the new cachepool segment type - the first of two
necessary to eventually create 'cache' logical volumes.  In addition
to the new segment type, updates to makefiles, configure files, the
lv_segment struct, and some necessary libdevmapper flags.

The cachepool is the LV and corresponding segment type that will hold
all information pertinent to the cache itself - it's size, cachemode,
cache policy, core arguments (like migration_threshold), etc.

10 years agoMisc: New function for reading lvm config file fields
Jonathan Brassow [Mon, 27 Jan 2014 11:26:19 +0000 (05:26 -0600)]
Misc: New function for reading lvm config file fields

Introduce 'dm_config_get_int', which will be used by the upcoming
cachepool segment type.

10 years agolocking: avoid dropping locks
Zdenek Kabelac [Mon, 27 Jan 2014 11:11:09 +0000 (12:11 +0100)]
locking: avoid dropping locks

When lvm2 command forks, it calls reset_locking(),
which as an unwanted side effect unlinked lock file from filesystem.

Patch changes the behavior to just close locked file descriptor
in children - so the lock is being still properly hold in the parent.

10 years agolvmetad: respect LVM_LVMETAD_PIDFILE settings in lvm
Zdenek Kabelac [Fri, 24 Jan 2014 14:59:38 +0000 (15:59 +0100)]
lvmetad: respect LVM_LVMETAD_PIDFILE settings in lvm

Test LVM_LVMETAD_PIDFILE for pid for lvm command.
Fix WHATS_NEW envvar name usage
Fix init order in prepare_lvmetad to respect set vars
and avoid clash with system settings.
Update test to really test the 'is running' message.

10 years agothin: fix missing ~ in previous commit
Zdenek Kabelac [Fri, 24 Jan 2014 12:13:37 +0000 (13:13 +0100)]
thin: fix missing ~ in previous commit

10 years agothin: use LV_TEMPORARY for metadata initialization
Zdenek Kabelac [Fri, 24 Jan 2014 11:28:35 +0000 (12:28 +0100)]
thin: use LV_TEMPORARY for metadata initialization

This flag need to be specified when we create thin pool - to avoid
scanning device with watch rules.

10 years agocleanup: indent
Zdenek Kabelac [Fri, 24 Jan 2014 09:49:31 +0000 (10:49 +0100)]
cleanup: indent

10 years agoTypo: s/Unale/Unable/
Jonathan Brassow [Thu, 23 Jan 2014 05:04:27 +0000 (23:04 -0600)]
Typo: s/Unale/Unable/

10 years agotests: thin external origin resize
Zdenek Kabelac [Thu, 23 Jan 2014 13:17:00 +0000 (14:17 +0100)]
tests: thin external origin resize

10 years agothin: fix feature compare function
Zdenek Kabelac [Thu, 23 Jan 2014 12:47:23 +0000 (13:47 +0100)]
thin: fix feature compare function

Comparing for available feature missed the code path, when
maj is already bigger.

The bug would be only hit in the case, thin pool target would have
increased major version.

10 years agothin: validate resize of thin LV with ext. origin
Zdenek Kabelac [Thu, 23 Jan 2014 12:10:29 +0000 (13:10 +0100)]
thin: validate resize of thin LV with ext. origin

When thin volume is using external origin, current thin target
is not able to supply 'extended' size with empty pages.

lvm2 detects version and disables extension of LV past the external
origin size in this case.

Thin LV could be however still reduced and extended freely bellow
this size.

10 years agothin: rename function
Zdenek Kabelac [Thu, 23 Jan 2014 10:47:10 +0000 (11:47 +0100)]
thin: rename function

Rename pool_can_resize_metadata() to more reusable
thin_pool_feature_supported() which could be queried
for mutiple different features.

10 years agomissed pool_manip.c
Zdenek Kabelac [Thu, 23 Jan 2014 08:56:17 +0000 (09:56 +0100)]
missed pool_manip.c

Seems like this file is missing from the thin_manip move.
Make the tree compilable again.

10 years agoMisc: Change name of lvcreate_params field - s/create_thin_pool/create_pool/
Jonathan Brassow [Wed, 22 Jan 2014 16:30:55 +0000 (10:30 -0600)]
Misc: Change name of lvcreate_params field - s/create_thin_pool/create_pool/

In preparation for other segment types that create and use "pools", we
s/create_thin_pool/create_pool/.  This way it is not awkward when creating
a cachepool, for example, to use "create_thin_pool".

10 years agoMisc: Move some thin pool functions to a new file
Jonathan Brassow [Wed, 22 Jan 2014 16:11:29 +0000 (10:11 -0600)]
Misc: Move some thin pool functions to a new file

Functions that handle set-up, tear-down and creation of thin pool
volumes will be more generally applicable when more targets exist
that make use of device-mapper's persistent data format.  One of
these targets is the dm-cache target.  I've selected some functions
that will be useful for the cache segment type to be moved, since
they will no longer be thin pool specific but are more broadly
useful to any segment type that makes use of a 'pool' LV.

10 years agowiping: issue error if libblkid detects signature and fails to return offset/length
Peter Rajnoha [Wed, 22 Jan 2014 15:26:49 +0000 (16:26 +0100)]
wiping: issue error if libblkid detects signature and fails to return offset/length

We need both offset and length when trying to wipe detected signatures.
The libblkid can fail so it's good to have an error message issued for
this state instead of being silent (libblkid does not issue any error
messages here). We just issued "stack" here before but that was not
quite useful if some error occurs...

10 years agocoverity: check return value of dev_close in dev_get_block_size()
Peter Rajnoha [Wed, 22 Jan 2014 15:20:09 +0000 (16:20 +0100)]
coverity: check return value of dev_close in dev_get_block_size()

10 years agoWHATS_NEW: be more specific about cryptsetup version that sets the udev flags
Peter Rajnoha [Wed, 22 Jan 2014 14:48:40 +0000 (15:48 +0100)]
WHATS_NEW: be more specific about cryptsetup version that sets the udev flags

10 years agoudev: drop cryptsetup specific rules from 10-dm.rules
Peter Rajnoha [Wed, 22 Jan 2014 14:15:02 +0000 (15:15 +0100)]
udev: drop cryptsetup specific rules from 10-dm.rules

These udev flags are set directly in cryptsetup for some
time now so there's no need to have it in our rules then.

See also:
https://code.google.com/p/cryptsetup/source/detail?spec=svn4f14b43a3d3e7310465005c401f37e19f8cb85e6&r=4f14b43a3d3e7310465005c401f37e19f8cb85e6

10 years agoautoconf: Update config.guess/sub to 2014-01-01.
Alasdair G Kergon [Tue, 21 Jan 2014 22:00:15 +0000 (22:00 +0000)]
autoconf: Update config.guess/sub to 2014-01-01.

10 years agotests: more testing for online thin metadata resize
Zdenek Kabelac [Tue, 21 Jan 2014 09:04:23 +0000 (10:04 +0100)]
tests: more testing for online thin metadata resize

Some more tests for online resize, but it's still disabled
by default, since kernel doesn't work yet for this feature.

10 years agothin: online metadata resize requires 1.10
Zdenek Kabelac [Tue, 21 Jan 2014 12:48:57 +0000 (13:48 +0100)]
thin: online metadata resize requires 1.10

Version 1.10 starts to look promissing, let's enable
online resize when this thin-pool kernel target is present.

10 years agopost-release
Alasdair G Kergon [Mon, 20 Jan 2014 19:41:30 +0000 (19:41 +0000)]
post-release

10 years agopre-release v2_02_105
Alasdair G Kergon [Mon, 20 Jan 2014 19:22:56 +0000 (19:22 +0000)]
pre-release

10 years agoudev: clear temporary variable properly
Peter Rajnoha [Mon, 20 Jan 2014 11:54:10 +0000 (12:54 +0100)]
udev: clear temporary variable properly

Clear temporary DM_DISABLE_OTHER_RULES_FLAG properly. This did not
cause any bug or problem as the temporary variable is overwritten next
time it's used again, but we should still clean it properly!

10 years agothin: fix thin LV flagging for udev to skip scanning
Peter Rajnoha [Mon, 20 Jan 2014 11:38:21 +0000 (12:38 +0100)]
thin: fix thin LV flagging for udev to skip scanning

Only flag thin LV for no scanning in udev if this LV is about
to be wiped. This happens only in case the thin LV's pool was not
created with zeroing of the new blocks enabled.

10 years agotests: update testing for xfs
Zdenek Kabelac [Mon, 20 Jan 2014 11:02:33 +0000 (12:02 +0100)]
tests: update testing for xfs

10 years agofsadm: use xfs_repair when available
Zdenek Kabelac [Mon, 20 Jan 2014 10:57:39 +0000 (11:57 +0100)]
fsadm: use xfs_repair when available

Since support for xfs_check is going to be obsoleted,
replace its usage with xfs_repair -n tool.

However this tool needs further intrumentation, since for really small
xfs devices (having just 1 allocation group) it needs to pass in
flag: "-o force_geometry". As we run the tool with '-n', it should
be safe to pass this flag always.

FIXME: figure way without always passing this flag.

10 years agolibdm: WHATSNEW
Zdenek Kabelac [Fri, 17 Jan 2014 10:02:29 +0000 (11:02 +0100)]
libdm: WHATSNEW

10 years agolibdm: preload revert after failing callback
Zdenek Kabelac [Wed, 15 Jan 2014 11:42:47 +0000 (12:42 +0100)]
libdm: preload revert after failing callback

Revert activated volumes if callback fails.
This is currently used only for thin_check failure support.

When thin_check detects failure in thin metadata device, it deactivate
volumes in reversed order that have been preloaded for thin pool activation.
After this change lvm command will not leave active pool subvolumes
in dm table.

10 years agocleanup: indent
Zdenek Kabelac [Wed, 8 Jan 2014 15:51:11 +0000 (16:51 +0100)]
cleanup: indent

10 years agopvresize: Fix orphan PV size calculation.
Alasdair G Kergon [Fri, 17 Jan 2014 01:12:04 +0000 (01:12 +0000)]
pvresize: Fix orphan PV size calculation.

The size of any metadata must be ignored when calculating the size of an
orphan PV.

Bug introduced by 603b45e0ed1032875f587eda3391c47b6652303c ("pvresize: Do
not use pv_read (get the PV from orphan VG).")

10 years agopvresize: Avoid archiving orphan VG metadata.
Alasdair G Kergon [Thu, 16 Jan 2014 23:02:59 +0000 (23:02 +0000)]
pvresize: Avoid archiving orphan VG metadata.

Block creations of archive and backup files for internal orphan VGs.

Bug introduced by 603b45e0ed1032875f587eda3391c47b6652303c ("pvresize: Do
not use pv_read (get the PV from orphan VG).")

10 years agoudev: do not drop SYSTEMD_READY for non-activating events
Peter Rajnoha [Tue, 14 Jan 2014 16:49:39 +0000 (17:49 +0100)]
udev: do not drop SYSTEMD_READY for non-activating events

Do not drop device's flag to report readiness for systemd
processing if there's any event that follows the activatiion
event itself. Otherwise, systemd would lost track of this device
on any other event that follows the activating event (IOW, we
need to make SYSTEMD_READY variable change level-based, not edge-based).

This patch applies for MD and loop devices used as PVs.

(intra-release fix for commit 4c267c7286145165dfe078f77d18d194a21a2e1c)

10 years agoformat1: Mark obsolete and do not use with lvmetad.
Alasdair G Kergon [Tue, 14 Jan 2014 03:27:45 +0000 (03:27 +0000)]
format1: Mark obsolete and do not use with lvmetad.

DO NOT USE LVMETAD IF YOU HAVE ANY LVM1-FORMATTED PVS.

You may continue to use it without lvmetad, but do please schedule
an upgrade to the lvm2 format (with 'vgconvert').

Sending the original LVM1 formatted metadata to lvmetad is breaking
assumptions made by the code, so I am marking the format as obsolete for
now and no longer sending it to lvmetad.

This means that if you are using lvmetad, lvm1 volumes will usually
appear invisible - though not always: it depends on exactly what
sequence of commands you run!

The current situation is not satisfactory.

We'll either fix lvmetad and reenable this or we'll fix the code to
issue appropriate warning messages when lvm1 PVs are encountered
to avoid accidents.

(The latest unfixed problem is that lvmetad assumes metadata sequence
numbers exist and always increase - but the lvm1 format does not define
or store any sequence number, confusing both the daemon and client
when default values get passed to-and-fro.)

10 years agopvs: fix segfaults with orphans
Alasdair G Kergon [Tue, 14 Jan 2014 03:17:27 +0000 (03:17 +0000)]
pvs: fix segfaults with orphans

Several fields used to display 0 if undefined.  Recent changes
to the way the fields are reported threw away some tests for
valid pointers, leading to segfaults with 'pvs -o all'.

Reinstate the original behaviour.

10 years agolvmcache: Invalidate cached VG if PV is orphaned.
Alasdair G Kergon [Tue, 14 Jan 2014 02:57:03 +0000 (02:57 +0000)]
lvmcache: Invalidate cached VG if PV is orphaned.

If a PV in an existing VG becomes orphaned (with 'pvcreate -ff', for
example) the VG struct cached against its vginfo must be invalidated.
This is because the struct device it references no longer contains
the PV label so becomes incorrect.

This triggers the error:
  Internal error: PV $dev unexpectedly not in cache.
when the PV from the cached VG metadata is subsequently looked up
in the cache.

Bug introduced in 2.02.87 by commit 7ad0d47c3c93053c07c45161dbdbc0798ac7e2f6
("Cache and share generated VG structs").

Before:

lvm> pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/loop3 vg12 lvm2 a--  28.00m 28.00m
  /dev/loop4 vg12 lvm2 a--  28.00m 28.00m
lvm> pvcreate -ff /dev/loop3
Really INITIALIZE physical volume "/dev/loop3" of volume group "vg12" [y/n]? y
  WARNING: Forcing physical volume creation on /dev/loop3 of volume group "vg12"
  Physical volume "/dev/loop3" successfully created
lvm> pvs
  Internal error: PV /dev/loop3 unexpectedly not in cache.
  PV         VG   Fmt  Attr PSize  PFree
  /dev/loop3 vg12 lvm2 a--  28.00m 28.00m
  /dev/loop3      lvm2 a--  32.00m 32.00m
  /dev/loop4 vg12 lvm2 a--  28.00m 28.00m

After:
lvm> pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/loop3 vg12 lvm2 a--  28.00m 28.00m
  /dev/loop4 vg12 lvm2 a--  28.00m 28.00m
lvm> pvcreate -ff /dev/loop3
Really INITIALIZE physical volume "/dev/loop3" of volume group "vg12" [y/n]? y
  WARNING: Forcing physical volume creation on /dev/loop3 of volume group "vg12"
  Physical volume "/dev/loop3" successfully created
lvm> pvs
  PV             VG   Fmt  Attr PSize  PFree
  /dev/loop3          lvm2 a--  32.00m 32.00m
  /dev/loop4     vg12 lvm2 a--  28.00m 28.00m
  unknown device vg12 lvm2 a-m  28.00m 28.00m

10 years agoreporter: Set labeller on dummy labels (fixes missing fmt field).
Petr Rockai [Mon, 13 Jan 2014 10:45:38 +0000 (11:45 +0100)]
reporter: Set labeller on dummy labels (fixes missing fmt field).

10 years agoreport: Do not try to get dev_size of a NULL device.
Petr Rockai [Mon, 13 Jan 2014 10:45:18 +0000 (11:45 +0100)]
report: Do not try to get dev_size of a NULL device.

10 years agotoollib: Fix a pool leak in _process_all_devs.
Petr Rockai [Mon, 13 Jan 2014 10:26:43 +0000 (11:26 +0100)]
toollib: Fix a pool leak in _process_all_devs.

10 years agotest: Increase the overall timeout to 3 hours.
Petr Rockai [Mon, 16 Dec 2013 16:35:33 +0000 (17:35 +0100)]
test: Increase the overall timeout to 3 hours.

10 years agotest: Time out the entire testsuite after an hour.
Petr Rockai [Mon, 16 Dec 2013 10:47:09 +0000 (11:47 +0100)]
test: Time out the entire testsuite after an hour.

10 years agotest: Use klogctl in the harness instead of reading /var/log/messages.
Petr Rockai [Sun, 15 Dec 2013 20:10:57 +0000 (21:10 +0100)]
test: Use klogctl in the harness instead of reading /var/log/messages.

10 years agotest: Add a regression test for pvcreate -ff.
Petr Rockai [Wed, 8 Jan 2014 14:23:30 +0000 (15:23 +0100)]
test: Add a regression test for pvcreate -ff.

10 years agolvmetad: Fix getting vgid_old & avoid removing in-transition VGs.
Petr Rockai [Wed, 8 Jan 2014 13:54:26 +0000 (14:54 +0100)]
lvmetad: Fix getting vgid_old & avoid removing in-transition VGs.

10 years agotests: use compiled lvm for clvmd executed lvs
Zdenek Kabelac [Wed, 8 Jan 2014 12:52:05 +0000 (13:52 +0100)]
tests: use compiled lvm for clvmd executed lvs

10 years agoliblvm: mark constant as unsigned
Zdenek Kabelac [Wed, 8 Jan 2014 11:04:41 +0000 (12:04 +0100)]
liblvm: mark constant as unsigned

10 years agolvmetad: add parentheses around assignment
Zdenek Kabelac [Wed, 8 Jan 2014 10:54:28 +0000 (11:54 +0100)]
lvmetad: add parentheses around assignment

10 years agolibdm: pass dnode to callback
Zdenek Kabelac [Wed, 8 Jan 2014 09:30:25 +0000 (10:30 +0100)]
libdm: pass dnode to callback

Pass dnode  pointer instead of rather unknown child pointer.
The pointer is currently unused and passing child pointer
is quite undefined, while dnode has at least some usability.

10 years agothin: accept const struct
Zdenek Kabelac [Wed, 8 Jan 2014 09:27:17 +0000 (10:27 +0100)]
thin: accept const struct

10 years agothin: cleanup _thin_pool_add_message
Peter Rajnoha [Wed, 8 Jan 2014 09:56:05 +0000 (10:56 +0100)]
thin: cleanup _thin_pool_add_message

Make this code a bit more readable for Coverity as otherwise
it marks the "type" variable in the "_thin_pool_add_message" fn
as undefined for certain path (...which is normally unreachable anyway,
but let's clean this up).

10 years agopvscan: use format feature flags in lvmetad code
Alasdair G Kergon [Wed, 8 Jan 2014 02:13:13 +0000 (02:13 +0000)]
pvscan: use format feature flags in lvmetad code

Introduce FMT_OBSOLETE to identify pool metadata and use it and FMT_MDAS
instead of hard-coded format names.
Explain device accesses on pvscan --cache man page.

10 years agolvmetad: free fid after vg lookup failure
Alasdair G Kergon [Wed, 8 Jan 2014 01:51:23 +0000 (01:51 +0000)]
lvmetad: free fid after vg lookup failure

10 years agoMisc: Get rid of some compiler warnings.
Jonathan Brassow [Wed, 8 Jan 2014 01:37:07 +0000 (19:37 -0600)]
Misc:  Get rid of some compiler warnings.

10 years agolvmetad: Flush a VG if it goes completely missing due to pv_found.
Petr Rockai [Tue, 7 Jan 2014 02:28:20 +0000 (03:28 +0100)]
lvmetad: Flush a VG if it goes completely missing due to pv_found.

10 years agolvmetad: Fix a corruption-prone race in error path.
Petr Rockai [Tue, 7 Jan 2014 02:04:14 +0000 (03:04 +0100)]
lvmetad: Fix a corruption-prone race in error path.

10 years agotoollib: Fix a mis-merge in _process_all_devs (duplicated pvs -a output).
Petr Rockai [Tue, 7 Jan 2014 01:49:12 +0000 (02:49 +0100)]
toollib: Fix a mis-merge in _process_all_devs (duplicated pvs -a output).

10 years agoliblvm: Save off and restore umask values
Tony Asleson [Tue, 17 Dec 2013 22:51:11 +0000 (16:51 -0600)]
liblvm: Save off and restore umask values

lvm has a default umask value in the config file that defaults
to 0077 which lvm changes to during normal operation.  This
causes a problem when the code is used as a library with
liblvm as it is changing the umask for the process.  This
patch saves off the current umask, sets to what is specified
in the config file and restores it what it was on library
function call exit.

The user is now free to change the umask in their application at
anytime including between library calls.

This fix address BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1012113

Tested by setting umask to 0777 and running the python unit
test and verifying that umask is still same value as expected
at the test completion and with a successful run.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
10 years agodevice: if BLKPBSZGET is unavailable, try to use BLKSSZGET with fallback to 512b
Peter Rajnoha [Wed, 18 Dec 2013 12:52:01 +0000 (13:52 +0100)]
device: if BLKPBSZGET is unavailable, try to use BLKSSZGET with fallback to 512b

10 years agosystemd: use only major:minor for pvscan in lvm2-pvscan@.service
Peter Rajnoha [Wed, 18 Dec 2013 11:00:02 +0000 (12:00 +0100)]
systemd: use only major:minor for pvscan in lvm2-pvscan@.service

When using filters for the pvscan --cache (the global_filter),
there's a difference between:

  pvscan --cache -aay /dev/block/<major>:<minor>

and

  pvscan --cache -aay <major>:<minor> (or --major <major> --minor <minor>)

In the first case, we need to be sure to have an exact matching line
in the filter for the device to be used, no aliases are considered
So for example even if we have accept rule for "/dev/sda" present,
this won't apply for "/dev/block/8:0" even though it's the same device!
This is because we're comparing the path used on command line directly
with the path written in the rule.

For the second one, any alias mentioned in the filter will apply
as we're comparing the major and minor pair, not looking at actual
device names - so any alias mentioned in the rules will suffice for
the filtering rule to apply.

For the global_filter to be properly used, we need to call the
second one in the lvm2-pvscan@.service - nobody is able to tell
what value of major:minor the kernel assignes next time, hence
this bug makes the use of global_filter quite unusable!

10 years agodevice: if BLKPBSZGET is unavailable, enforce 512
Zdenek Kabelac [Wed, 18 Dec 2013 09:52:09 +0000 (10:52 +0100)]
device: if BLKPBSZGET is unavailable, enforce 512

If there is no define for BLKPBSZGET - we have hard time how to
decrypt physical block size - we can't use here block_size,
since this is usually 4k while we need to use 512b.

FIXME: find some better way, until that enforce value 512.
Eventually we could also try to put in:

+#ifndef BLKPBSZGET
+# define BLKPBSZGET _IO(0x12,123)
+#endif

but this will still not work well on old kernels.

10 years agotests: clear inactive table before resuming in teardown
Zdenek Kabelac [Wed, 18 Dec 2013 09:40:36 +0000 (10:40 +0100)]
tests: clear inactive table before resuming in teardown

10 years agoman: syntax and spelling fixes.
Ville Skyttä [Tue, 17 Dec 2013 18:26:10 +0000 (20:26 +0200)]
man: syntax and spelling fixes.

10 years agoRevert "tree_action: destroy devices from failing activation"
Zdenek Kabelac [Tue, 17 Dec 2013 14:17:44 +0000 (15:17 +0100)]
Revert "tree_action: destroy devices from failing activation"

This reverts commit 24639be558a9d4561a34f2b76485b227aed8e9c3.

Ok - seems we could be here a bit too active - and we
may remove devices which are unsuable for reasons we are not
aware of - thus taking down whole device could be way to big hammer.

So we still need some solution to recover from failing preload
and activation - but it needs more tunning.

10 years agodevice: use BLKPBSZGET for physical block size only if the op is available, otherwise...
Peter Rajnoha [Tue, 17 Dec 2013 14:16:25 +0000 (15:16 +0100)]
device: use BLKPBSZGET for physical block size only if the op is available, otherwise use logical block size

Older kernels < 2.6.32 don't have BLKPBSZGET defined.

10 years agotree_action: destroy devices from failing activation
Zdenek Kabelac [Tue, 17 Dec 2013 12:49:03 +0000 (13:49 +0100)]
tree_action: destroy devices from failing activation

When activation fails - we may leak large tree of partially loaded
devices in the dm table (i.e. failure in snapshot activation)

The best we can do here is try to deactivate whole device and
remove as much inactive table entries as we can.

10 years agolv_dependency: scan also snapshots and extorigins
Zdenek Kabelac [Tue, 17 Dec 2013 12:53:15 +0000 (13:53 +0100)]
lv_dependency: scan also snapshots and extorigins

When LV is scanned for its dependencies - scan also origin's snapshots,
and thin external origins.

So if any PV from snapshot or external origin device is missing - lvm2 will
avoid trying to activate such device.

10 years agocleanup: skip double assign
Zdenek Kabelac [Tue, 17 Dec 2013 12:57:13 +0000 (13:57 +0100)]
cleanup: skip double assign

Assing NULL to type only in defaut: switch.
Debug print '--'  for  unlocked and unused resource (-1)

10 years agotests: hide expected error message
Zdenek Kabelac [Tue, 17 Dec 2013 12:55:19 +0000 (13:55 +0100)]
tests: hide expected error message

Test typically enables disabled device - so it mostly expects
error target will be reloaded here - thus hide confusing message.

10 years agotests: skip pool-label test for lvmetad
Zdenek Kabelac [Mon, 16 Dec 2013 12:29:46 +0000 (13:29 +0100)]
tests: skip pool-label test for lvmetad

Unsupported by lvmetad.

10 years agosystemd: make sure lvm2-lvmetad.socket is available for lvm2-pvscan@.service
Peter Rajnoha [Tue, 17 Dec 2013 09:40:32 +0000 (10:40 +0100)]
systemd: make sure lvm2-lvmetad.socket is available for lvm2-pvscan@.service

10 years agotest: Turn check_full into check_system complementary with normal check.
Petr Rockai [Sun, 15 Dec 2013 16:26:28 +0000 (17:26 +0100)]
test: Turn check_full into check_system complementary with normal check.

10 years agopvscan --cache: Use FMT_LVM1_NAME instead of hardcoded "lvm1".
Petr Rockai [Sun, 15 Dec 2013 15:37:03 +0000 (16:37 +0100)]
pvscan --cache: Use FMT_LVM1_NAME instead of hardcoded "lvm1".

10 years agopvscan --cache: Error out on pool-format VGs for now.
Petr Rockai [Sun, 15 Dec 2013 15:31:35 +0000 (16:31 +0100)]
pvscan --cache: Error out on pool-format VGs for now.

10 years agotest: Make the harness optionally less verbose (QUIET=1).
Petr Rockai [Sun, 15 Dec 2013 15:36:24 +0000 (16:36 +0100)]
test: Make the harness optionally less verbose (QUIET=1).

10 years agoconfig: fix metadata/disk_areas config setting registration
Peter Rajnoha [Fri, 13 Dec 2013 15:43:01 +0000 (16:43 +0100)]
config: fix metadata/disk_areas config setting registration

The metadata/disk_areas setting was incorrectly registered as
"string" configuration option but it's a section where each area
is defined in its own subsection with "start_sector", "size" and "id"
setting.

This setting is not officialy supported, it's undocumented and it's
used solely for debugging.

Note: At this moment, it does not seem to be working with lvmetad!

10 years agodevice: add physical block size info and make sure VG extent size >= PV's phys. block...
Peter Rajnoha [Thu, 12 Dec 2013 10:26:35 +0000 (11:26 +0100)]
device: add physical block size info and make sure VG extent size >= PV's phys. block size

10 years agoman: -Z zeroes 4KiB, not just 1KiB
Peter Rajnoha [Thu, 12 Dec 2013 09:01:37 +0000 (10:01 +0100)]
man: -Z zeroes 4KiB, not just 1KiB

10 years agoautoreconf: latest changes
Peter Rajnoha [Thu, 12 Dec 2013 13:32:11 +0000 (14:32 +0100)]
autoreconf: latest changes

10 years agoconfigure: update recent change
Zdenek Kabelac [Thu, 12 Dec 2013 13:29:15 +0000 (14:29 +0100)]
configure: update recent change

Full path needs to be supplied.
Keep on using 'autodetect' keyword as default argument.

10 years agocleanup: remove unused variable
Zdenek Kabelac [Thu, 12 Dec 2013 12:59:39 +0000 (13:59 +0100)]
cleanup: remove unused variable

Recent commit made this variable unused

10 years agoautoreconf: latest changes
Peter Rajnoha [Thu, 12 Dec 2013 12:45:48 +0000 (13:45 +0100)]
autoreconf: latest changes

10 years agodev-cache: skip double stat() call on each _insert
Zdenek Kabelac [Fri, 25 Nov 2011 09:01:37 +0000 (10:01 +0100)]
dev-cache: skip double stat() call on each _insert

When the device is inserted in dev_name_confirmed() stat() is
called twice as _insert() has it's own stat() call.

Extend _insert() parameter with struct stat* - which could be used
if it has been just obtained.  When NULL is passed code is
doing its own stat() call as before.

10 years agodmeventd: prevent busy looping on CPU
Zdenek Kabelac [Thu, 22 Mar 2012 16:00:25 +0000 (17:00 +0100)]
dmeventd: prevent busy looping on CPU

Use usleep when looping on DM_WAIT_RETRY.

10 years agodmeventd: change locking code
Zdenek Kabelac [Sun, 30 Jun 2013 14:07:26 +0000 (16:07 +0200)]
dmeventd: change locking code

Ensure global lock is being hold when working with thread->.

10 years agodmeventd: drop taking timeout mutex
Zdenek Kabelac [Sun, 30 Jun 2013 14:06:39 +0000 (16:06 +0200)]
dmeventd: drop taking timeout mutex

Taking _timeout_mutex is not needed when registering and unregistering.
Global mutex is already being hold for this case.

10 years agothin: enable build of thin provisioning by default
Zdenek Kabelac [Thu, 12 Dec 2013 12:07:59 +0000 (13:07 +0100)]
thin: enable build of thin provisioning by default

Use internal type by default for thin provisioning.
If user is not interested in thin provisiong and doesn't
have thin provisining supporting tools installed,
configure will just print warning at the end of configure
process about limited support.

10 years agocleanup: add missing backtrace in fail path
Zdenek Kabelac [Tue, 10 Dec 2013 19:49:53 +0000 (20:49 +0100)]
cleanup: add missing backtrace in fail path

10 years agocleanup: improve tag processing
Zdenek Kabelac [Tue, 8 Nov 2011 22:29:40 +0000 (23:29 +0100)]
cleanup: improve tag processing

Boolean algebra changes for process_each_lv_in_vg().

1st.
Drop process_lv variable since it's not needed.

2nd.
process_lv was always initilized to 0 - so the condition was always true.
It the condition (!tags_supplied && !lvargs_supplied) evaluates as "true",
process_all is already set to 1, so skip vg tags evaluation.

3rd.
Move check for matching lv name in the front of lv tags check
since this check can't be skipped for lvargs_matched counter.
If this filter evaluates to true, skip lv tags evaluation.

10 years agocleanup: remove duplicate code
Zdenek Kabelac [Wed, 30 Nov 2011 10:30:33 +0000 (11:30 +0100)]
cleanup: remove duplicate code

As dev_name_confirmed() has check for DEV_REGULAR
remove this duplicated extra check prior its call.

10 years agocleanup: self compilable headers
Zdenek Kabelac [Wed, 25 Jan 2012 22:26:33 +0000 (23:26 +0100)]
cleanup: self compilable headers

10 years agocleanup: simplify logging code
Zdenek Kabelac [Mon, 26 Mar 2012 11:50:44 +0000 (13:50 +0200)]
cleanup: simplify logging code

Condense code for logging.

10 years agoWHATS_NEW: commit 4c267c7286145165dfe078f77d18d194a21a2e1c
Peter Rajnoha [Wed, 11 Dec 2013 15:50:52 +0000 (16:50 +0100)]
WHATS_NEW: commit 4c267c7286145165dfe078f77d18d194a21a2e1c

See also https://bugzilla.redhat.com/show_bug.cgi?id=1026860
for more info, comment 76 for summary.

10 years agoudev: fix SYSTEMD_READY assignment for foreign devices in lvmetad rules
Peter Rajnoha [Wed, 11 Dec 2013 12:13:21 +0000 (13:13 +0100)]
udev: fix SYSTEMD_READY assignment for foreign devices in lvmetad rules

Some devices, similarly to us, are not prepared after ADD event, but
after an extra CHANGE event when the device is properly set up.
This includes MD and loop devices. This patch fixes the
SYSTEMD_READY assignment that is crucial for proper functionality
of SYSTEMD_WANTS that we use to instantiate a lvm2-pvscan@.service
systemd service to activate the VG/LVs (see also bug
info).

All that extra handling of foreign devices should eventually be moved
to rules which process those devices primarily (MD and loop)! We should
only check a dedicated variable whether the device is usable or not.

10 years agotests: count interrupted test as failed
Zdenek Kabelac [Tue, 10 Dec 2013 10:21:40 +0000 (11:21 +0100)]
tests: count interrupted test as failed

10 years agothin: thin metadata resize unsupported with 1.9
Zdenek Kabelac [Tue, 10 Dec 2013 10:10:53 +0000 (11:10 +0100)]
thin: thin metadata resize unsupported with 1.9

Thin kernel target 1.9 still does not support online resize of
thin pool metadata properly - so disable it with expectation
for much higher version - and reenable after fixing kernel.

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