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

10 years agoconfig: add CFG_PROFILABLE_METADATA flag
Peter Rajnoha [Mon, 19 May 2014 14:29:50 +0000 (16:29 +0200)]
config: add CFG_PROFILABLE_METADATA flag

Mark profilable settings with a separate CFG_PROFILABLE_METADATA
flag where the profile can be attached to VG/LV. This makes it possible
to differentiate global command-profilable settings (CFG_PROFILABLE flag)
and contextual metadata-profilable (per VG/LV) settings (CFG_PROFILABLE_METADATA flag).

10 years agocommands: do not register profile_ARG for lvcreate/lvchange separetely
Peter Rajnoha [Mon, 19 May 2014 14:29:06 +0000 (16:29 +0200)]
commands: do not register profile_ARG for lvcreate/lvchange separetely

The --profile is globally available for all commands.

10 years agodumpconfig: fix dumpconfig --type diff used in lvm shell as second and later command
Peter Rajnoha [Mon, 19 May 2014 12:51:11 +0000 (14:51 +0200)]
dumpconfig: fix dumpconfig --type diff used in lvm shell as second and later command

The dumpconfig reuses existing config_def_check results in case
the check is done during general lvm command context initialization
(when enabled by config/checks=1) so dumpconfig does not need to run
the same check again during its execution, hence saving some time.

However, we don't check for differences from defaults during general
lvm command initialization as it's useless at that time. It makes
sense only in case when such a check is directly requested (like in
the case of lvm dumpconfig --type diff). We need to take care that
the reused information was already produced with this "diff" checking
before and if not, we need to force the check so the check status also
gathers the new "diff" info now.

Also, do not do diff checking for any other dumpconfig command that
is run after dumpconfig --type diff.

10 years agoconfig: fix incorrect profile initialization on cmd context refresh
Peter Rajnoha [Mon, 19 May 2014 11:59:23 +0000 (13:59 +0200)]
config: fix incorrect profile initialization on cmd context refresh

When cmd refresh is called, we need to move any already loaded profiles
to profiles_to_load list which will cause their reload on subsequent
use. In addition to that, we need to take into account any change
in config/profile configuration setting on cmd context refresh
since this setting could be overriden with --config.

Also, when running commands in the shell, we need to remove the
global profile used from the configuration cascade so the profile
is not incorrectly reused next time when the --profile option is
not specified anymore for the next command in the shell.

This bug only affected profile specified by --profile cmd line
arg, not profiles referenced from LVM metadata.

10 years agoconfig: attach cft_check_handle to each config tree instead of global cmd_context
Peter Rajnoha [Mon, 19 May 2014 11:23:12 +0000 (13:23 +0200)]
config: attach cft_check_handle to each config tree instead of global cmd_context

Before, the cft_check_handle used to direct configuration checking
was part of cmd_context. It's better to attach this as part of the
exact config tree against which the check is done. This patch moves
the cft_check_handle out of cmd_context and it attaches it to the
config tree directly as dm_config_tree->custom->config_source->check_handle.

This change makes it easier to track the config tree check results
and provides less space for bugs as the results are directly attached
to the tree and we don't need to be cautious whether the global value
is correct or not (and whether it needs reinitialization) as it was
in the case when the cft_check_handle was part of cmd_context.

10 years agoconfig: add CONFIG_FILE_SPECIAL config source id
Peter Rajnoha [Mon, 19 May 2014 08:58:28 +0000 (10:58 +0200)]
config: add CONFIG_FILE_SPECIAL config source id

Add CONFIG_FILE_SPECIAL config source id to make a difference between
real configuration tree (like lvm.conf and tag configs) and special purpose
configuration tree (like LVM metadata, persistent filter).

This makes it easier to attach correct customized data to the config
tree that is created out of the source then.

10 years agotests: drop nosync
Zdenek Kabelac [Mon, 19 May 2014 11:22:46 +0000 (13:22 +0200)]
tests: drop nosync

Mirrors currently do not support any conversion,
when they are created no-sync.

10 years agoman: lvmcache
Zdenek Kabelac [Sun, 18 May 2014 18:09:47 +0000 (20:09 +0200)]
man: lvmcache

separate man page for lvm cache

10 years agocleanup: device extent_size first
Zdenek Kabelac [Sun, 18 May 2014 18:08:07 +0000 (20:08 +0200)]
cleanup: device extent_size first

10 years agodebug: backtrace error path
Zdenek Kabelac [Sun, 18 May 2014 18:07:24 +0000 (20:07 +0200)]
debug: backtrace error path

Add backtrace for 'n' answer.

10 years agoman: lvmcache
Zdenek Kabelac [Thu, 15 May 2014 10:06:18 +0000 (12:06 +0200)]
man: lvmcache

Migrate cache description into  man(7) entry
(like lvmthin).

10 years agodisplay: print skipped prompt
Zdenek Kabelac [Thu, 15 May 2014 09:58:49 +0000 (11:58 +0200)]
display: print skipped prompt

Since decisions in the silent mode may not be always obvious,
print skipped prompt with answer 'n'.

Also document  '-qq' behaviour (single -q only shuts
logging, while -qq sets silent mode).

10 years agotests: speedup
Zdenek Kabelac [Thu, 15 May 2014 08:25:25 +0000 (10:25 +0200)]
tests: speedup

Avoid some expencive raid/mirror synchronization when testing
just allocation sizes.
Use lv_attr_bit

10 years agoman:misc updates
Zdenek Kabelac [Thu, 15 May 2014 08:25:15 +0000 (10:25 +0200)]
man:misc updates

10 years agoreport: export DM_REPORT_FIELD_RESERVED_NAME_{HELP,HELP_ALT} and show help on '<lvm_c...
Peter Rajnoha [Thu, 15 May 2014 08:58:05 +0000 (10:58 +0200)]
report: export DM_REPORT_FIELD_RESERVED_NAME_{HELP,HELP_ALT} and show help on '<lvm_command> -O help'

Share DM_REPORT_FIELD_RESERVED_NAME_{HELP,HELP_ALT} between libdm and
any libdm user to handle reserved field names, in this case the virtual
field name to show help instead of failing on unrecognized field.
The libdm user also needs to check the field name so it can fire
proper code in this case (cleanup, exit etc.).

10 years agoreport: Add metadata_percent to lvs_cols.
Alasdair G Kergon [Thu, 15 May 2014 07:32:27 +0000 (08:32 +0100)]
report: Add metadata_percent to lvs_cols.

10 years agoman: lvmthin cover snapshot merge and xfs
David Teigland [Wed, 14 May 2014 19:05:21 +0000 (14:05 -0500)]
man: lvmthin cover snapshot merge and xfs

also fix a couple inconsistent example values.

10 years agoman: more lvmthin discard references
David Teigland [Wed, 14 May 2014 14:44:09 +0000 (09:44 -0500)]
man: more lvmthin discard references

and some fixes from Tom.

10 years agoallocation: Fix alloc anywhere with parity.
Alasdair G Kergon [Wed, 14 May 2014 15:25:43 +0000 (16:25 +0100)]
allocation: Fix alloc anywhere with parity.

Take account of parity areas with alloc anywhere in
_calc_required_extents.  Extents beyond area_count were treated
incorrectly as mirror logs.

10 years agoman: Fix man7 dir dependency.
Alasdair G Kergon [Tue, 13 May 2014 10:18:13 +0000 (11:18 +0100)]
man: Fix man7 dir dependency.

https://bugs.gentoo.org/510202

10 years agocleanup: improve error message
Zdenek Kabelac [Tue, 13 May 2014 08:33:17 +0000 (10:33 +0200)]
cleanup: improve error message

Update impossile to happen error message.

10 years agotests: updates
Zdenek Kabelac [Tue, 13 May 2014 08:28:55 +0000 (10:28 +0200)]
tests: updates

Move thin test out of listing.

10 years agotests: replance hostname call
Zdenek Kabelac [Mon, 12 May 2014 08:39:57 +0000 (10:39 +0200)]
tests: replance hostname call

10 years agocleanup: drop unused header
Zdenek Kabelac [Fri, 9 May 2014 15:10:26 +0000 (17:10 +0200)]
cleanup: drop unused header

10 years agocleanup: cast int to typedef
Zdenek Kabelac [Fri, 9 May 2014 14:13:48 +0000 (16:13 +0200)]
cleanup: cast int to typedef

10 years agoconf: document new thin_check option
Zdenek Kabelac [Mon, 12 May 2014 12:12:55 +0000 (14:12 +0200)]
conf: document new thin_check option

10 years agocoverity: catch unwanted path
Zdenek Kabelac [Fri, 9 May 2014 15:10:51 +0000 (17:10 +0200)]
coverity: catch unwanted path

We validate this path already earlier.

10 years agoconfigure: improve needs_check thin_check test
Zdenek Kabelac [Mon, 12 May 2014 12:51:23 +0000 (14:51 +0200)]
configure: improve needs_check thin_check test

Improve testing for needs_check - when old tools are installed,
issue proper warning from configure, but stop sending needs_check
flag to the old tool.

10 years agoconfigure: drop siginterrupt
Zdenek Kabelac [Sat, 6 Jul 2013 09:22:29 +0000 (11:22 +0200)]
configure: drop siginterrupt

Not used anymore

10 years agocleanup: use enum return codes
Zdenek Kabelac [Wed, 7 May 2014 11:52:01 +0000 (13:52 +0200)]
cleanup: use enum return codes

10 years agocleanup: constify pointers
Zdenek Kabelac [Wed, 7 May 2014 11:09:59 +0000 (13:09 +0200)]
cleanup: constify pointers

10 years agoclenaup: drop unused assigns
Zdenek Kabelac [Wed, 7 May 2014 09:58:43 +0000 (11:58 +0200)]
clenaup: drop unused assigns

10 years agocleanup: missed conversion to dm_malloc/free usage
Zdenek Kabelac [Wed, 7 May 2014 09:54:12 +0000 (11:54 +0200)]
cleanup: missed conversion to dm_malloc/free usage

Few missed unconverted dm_malloc/free calls.

10 years agocleanup: cosmetics.
Zdenek Kabelac [Wed, 7 May 2014 09:44:33 +0000 (11:44 +0200)]
cleanup: cosmetics.

Initialized attrs so analyzers are less confused
(since currently our method calls should always initialize attrs on
return).

10 years agocleanup: drop uneeded headers
Zdenek Kabelac [Wed, 7 May 2014 08:50:06 +0000 (10:50 +0200)]
cleanup: drop uneeded headers

10 years agocoverity: ignore ret val
Zdenek Kabelac [Wed, 7 May 2014 09:22:14 +0000 (11:22 +0200)]
coverity: ignore ret val

Since we intentionaly do not want to check them,
cast result values to void.

10 years agocoverity: error for undefined origin
Zdenek Kabelac [Wed, 7 May 2014 09:14:22 +0000 (11:14 +0200)]
coverity: error for undefined origin

If we would have been missing origin here, it would
be an internal error - since these values are validated
earlier.

10 years agocoverity: check for profile
Zdenek Kabelac [Wed, 7 May 2014 08:52:00 +0000 (10:52 +0200)]
coverity: check for profile

Ensure str is not NULL for analyzer.

10 years agocache: avoid expression overflow
Zdenek Kabelac [Wed, 7 May 2014 09:12:05 +0000 (11:12 +0200)]
cache: avoid expression overflow

Cast data_extents to 64bit so calculation is in 64b arithmetic.

10 years agosignals: better nesting support
Zdenek Kabelac [Fri, 2 May 2014 15:30:27 +0000 (17:30 +0200)]
signals: better nesting support

Support upto 3 levels os nesting signal blocking.
As of today - code blocks signals immediatelly when it opens
VG in read-write mode - this however makes current prompt usage
then partially unusable since user may not 'break' command
during prompt (something most user would expect).

Until a better fix for prompting is implemented, put in support
for signal nesting - thus when prompt enables signal acceptance,
make it possible to really break command at this point.

10 years agodebug: add more debug message for signal handling
Zdenek Kabelac [Fri, 2 May 2014 15:34:22 +0000 (17:34 +0200)]
debug: add more debug message for signal handling

Adding log_sys_debug for eventual logging of system errors.
(Using debug level, since currently signal handling functions
do not fail when any error is encoutered).

10 years agolocking: use sigaction signal handling
Zdenek Kabelac [Fri, 2 May 2014 15:27:51 +0000 (17:27 +0200)]
locking: use sigaction signal handling

Use sigint_allow/restore function instead of duplicating code
and switch to use only sigactiction based signal handling.

10 years agomake: fix commit 1756bf6
Peter Rajnoha [Wed, 7 May 2014 10:13:36 +0000 (12:13 +0200)]
make: fix commit 1756bf6

"DIST_TARGET" should be "DISTCLEAN_TARGET"

10 years agocleanup: fix compiler warning
Peter Rajnoha [Tue, 6 May 2014 12:38:38 +0000 (14:38 +0200)]
cleanup: fix compiler warning

locking/file_locking.c:162:2: warning: implicit declaration of function ‘init_signals’

10 years agologging: Add LCK_REVERT_MODE to flags printed by decode_flags()
Jonathan Brassow [Mon, 5 May 2014 19:27:10 +0000 (14:27 -0500)]
logging: Add LCK_REVERT_MODE to flags printed by decode_flags()

The decode_flags() function does not yet know about the
LCK_REVERT_MODE flag.

10 years agosignals: Add init_signals.
Alasdair G Kergon [Thu, 1 May 2014 19:31:19 +0000 (20:31 +0100)]
signals: Add init_signals.

10 years agosignals: Move sigint handling out to lvm-signal.
Alasdair G Kergon [Thu, 1 May 2014 19:07:17 +0000 (20:07 +0100)]
signals: Move sigint handling out to lvm-signal.

10 years agolocking: Separate out flock and signal code.
Alasdair G Kergon [Thu, 1 May 2014 16:37:14 +0000 (17:37 +0100)]
locking: Separate out flock and signal code.

10 years agosystemd: use lvm binary insetad of command symlink in lvm2-pvscan.service
Peter Rajnoha [Wed, 30 Apr 2014 13:21:25 +0000 (15:21 +0200)]
systemd: use lvm binary insetad of command symlink in lvm2-pvscan.service

10 years agosystemd: make sysinit.target to pull in lvm2-lvmetad.socket, not sockets.target
Peter Rajnoha [Wed, 30 Apr 2014 12:52:10 +0000 (14:52 +0200)]
systemd: make sysinit.target to pull in lvm2-lvmetad.socket, not sockets.target

The sysinit.target is ordered even before sockets.target and there
may be situations in which the lvmetad is needed early, for example
in rescue.target to activate some LVs on which mountpoints reside.
Also, like in the case of rescue.target, the sockets.target is not
pulled in (unless some other service pulls it in explicitly).

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1087586#c26
for the summary of the problem.

10 years agotests: lets the test continue
Zdenek Kabelac [Wed, 30 Apr 2014 08:16:35 +0000 (10:16 +0200)]
tests: lets the test continue

unwanted start of dmeventd was caused by seg_monitor status.

10 years agocleanup: modules_needed only for devmapper
Zdenek Kabelac [Tue, 29 Apr 2014 21:41:17 +0000 (23:41 +0200)]
cleanup: modules_needed only for devmapper

Drop compilation of modules_needed and add_target_lin
function when compiled without devmapper support.
Cleanup surrounding ifdefs.

10 years agocleanup: indent
Zdenek Kabelac [Tue, 29 Apr 2014 18:14:05 +0000 (20:14 +0200)]
cleanup: indent

10 years agocleanup: indent in devmapper-event
Zdenek Kabelac [Tue, 29 Apr 2014 11:21:15 +0000 (13:21 +0200)]
cleanup: indent in devmapper-event

Drop header inclusion - this file is already included.
Shorten code.

10 years agounknown: add_target_line is not needed
Zdenek Kabelac [Tue, 29 Apr 2014 21:38:08 +0000 (23:38 +0200)]
unknown: add_target_line is not needed

Leave addition of unknown segment to table as internal error.
Do not replace unknown segment with error device.

10 years agomakefile: fix regression
Zdenek Kabelac [Tue, 29 Apr 2014 11:24:23 +0000 (13:24 +0200)]
makefile: fix regression

Commit 1af05a7a166a470d1b9d86f88fdc64c2d984124b was incorrect.
Generated files from configure could be only distclean-ed.
(in-release fix)

10 years agolv: show X attr when lv_info fails
Zdenek Kabelac [Tue, 29 Apr 2014 18:14:36 +0000 (20:14 +0200)]
lv: show X attr when lv_info fails

Print 'X' also when lv_info() fails.
(i.e. compilation with --disable-ioctl)

10 years agodevmapper-event: always initialize timeout
Zdenek Kabelac [Tue, 29 Apr 2014 11:23:14 +0000 (13:23 +0200)]
devmapper-event: always initialize timeout

Always pass fully initialized timeval struct to select.

10 years agodevmapper: fix compilation without devmapper
Zdenek Kabelac [Tue, 29 Apr 2014 11:22:10 +0000 (13:22 +0200)]
devmapper: fix compilation without devmapper

Fix compilation when configured with --disable-devmapper option.

10 years agolibdm: cleanup complation without DM_IOCTLS
Zdenek Kabelac [Tue, 29 Apr 2014 21:40:43 +0000 (23:40 +0200)]
libdm: cleanup complation without DM_IOCTLS

10 years agoconfigure: corrected ioctl option
Zdenek Kabelac [Tue, 29 Apr 2014 10:44:32 +0000 (12:44 +0200)]
configure: corrected ioctl option

The correct name for disable ioctl option is --disable-ioctl
(--disable-driver never worked)
Also sort scripts generated files alphabetically.

10 years agodisplay: check for dmeventd support
Zdenek Kabelac [Wed, 30 Apr 2014 08:13:35 +0000 (10:13 +0200)]
display: check for dmeventd support

When quering for dmeventd monitoring status, check first
if lvm2 is configured to monitor to avoid unwanted start
of dmeventd process for answering monitoring status.

10 years agopvremove: Catch CTRL-c during prompts.
Alasdair G Kergon [Tue, 29 Apr 2014 07:16:28 +0000 (08:16 +0100)]
pvremove: Catch CTRL-c during prompts.

10 years agotests: improve coverage
Zdenek Kabelac [Mon, 28 Apr 2014 09:57:42 +0000 (11:57 +0200)]
tests: improve coverage

Test more code paths for lvscan & lvdisplay

10 years agocleanup: put all tests within switch
Zdenek Kabelac [Mon, 28 Apr 2014 08:17:30 +0000 (10:17 +0200)]
cleanup: put all tests within switch

No reason to check for VALID in extra if.

10 years agolvscan: drop test for snapshosts
Zdenek Kabelac [Mon, 28 Apr 2014 09:58:26 +0000 (11:58 +0200)]
lvscan: drop test for snapshosts

When showing  ACTIVE status for snapshot's origin,
avoid testing all its snapshot - it's not useful
to tell user origin is inactivate, while it's clearly
available and running - just one of its snapshot leg
is invalid...

10 years agothin: move segment info display to correct code section
Zdenek Kabelac [Mon, 28 Apr 2014 09:56:07 +0000 (11:56 +0200)]
thin: move segment info display to correct code section

Relocate info from thin pool and thin volume segments
to proper code section for segments.
Add discards and thin count status info.

Info is shown with  'lvdisplay --maps' (like for other segments).

10 years agothin: display info when -tpool is running
Zdenek Kabelac [Mon, 28 Apr 2014 09:50:38 +0000 (11:50 +0200)]
thin: display info when -tpool is running

For percentage display we need -tpool - so check for layered
device presence here instead of plain pool device.
Also update 'info' - so when pool is 'available' we
display open count for -tpool device instead of mostly
irrelevant pool.
TODO: Maybe we should actually display this open info always?
(even when just -tpool is available, but pool is not)

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