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

10 years agocleanup: share segtype macros
Zdenek Kabelac [Tue, 10 Dec 2013 09:45:21 +0000 (10:45 +0100)]
cleanup: share segtype macros

Write query macro just once.

10 years agocleanup: shorter raid initialization
Zdenek Kabelac [Fri, 6 Dec 2013 15:38:11 +0000 (16:38 +0100)]
cleanup: shorter raid initialization

Avoid multiple queries for raid library for each initialized raid
seg type and use shorter code.

10 years agocleanup: tiny speedup of lib_dir checking
Zdenek Kabelac [Fri, 6 Dec 2013 15:35:54 +0000 (16:35 +0100)]
cleanup: tiny speedup of lib_dir checking

Instead of repeated lookup of global/library_dir - remember first
search in command context - saves couple lines in debug output...

10 years agoconf: clarify wipe_signatures_when_zeroing_new_lvs
Peter Rajnoha [Tue, 10 Dec 2013 09:16:37 +0000 (10:16 +0100)]
conf: clarify wipe_signatures_when_zeroing_new_lvs

10 years agoconfig: shorten new sig wiping option string
Alasdair G Kergon [Mon, 9 Dec 2013 09:35:47 +0000 (09:35 +0000)]
config: shorten new sig wiping option string

Rename wipe_signatures_on_new_logical_volumes_when_zeroing  to
wipe_signatures_when_zeroing_new_lvs.

10 years agotests: more limits for python test
Zdenek Kabelac [Fri, 6 Dec 2013 09:37:49 +0000 (10:37 +0100)]
tests: more limits for python test

It will be most probably more problem with
incomplete initialization of lvm.conf settings
when lvm2app is in use.

Skip cluster & lvmetad test for now.

10 years agotests: python test needs dmeventd
Zdenek Kabelac [Fri, 6 Dec 2013 09:07:22 +0000 (10:07 +0100)]
tests: python test needs dmeventd

Until lvm2app respects all lvm.conf setting,
this test require dmeventd.

10 years agolvmdump: follow symbolic links in /etc/lvm
Peter Rajnoha [Thu, 5 Dec 2013 15:36:45 +0000 (16:36 +0100)]
lvmdump: follow symbolic links in /etc/lvm

10 years agocompile/link: EXTRA_EXEC_CFLAGS must be applied for *.o
Peter Rajnoha [Thu, 5 Dec 2013 13:19:10 +0000 (14:19 +0100)]
compile/link: EXTRA_EXEC_CFLAGS must be applied for *.o

10 years agocompile/link: use RELRO/PIE compiler/linker options for executables
Peter Rajnoha [Thu, 5 Dec 2013 13:03:10 +0000 (14:03 +0100)]
compile/link: use RELRO/PIE compiler/linker options for executables

10 years agotests: sysrq only when stuck with no output.
Zdenek Kabelac [Thu, 5 Dec 2013 11:32:27 +0000 (12:32 +0100)]
tests: sysrq only when stuck with no output.

If we are stuck in user for too long without output,
grab kernel stack traces.
If we just produce too many lines of output, it's
not probably kernel related bug.

10 years agotests: do not run lvmetad tests without lvmetad
Zdenek Kabelac [Thu, 5 Dec 2013 11:31:49 +0000 (12:31 +0100)]
tests: do not run lvmetad tests without lvmetad

Skip tests when lvmetad is not compiled.

10 years agolv_remove_single: update parameter name
Zdenek Kabelac [Thu, 5 Dec 2013 11:39:02 +0000 (12:39 +0100)]
lv_remove_single: update parameter name

Since we have already a meaning for 'silent'
replace its name with more explanator suppress_remove_message
(updates recent commit).

10 years agotests: harness prints debug.log
Zdenek Kabelac [Thu, 5 Dec 2013 10:12:56 +0000 (11:12 +0100)]
tests: harness prints debug.log

When the test is interrupted because debug.log has got to big,
and the test doesn't react on SIGINT - and needs to be only
killed with SIGKILL - it's still valuable to print at least
a portion of this debug.log (currently 4MB).

LVM_TEST_UNLIMITED  could be set to avoid this limitation
(i.e. when busy-looping lvm command needs to be running
for gdb attachment)

10 years agodev-cache: return success when ignoring dirs
Zdenek Kabelac [Thu, 5 Dec 2013 10:11:26 +0000 (11:11 +0100)]
dev-cache: return success when ignoring dirs

When there is no failure from the insert operation itself,
just dirs and links are skipped - return success.

10 years agocleanup: gcc can't see the code path
Zdenek Kabelac [Thu, 5 Dec 2013 08:41:03 +0000 (09:41 +0100)]
cleanup: gcc can't see the code path

This is a bit to hard for gcc to see the condition can't
be triggered, so make it easier and initialize to 0.

10 years agolvmetad: remove unused override variables
Alasdair G Kergon [Thu, 5 Dec 2013 01:13:18 +0000 (01:13 +0000)]
lvmetad: remove unused override variables

10 years agolibdm: prevent empty config file section names
Alasdair G Kergon [Thu, 5 Dec 2013 01:09:03 +0000 (01:09 +0000)]
libdm: prevent empty config file section names

Change c35394959758ec17389529f95a33bf7f5b15c56b to use existing
_dup_string_tok().  alloca() doesn't fail cleanly (and needs
replacing.)

10 years agotests: drop RUN... already have this var elsewhere
Zdenek Kabelac [Wed, 4 Dec 2013 20:37:33 +0000 (21:37 +0100)]
tests: drop RUN... already have this var elsewhere

10 years agotests: replace built-in popen
Zdenek Kabelac [Wed, 4 Dec 2013 18:50:53 +0000 (19:50 +0100)]
tests: replace built-in popen

It seems some older bashes have problems to properly execute
both pipes - so replace this code with separate temporary files.

10 years agotests: reuse timeout code for too long debug.log
Zdenek Kabelac [Wed, 4 Dec 2013 18:48:29 +0000 (19:48 +0100)]
tests: reuse timeout code for too long debug.log

Jump to the same code used for timeout when no output
is made for long time.

Increase the allowed debug.log size to 32MB.

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