]> sourceware.org Git - lvm2.git/log
lvm2.git
10 years agolvmetad: Drop active connection upon lvmetad_set_active(0).
Petr Rockai [Sun, 8 Jun 2014 23:55:33 +0000 (01:55 +0200)]
lvmetad: Drop active connection upon lvmetad_set_active(0).

10 years agolibdaemon: Keep track of client threads, wait before shutdown.
Petr Rockai [Sun, 8 Jun 2014 23:50:57 +0000 (01:50 +0200)]
libdaemon: Keep track of client threads, wait before shutdown.

10 years agotest: Reflect that --sysinit only treats lvmetad specially with -aay (not -ay).
Petr Rockai [Sun, 8 Jun 2014 21:37:08 +0000 (23:37 +0200)]
test: Reflect that --sysinit only treats lvmetad specially with -aay (not -ay).

10 years agopvremove: Update lvmcache => avoid spurious error messages.
Petr Rockai [Sun, 8 Jun 2014 20:57:04 +0000 (22:57 +0200)]
pvremove: Update lvmcache => avoid spurious error messages.

10 years agolvmetad: Avoid "connect failed" spamming when lvmetad is not available.
Petr Rockai [Sun, 8 Jun 2014 20:09:29 +0000 (22:09 +0200)]
lvmetad: Avoid "connect failed" spamming when lvmetad is not available.

10 years agotest: Try harder to vgremove in lvmetad-lvm1.sh.
Petr Rockai [Sun, 8 Jun 2014 20:01:02 +0000 (22:01 +0200)]
test: Try harder to vgremove in lvmetad-lvm1.sh.

10 years agolvm1: Fail vg_write graciously when devices are missing.
Petr Rockai [Sun, 8 Jun 2014 19:52:54 +0000 (21:52 +0200)]
lvm1: Fail vg_write graciously when devices are missing.

10 years agotest: Fix the vgck test after vg_write change.
Petr Rockai [Sun, 8 Jun 2014 18:16:13 +0000 (20:16 +0200)]
test: Fix the vgck test after vg_write change.

10 years agotest: Fail devices silently in lvconvert-repair-transient.sh.
Petr Rockai [Mon, 26 May 2014 12:38:46 +0000 (14:38 +0200)]
test: Fail devices silently in lvconvert-repair-transient.sh.

10 years agotest: Make it possible to enable/disable devices silently.
Petr Rockai [Mon, 26 May 2014 12:37:45 +0000 (14:37 +0200)]
test: Make it possible to enable/disable devices silently.

10 years agometadata: Make it possible to write partial VGs obtained from lvmetad.
Petr Rockai [Mon, 26 May 2014 12:23:33 +0000 (14:23 +0200)]
metadata: Make it possible to write partial VGs obtained from lvmetad.

10 years agocleanup: move the "daemon is running" checks to lvm-wrappers
Peter Rajnoha [Fri, 6 Jun 2014 12:21:09 +0000 (14:21 +0200)]
cleanup: move the "daemon is running" checks to lvm-wrappers

And use ifdefs there, not exposing it in the tool code itself.
Later in the future, we should probably make the PIDFILE and
daemon checking code available also in case the daemon itself
is not built.

10 years agoconfigure: update libcpg test
Zdenek Kabelac [Fri, 6 Jun 2014 08:29:47 +0000 (10:29 +0200)]
configure: update libcpg test

PKG_CHECK_MODULES needs old-way if;then;fi.

10 years agocleanup: default.profile is not used (and it was split in two and renamed anyway)
Peter Rajnoha [Fri, 6 Jun 2014 08:24:50 +0000 (10:24 +0200)]
cleanup: default.profile is not used (and it was split in two and renamed anyway)

10 years agocleanup: commit c0f9c79 to work also with for non-clustered configuration
Peter Rajnoha [Fri, 6 Jun 2014 08:17:26 +0000 (10:17 +0200)]
cleanup: commit c0f9c79 to work also with for non-clustered configuration

10 years agovgchange: With '--yes', don't prompt the user
Jonathan Brassow [Fri, 6 Jun 2014 03:45:19 +0000 (22:45 -0500)]
vgchange:  With '--yes', don't prompt the user

If the user supplies a '--yes' argument, then don't bother them with
a question to confirm whether to change the cluster attribute (even
if clvmd isn't running).

10 years agoWHATS_NEW: For commit 9399b743 (prompt for VG cluster attr change)
Jonathan Brassow [Fri, 6 Jun 2014 03:29:16 +0000 (22:29 -0500)]
WHATS_NEW:  For commit 9399b743 (prompt for VG cluster attr change)

Minor change, but put a comment in WHATS_NEW anyway.

10 years agovgchange: Prompt when setting VG cluster attr if cluster is not setup
Jonathan Brassow [Fri, 6 Jun 2014 03:27:40 +0000 (22:27 -0500)]
vgchange: Prompt when setting VG cluster attr if cluster is not setup

If clvmd is not running or the locking type is not clustered and someone
attempts to set the cluster attribute on a volume group, prompt them to
see if they are sure.  (Only prompt for one though.  If neither are true,
simply ask them once.)

10 years agotests: disable python failing test
Zdenek Kabelac [Thu, 5 Jun 2014 21:07:23 +0000 (23:07 +0200)]
tests: disable python failing test

Aborts and needs fixes...

10 years agotests: fix test compare
Zdenek Kabelac [Thu, 5 Jun 2014 21:06:45 +0000 (23:06 +0200)]
tests: fix test compare

Comparing 64T can't use -eq

10 years agotests: adapt test for newline delimit
Zdenek Kabelac [Thu, 5 Jun 2014 21:05:52 +0000 (23:05 +0200)]
tests: adapt test for newline delimit

content of DEVICES is now delimited by newlines

10 years agoconfigure: do not exit with error code
Zdenek Kabelac [Thu, 5 Jun 2014 16:02:40 +0000 (18:02 +0200)]
configure: do not exit with error code

Since the test is the last command make a test in a form it will be
after its finished 0.
(regression from last configure cleanup)

10 years agotests: typo
Zdenek Kabelac [Mon, 2 Jun 2014 07:38:10 +0000 (09:38 +0200)]
tests: typo

10 years agotests: use get_devs
Zdenek Kabelac [Thu, 5 Jun 2014 11:01:43 +0000 (13:01 +0200)]
tests: use get_devs

Check how get_devs is usable with shell array DEVICES

10 years agotests: use manglename none for dmsetup
Zdenek Kabelac [Thu, 5 Jun 2014 10:09:02 +0000 (12:09 +0200)]
tests: use manglename none for dmsetup

10 years agotests: add get_devs function
Zdenek Kabelac [Wed, 4 Jun 2014 11:55:13 +0000 (13:55 +0200)]
tests: add get_devs function

Instead of rereading device list via cat - keep
the list in bash array. (Also solves problem
with spaces in device path)

Move usage of  "$path" out of lvm shell usage,
since we don't support such thing there...

10 years agotests: use shell arrays to keep device names
Zdenek Kabelac [Wed, 4 Jun 2014 11:46:19 +0000 (13:46 +0200)]
tests: use shell arrays to keep device names

Better preserving spaces in device path name,
though admitely rest of test suite need
more repairs...

10 years agotests: fix use of double apostrophes in get
Zdenek Kabelac [Thu, 5 Jun 2014 11:05:36 +0000 (13:05 +0200)]
tests: fix use of double apostrophes in get

Need to put "" around parameters.

10 years agoconfigure: reconfigure
Zdenek Kabelac [Thu, 5 Jun 2014 15:24:32 +0000 (17:24 +0200)]
configure: reconfigure

10 years agoconfigure: cleanups
Zdenek Kabelac [Thu, 5 Jun 2014 15:28:03 +0000 (17:28 +0200)]
configure: cleanups

Replace AC_PATH_PROG with AC_PATH_TOOL.
Drop 'x' when already using "" around shell variable.
Simlify some long line and ifs.
Merge multiple test evaluation with '-a', '-o'.
Use 'case' instead if several ifs when it's more elegant.
Improve usage of pkg_config_init and add it where it's been missing.
Check for UDEV_HAS_BUILTIN_BLKID and when building udev-rules.

10 years agoconfigure: accept 'none' as mangling mode
Zdenek Kabelac [Thu, 5 Jun 2014 12:38:10 +0000 (14:38 +0200)]
configure: accept 'none' as mangling mode

Since we advertise 'none' as mangling name, accept it.
Keep it backward compatible and leave disabled option still working
(though I guess there is likely no user of this option...)

10 years agoman: document DM_DEFAULT_NAME_MANGLING_MODE
Zdenek Kabelac [Thu, 5 Jun 2014 15:26:53 +0000 (17:26 +0200)]
man: document DM_DEFAULT_NAME_MANGLING_MODE

Document DM_DEFAULT_NAME_MANGLING_MODE environmental variable.
(its default setting is build time configurable)

10 years agotest: use direct I/O when injecting bad data into RAID images
Jonathan Brassow [Fri, 30 May 2014 22:26:10 +0000 (17:26 -0500)]
test: use direct I/O when injecting bad data into RAID images

When directly corrupting RAID images for the purpose of testing,
we must use direct I/O (or a 'sync' after the 'dd') to ensure that
the writes are not caught in the buffer cache in a way that is not
reachable by the top-level RAID device.

10 years agoreport: fix report field type for lv_kernel_major/minor
Peter Rajnoha [Fri, 30 May 2014 15:23:54 +0000 (17:23 +0200)]
report: fix report field type for lv_kernel_major/minor

Should be defined as numeric field, not string field.

10 years agoactivation: Remove empty DM device when table fails to load.
Jonathan Brassow [Wed, 28 May 2014 15:17:15 +0000 (10:17 -0500)]
activation:  Remove empty DM device when table fails to load.

As part of better error handling, remove DM devices that have been
sucessfully created but failed to load a table.  This can happen
when pvmove'ing in a cluster and the cluster mirror daemon is not
running on a remote node - the mapping table failing to load as a
result.  In this case, any revert would work on other nodes running
cmirrord because the DM devices on those nodes did succeed in loading.
However, because no table was able to load on the non-cmirrord nodes,
there is no table present that points to what needs to be reverted.
This causes the empty DM device to remain on the system without being
present in any LVM representation.

This patch should only be considered a partial fix to the overall
problem.  This is because only the device which failed to load a
table is removed.  Any LVs that may have been loaded as requirements
to the DM device that failed to load may be left in place.  Complete
clean-up will require tracking those devices which have been created
as dependencies and removing them along with the device that failed
to load a table.

10 years agotests: rename test
Zdenek Kabelac [Wed, 28 May 2014 13:41:06 +0000 (15:41 +0200)]
tests: rename test

10 years agorevert: restore original timeout
Zdenek Kabelac [Wed, 28 May 2014 13:27:14 +0000 (15:27 +0200)]
revert: restore original timeout

Accidently it's been commited - but it has also shown,
that on heavy loaded systems (like our test machine could be)
slightly bigger timeouts which waits longer for udev rules
processing does help and avoids occasional refuse of deactivation
because device is still being open.
(i.e. lvcreate...; lvchange -an...)

Unsure how we could now synchronize for this. On very slow(/loaded)
system 5 second timeout is simply not enough.

TODO: introduce at least lvm.conf configurable setting to
allow longer 'retry' loops.

10 years agotests: dd needs to hit disk
Zdenek Kabelac [Wed, 28 May 2014 13:24:41 +0000 (15:24 +0200)]
tests: dd needs to hit disk

Unsure if this is feature or bug of syncaction,
but it needs to be present physically on the media
and it ignores content of buffer cache...

(maybe lvchange should implicitely fsync all disks
that are members of raid array before starting test??)

10 years agotests: raid syncaction activation race
Zdenek Kabelac [Wed, 28 May 2014 13:23:46 +0000 (15:23 +0200)]
tests: raid syncaction activation race

Demonstrace problem of syncaction being called right after activation.

10 years agotests: detect same uuid on PV
Zdenek Kabelac [Tue, 27 May 2014 14:51:57 +0000 (16:51 +0200)]
tests: detect same uuid on PV

Check we know how to handle same UUID
Test  currently does NOT work on lvmetad
(or it's unclear it even should - thus test error
is currently lowered to 'test warning')

TODO: replace lib/test with a better shell script name

10 years agoraid: cleanup error messages
Zdenek Kabelac [Tue, 27 May 2014 14:56:33 +0000 (16:56 +0200)]
raid: cleanup error messages

Add log_error messages on error paths.

10 years agoactivate: cleanup lv_check_not_in_use
Zdenek Kabelac [Tue, 27 May 2014 15:07:04 +0000 (17:07 +0200)]
activate: cleanup lv_check_not_in_use

Reindent lv_check_not_in_use to simplify internal loop code.
Also return always '0/1'  (drop -1) - since we only
check for failure (0) - and we don't really know
why  lv_info() has failed.

10 years agoudev: also print subsystem udev flags in debug message about udev flags + fix typo...
Peter Rajnoha [Tue, 27 May 2014 12:44:11 +0000 (14:44 +0200)]
udev: also print subsystem udev flags in debug message about udev flags + fix typo DM_SUBSSYTEM_UDEV_FLAG7 -> DM_SUBSYSTEM_UDEV_FLAG7

10 years agotests: support thin_restore configurable
Zdenek Kabelac [Mon, 26 May 2014 21:28:03 +0000 (23:28 +0200)]
tests: support thin_restore configurable

Currently this tool is used only in tests.

10 years agotests: update aux disable_dev
Zdenek Kabelac [Mon, 26 May 2014 13:58:09 +0000 (15:58 +0200)]
tests: update aux disable_dev

disable_dev can't use transaction - since it may lead occasionaly to
weird error - example could be nomda-missing.sh test case.
Here occasionaly device instead of being removed was left as
error device and testing different code path (which is unfortunatelly
buggy)

When we want to test 'error' device -  'aux error_dev()' should be used.

10 years agocleanup: internal error for impossible path
Zdenek Kabelac [Fri, 23 May 2014 21:53:04 +0000 (23:53 +0200)]
cleanup: internal error for impossible path

Add 'default' path for impossible execution code path.

10 years agoman: cleanup dmsetup
Zdenek Kabelac [Mon, 26 May 2014 20:55:31 +0000 (22:55 +0200)]
man: cleanup dmsetup

Add few bold texts.

10 years agodmsetup: add warning
Zdenek Kabelac [Mon, 26 May 2014 20:51:04 +0000 (22:51 +0200)]
dmsetup: add warning

Warn when --udevcookie/DM_UDEV_COOKIE is used with 'dmsetup remove --force'.

When command is doing multiple ioctl operations on a single device,
it may invoke udev activity, that is colliding with further ioctl commands.
The result of such operation becomes unpredictable.
Use of --retry could partially help...

10 years agocleanup: use const for endptr in dm_units_to_factor
Peter Rajnoha [Mon, 26 May 2014 10:09:01 +0000 (12:09 +0200)]
cleanup: use const for endptr in dm_units_to_factor

10 years agotests: improve command coverage
Zdenek Kabelac [Fri, 23 May 2014 21:34:00 +0000 (23:34 +0200)]
tests: improve command coverage

10 years agotests: add unusable kernel for raid5 testing
Zdenek Kabelac [Fri, 23 May 2014 20:40:31 +0000 (22:40 +0200)]
tests: add unusable kernel for raid5 testing

10 years agotests: increase min version for raid testing
Zdenek Kabelac [Fri, 23 May 2014 20:35:05 +0000 (22:35 +0200)]
tests: increase min version for raid testing

Seems smaller version are causing weird kernel lookups.

10 years agovgextend: allow --yes to skip prompt
Zdenek Kabelac [Fri, 23 May 2014 21:33:17 +0000 (23:33 +0200)]
vgextend: allow --yes to skip prompt

10 years agocleanup: indent
Zdenek Kabelac [Fri, 23 May 2014 12:25:12 +0000 (14:25 +0200)]
cleanup: indent

10 years agocleanup: use directly segtype->name
Zdenek Kabelac [Fri, 23 May 2014 12:24:46 +0000 (14:24 +0200)]
cleanup: use directly segtype->name

Simplify printing of segtype name.

10 years agocleanup: add seg_is_pool macro
Zdenek Kabelac [Fri, 23 May 2014 12:24:28 +0000 (14:24 +0200)]
cleanup: add seg_is_pool macro

Simplify code querying for pool segtype.

10 years agodev_manager: disable extra udev loop
Zdenek Kabelac [Fri, 23 May 2014 19:22:38 +0000 (21:22 +0200)]
dev_manager: disable extra udev loop

Disable code which has postprocessed whole tree and reset udev flags.
We need to find out which case was troublesome - since this loop
was just hidding bug in other code parts (most probably preload tree)

10 years agotests: check more things with vgchange
Zdenek Kabelac [Thu, 22 May 2014 10:00:59 +0000 (12:00 +0200)]
tests: check more things with vgchange

10 years agotests: swap tests
Zdenek Kabelac [Thu, 22 May 2014 10:00:46 +0000 (12:00 +0200)]
tests: swap tests

10 years agotests: add check vg_attr_bit
Zdenek Kabelac [Thu, 22 May 2014 09:59:11 +0000 (11:59 +0200)]
tests: add check vg_attr_bit

Similar function like  'check lv_attr_bit'

10 years agotests: detect raid presence
Zdenek Kabelac [Thu, 22 May 2014 09:58:44 +0000 (11:58 +0200)]
tests: detect raid presence

10 years agocleanup: use y/n instead of y|n
Zdenek Kabelac [Thu, 22 May 2014 09:57:51 +0000 (11:57 +0200)]
cleanup: use y/n instead of y|n

Use same for of yes no query everywhere.

10 years agolvm_init: don't use name mangling for LVM
Peter Rajnoha [Thu, 22 May 2014 07:56:44 +0000 (09:56 +0200)]
lvm_init: don't use name mangling for LVM

LVM has restricter character set that is allowed for VG-LV names
and the dm names constructed do not contain any blacklisted characters
that would require name mangling.

Also, when any other device-mapper device is scanned that could
possibly contain such blacklisted characters, we reference the
device by its major:minor instead of dm name (e.g. _device_is_usable fn).

10 years agotests: raid and dmeventd
Zdenek Kabelac [Wed, 21 May 2014 21:13:59 +0000 (23:13 +0200)]
tests: raid and dmeventd

10 years agotests: more pvchange tests
Zdenek Kabelac [Wed, 21 May 2014 21:13:19 +0000 (23:13 +0200)]
tests: more pvchange tests

10 years agotests: more vgcfgrestore testing
Zdenek Kabelac [Wed, 21 May 2014 21:12:00 +0000 (23:12 +0200)]
tests: more vgcfgrestore testing

Check '-l' and archiving.

10 years agocleanup: make error message more readable
Zdenek Kabelac [Wed, 21 May 2014 21:10:35 +0000 (23:10 +0200)]
cleanup: make error message more readable

10 years agocleanup: indent
Zdenek Kabelac [Wed, 21 May 2014 21:10:02 +0000 (23:10 +0200)]
cleanup: indent

10 years agovgcfgrestore: return invalid cmd line
Zdenek Kabelac [Wed, 21 May 2014 21:11:15 +0000 (23:11 +0200)]
vgcfgrestore: return invalid cmd line

When error is detected on command line options, return '3'.

10 years agotests: restore disable_dev behavior
Zdenek Kabelac [Wed, 21 May 2014 14:59:38 +0000 (16:59 +0200)]
tests: restore disable_dev behavior

Notify needs to go  with major:minor before device disappears.

10 years agotests: skips on unsupported systems
Zdenek Kabelac [Wed, 21 May 2014 14:48:06 +0000 (16:48 +0200)]
tests: skips on unsupported systems

10 years agoman: missing space between option name and value name
Peter Rajnoha [Wed, 21 May 2014 13:51:28 +0000 (15:51 +0200)]
man: missing space between option name and value name

10 years agoman: more man page updates for --commandprofile and --metadataprofile split
Peter Rajnoha [Wed, 21 May 2014 12:53:56 +0000 (14:53 +0200)]
man: more man page updates for --commandprofile and --metadataprofile split

10 years agoman: update lvm.conf man page for latest changes
Peter Rajnoha [Wed, 21 May 2014 11:25:09 +0000 (13:25 +0200)]
man: update lvm.conf man page for latest changes

10 years agoprofiles: remove default.profile and add {command,metadata}_profile_template.profile
Peter Rajnoha [Wed, 21 May 2014 10:32:12 +0000 (12:32 +0200)]
profiles: remove default.profile and add {command,metadata}_profile_template.profile

The "default.profile" name was misleading. It's actually a helper
*template* that can be used for copying and further editing to create
a new profile.

Also, we have separate command and metadata profiles now so the templates
are separated as well - we can't mix profile settings from one group with
another - such profile is rejected by lvm tools.

10 years agotests: notify loop needs maj:min
Zdenek Kabelac [Wed, 21 May 2014 10:00:32 +0000 (12:00 +0200)]
tests: notify loop needs maj:min

Missed in previous commit.

10 years agotests: notify lvmetad after udev transation
Zdenek Kabelac [Wed, 21 May 2014 09:40:34 +0000 (11:40 +0200)]
tests: notify lvmetad after udev transation

Delay udev notification after the point udev transaction
is finished - since otherwise some device may still
be found missing until udev transaction is finished.

10 years agoman: update dumpconfig man page for latest changes
Peter Rajnoha [Wed, 21 May 2014 09:00:55 +0000 (11:00 +0200)]
man: update dumpconfig man page for latest changes

10 years agoman: call installers only when there are set vars.
Zdenek Kabelac [Wed, 21 May 2014 08:50:56 +0000 (10:50 +0200)]
man: call installers only when there are set vars.

When MAN7, MAN8CLUSTER or MAN8SYSTEMD_GENERATORS would be empty,
don't call respective INSTALL tools.
On older systems they even generate error causing abort
of makefile target.

10 years agocleanup: remove duplicate --commandprofile reference in dumpconfig's help string
Peter Rajnoha [Wed, 21 May 2014 08:30:02 +0000 (10:30 +0200)]
cleanup: remove duplicate --commandprofile reference in dumpconfig's help string

10 years agosystemd: use umask 022 for generated systemd units by lvm2-activation-generator
Dongmao Zhang [Wed, 21 May 2014 08:10:24 +0000 (10:10 +0200)]
systemd: use umask 022 for generated systemd units by lvm2-activation-generator

10 years agosystemd: install lvm2-cluster-activation script as executable
Peter Rajnoha [Wed, 21 May 2014 07:45:29 +0000 (09:45 +0200)]
systemd: install lvm2-cluster-activation script as executable

10 years agotests: checking mirror_remove_missing
Zdenek Kabelac [Tue, 20 May 2014 20:50:52 +0000 (22:50 +0200)]
tests: checking mirror_remove_missing

FIXME:

Seems like conversion of log is not supported in clustered VG
and needs to be fixed.

10 years agotests: lvconvert needs --yes
Zdenek Kabelac [Tue, 20 May 2014 20:50:33 +0000 (22:50 +0200)]
tests: lvconvert needs --yes

10 years agospec: configurable cache build
Zdenek Kabelac [Tue, 20 May 2014 17:56:20 +0000 (19:56 +0200)]
spec: configurable cache build

Install lvmcache man page when being configured with cache support.
Install lvmthin man page only with thin support.

10 years agotests: rebuild paths when Makefile is updated
Zdenek Kabelac [Tue, 20 May 2014 19:27:43 +0000 (21:27 +0200)]
tests: rebuild paths when Makefile is updated

10 years agotests: add have_cache and have_raid
Zdenek Kabelac [Tue, 20 May 2014 17:54:48 +0000 (19:54 +0200)]
tests: add have_cache and have_raid

Need to be aware of build options, when system would be
configure without raid or cache support

10 years agotests: wait before down-convert
Zdenek Kabelac [Mon, 19 May 2014 12:30:15 +0000 (14:30 +0200)]
tests: wait before down-convert

10 years agotests: update lvconvert test
Zdenek Kabelac [Tue, 20 May 2014 19:11:11 +0000 (21:11 +0200)]
tests: update lvconvert test

Split raid test to separate file
Add --yes flag to automated testing

10 years agothin: improve lvconvert messages
Zdenek Kabelac [Tue, 20 May 2014 18:05:09 +0000 (20:05 +0200)]
thin: improve lvconvert messages

Add more info into printed message.

10 years agocleanup: use print when displaying info
Zdenek Kabelac [Tue, 20 May 2014 10:56:49 +0000 (12:56 +0200)]
cleanup: use print when displaying info

Use error or warn only when we really have some problem in the code.

10 years agocleanup: indent
Zdenek Kabelac [Tue, 20 May 2014 18:10:55 +0000 (20:10 +0200)]
cleanup: indent

10 years agocleanup: unneeded initialization
Zdenek Kabelac [Tue, 20 May 2014 18:10:29 +0000 (20:10 +0200)]
cleanup: unneeded initialization

Move or drop initialization where it is not needed.

10 years agoman: cleanup style
Zdenek Kabelac [Tue, 20 May 2014 10:54:19 +0000 (12:54 +0200)]
man: cleanup style

10 years agodebug: fix backtracing
Zdenek Kabelac [Tue, 20 May 2014 10:53:51 +0000 (12:53 +0200)]
debug: fix backtracing

10 years agolvconvert: check ret code of mirror_remove_missing
Zdenek Kabelac [Tue, 20 May 2014 10:57:42 +0000 (12:57 +0200)]
lvconvert: check ret code of mirror_remove_missing

When mirror_remove_missing() fails, stop repairing mirror.

10 years agothin: lvconvert warn before conversion
Zdenek Kabelac [Tue, 20 May 2014 14:21:14 +0000 (16:21 +0200)]
thin: lvconvert warn before conversion

Warn user before converting volume to different type.

  WARNING: Converting vg/lvol0 logical volume to pool's meta/data volume.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)

Since the content of volume is lost we have to query user to confirm
such operation.  If user is 100% sure, he may use '--yes' to avoid prompts.

10 years agotests: update profiles.sh test for latest changes
Peter Rajnoha [Tue, 20 May 2014 12:50:42 +0000 (14:50 +0200)]
tests: update profiles.sh test for latest changes

10 years agodumpconfig: add --type profilable-command/profilable-metadata, --metadataprofile...
Peter Rajnoha [Tue, 20 May 2014 12:45:20 +0000 (14:45 +0200)]
dumpconfig: add --type profilable-command/profilable-metadata, --metadataprofile/--commandprofile

The dumpconfig now understands --commandprofile/--profile/--metadataprofile

The --commandprofile and --profile functionality is almost the same
with only one difference and that is that the --profile is just used
for dumping the content, it's not applied for the command itself
(while the --commandprofile profile is applied like it is done for
any other LVM command).

We also allow --metadataprofile for dumpconfig - dumpconfig *does not*
touch VG/LV and metadata in any way so it's OK to use it here (just for
dumping the content, checking the profile validity etc.).

The validity of the profile can be checked with:
      dumpconfig --commandprofile/--profile/--metadataprofile --validate

...depending on the profile type.

Also, mention --config in the dumpconfig help string so users know
that  dumpconfig handles this too (it did even before, but it was not
documented in the help string).

10 years agoconfig: differentiate command and metadata profiles and consolidate profile handling...
Peter Rajnoha [Tue, 20 May 2014 12:13:10 +0000 (14:13 +0200)]
config: differentiate command and metadata profiles and consolidate profile handling code

- When defining configuration source, the code now uses separate
  CONFIG_PROFILE_COMMAND and CONFIG_PROFILE_METADATA markers
  (before, it was just CONFIG_PROFILE that did not make the
  difference between the two). This helps when checking the
  configuration if it contains correct set of options which
  are all in either command-profilable or metadata-profilable
  group without mixing these groups together - so it's a firm
  distinction. The "command profile" can't contain
  "metadata profile" and vice versa! This is strictly checked
  and if the settings are mixed, such profile is rejected and
  it's not used. So in the end, the CONFIG_PROFILE_COMMAND
  set of options and CONFIG_PROFILE_METADATA are mutually exclusive
  sets.

- Marking configuration with one or the other marker will also
  determine the way these configuration sources are positioned
  in the configuration cascade which is now:

  CONFIG_STRING -> CONFIG_PROFILE_COMMAND -> CONFIG_PROFILE_METADATA -> CONFIG_FILE/CONFIG_MERGED_FILES

- Marking configuration with one or the other marker will also make
  it possible to issue a command context refresh (will be probably
  a part of a future patch) if needed for settings in global profile
  set. For settings in metadata profile set this is impossible since
  we can't refresh cmd context in the middle of reading VG/LV metadata
  and for each VG/LV separately because each VG/LV can have a different
  metadata profile assinged and it's not possible to change these
  settings at this level.

- When command profile is incorrect, it's rejected *and also* the
  command exits immediately - the profile *must* be correct for the
  command that was run with a profile to be executed. Before this
  patch, when the profile was found incorrect, there was just the
  warning message and the command continued without profile applied.
  But it's more correct to exit immediately in this case.

- When metadata profile is incorrect, we reject it during command
  runtime (as we know the profile name from metadata and not early
  from command line as it is in case of command profiles) and we
  *do continue* with the command as we're in the middle of operation.
  Also, the metadata profile is applied directly and on the fly on
  find_config_tree_* fn call and even if the metadata profile is
  found incorrect, we still need to return the non-profiled value
  as found in the other configuration provided or default value.
  To exit immediately even in this case, we'd need to refactor
  existing find_config_tree_* fns so they can return error. Currently,
  these fns return only config values (which end up with default
  values in the end if the config is not found).

- To check the profile validity before use to be sure it's correct,
  one can use :

    lvm dumpconfig --commandprofile/--metadataprofile ProfileName --validate

  (the --commandprofile/--metadataprofile for dumpconfig will come
   as part of the subsequent patch)

- This patch also adds a reference to --commandprofile and
  --metadataprofile in the cmd help string (which was missing before
  for the --profile for some commands). We do not mention --profile
  now as people should use --commandprofile or --metadataprofile
  directly. However, the --profile is still supported for backward
  compatibility and it's translated as:

    --profile == --metadataprofile for lvcreate, vgcreate, lvchange and vgchange
                 (as these commands are able to attach profile to metadata)

    --profile == --commandprofile for all the other commands
                (--metadataprofile is not allowed there as it makes no sense)

- This patch also contains some cleanups to make the code handling
  the profiles more readable...

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