1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

431 Commits

Author SHA1 Message Date
Zdenek Kabelac
39eee85fff makefiles: better logging
Show only filename instead of full path name when building
in builddir != srcdir
2021-03-02 22:54:40 +01:00
Zdenek Kabelac
646e3280dd fsadm: avoid access to unbound variable 2021-02-23 14:56:47 +01:00
Zdenek Kabelac
47608ff49b fsadm: fix unbound variable usage
When 'fsadm resize vg/lv' is used without size, it should just
resize filesystem to match device - but since we now check
for unbound variable in bash - the previous usage no longer
works and needs explicit check.
2020-12-08 20:32:34 +01:00
Zdenek Kabelac
b033384135 fsadm: better check for getsize64 support
Older blockdev tool return failure error code with --help,
and since now the tool abort on command failure, lets
detect missing --getsize64 support directly by running
command and check if it returns something usable.

It's likely very hard to have the system with
such old blockdev tool and newer lvm2 compiled.
2020-10-26 13:06:52 +01:00
Zdenek Kabelac
8c2779ba34 fsadm: enhance error handling
Set more secure bash failure mode for pipilines.
Avoid using unset variables.
Enhnace error reporting for failing command.
Avoid using error via 'case..esac || error'.
2020-10-24 01:42:16 +02:00
Zdenek Kabelac
51a532719c fsadm: handle fsck return 1 for corrected fs 2020-10-24 01:42:16 +02:00
Zdenek Kabelac
73ef86ae3f fsadm: use NULL
Use consistently $NULL as in other places.
2020-10-24 01:42:16 +02:00
Peter Rajnoha
8806f2d5ed blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo 2020-06-08 15:41:35 +02:00
Maxim Plotnikov
a509776588 Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait
The --lock-opt autowait was dropped back in 9ab6bdce01,
and attempting to specify it has quite an opposite effect:
no waiting is done, which makes the unit almost useless.
2020-04-21 16:52:45 -05:00
Peter Rajnoha
0dd905c959 blkdeactivate: add support for VDO in blkdeactivate script
Make it possible to tear down VDO volumes with blkdeactivate if VDO is
part of a device stack (and if VDO binary is installed). Also, support
optional -o|--vdooptions configfile=file.
2020-04-09 15:29:29 +02:00
Peter Rajnoha
25f231cf06 systemd: put back DefaultDependencies=no for lvmpolld socket unit
Previous commit 0cab341e1d removed this
by mistake - we have to keep the DefaultDependencies=no - the
sockets.target is after sysinit.target.
2019-04-11 12:18:02 +02:00
Peter Rajnoha
0cab341e1d systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering
We already used Conflicts=shutdown target to stop LVM2 services on shutdown.
But we still missed the ordering - the shutdown.target should be reached
only after all the services are really stopped.

Reported here: https://github.com/lvmteam/lvm2/issues/17
2019-04-09 12:24:37 +02:00
Zdenek Kabelac
da31541bd8 gitignore: update 2019-03-20 14:35:09 +01:00
David Teigland
ce79b62bc2 pvscan service: use StartLimitIntervalSec
systemd changed the name
2019-02-28 08:50:37 -06:00
Zdenek Kabelac
fdd612b824 generators: avoid contacting syslog with generators
The systemd generators are executed very early during the switch
from initramfs to system partition and the syslog is not yet fully
operational - it may cause blocking, if some debug logging is enabled
at the same time in /etc/lvm/lvm.conf log{} section.

To avoid timeouting and killing this generator - rather enhance lvm
code to suppress any syslog communication when LVM_SUPPRESS_SYSLOG
envvar is set.

Use of this envvar is needed since the parsing of i.e. cmdline options
that could eventually override lvm.conf setting happens in this case
way too late and number of lines could have been already streamed to
syslog.
2019-01-08 13:13:54 +01:00
Peter Rajnoha
6298eaeca5 scripts: lvm2-activation-generator fix lvmconfig call
Fix a scenario where global/event_activation setting is not found. In
this case we need to take default value just like lvm tools do when
executed. So use "lvmconfig --type full".

Also, if we fail to execute lvmconfig for whatever reason, fallback to
generating the activation units as failsafe action.

Reported by: Bastian Blank <waldi debian org>
2019-01-08 13:11:46 +01:00
Zdenek Kabelac
9830aa207c cleanup: missing copyright header 2018-12-21 21:42:30 +01:00
Zdenek Kabelac
0161ebe484 scripts: simplify including for generator
Uses included .c file as primary header includer.
2018-12-21 21:42:30 +01:00
Zdenek Kabelac
a4577c427a scripts: avoid voiding write result
Gcc doesn't want to ignore write() return code.
2018-12-21 21:42:30 +01:00
Zdenek Kabelac
94237354dd makefiles: correcting login of makefile
Fixing some ordering issue with inclusion of common make.tmpl.
Correcting dependency calculation
Simplifying inclusive makefile
2018-12-17 10:55:20 +01:00
Zdenek Kabelac
a665206453 makefiles: missing cleaning 2018-12-17 10:36:52 +01:00
Zdenek Kabelac
f619cac598 makefiles: quite install 2018-12-17 10:36:52 +01:00
Zdenek Kabelac
ceb2f0ad3b makefiles: updates for less verbosity 2018-11-29 23:05:43 +01:00
David Teigland
2d1152103f blk_availability service drop lvmetad 2018-11-26 14:51:32 -06:00
David Teigland
4b5d6de86b pvscan systemd service for event based activation
The pvscan systemd service for autoactivation was
mistakenly dropped along with the lvmetad related
services.

The activation generator program now looks at the new
lvm.conf setting "event_activation" (default 1) to
switch between event activation and direct activation.

Previously, the old use_lvmetad setting was used to
switch between event and direct activation.
2018-11-26 14:33:31 -06:00
David Teigland
d44bfe90f1 scripts: remove lvmetad from makefile 2018-11-15 09:25:55 -06:00
David Teigland
df2fa88e63 lvm2-monitoring service shouldn't refer to lvmetad 2018-11-15 09:20:47 -06:00
Zdenek Kabelac
bc1976011a cov: explicit ignore if failures
Here we can't do anything better than just ignore syscall failures
(with silence as there is no loging mechanism)
2018-11-03 16:09:36 +01:00
David Teigland
19a59cc53c More cleanup needed for dropped scripts
and drop the lvm2 prefix from lvmlockd service
2018-09-13 11:09:25 -05:00
David Teigland
e9b6cdd6e6 add lvmlocks service to start and stop lockspaces 2018-09-13 10:50:50 -05:00
David Teigland
81ca0cb161 Remove init scripts related to clvm and lvmetad 2018-09-13 10:08:03 -05:00
David Teigland
297f6d5122 lvmlockd: improve systemd service file
use notify type so the daemon is ready
immediately after start.
2018-09-13 09:52:39 -05:00
Peter Rajnoha
03ed2aae3a scripts: lvm2-activation-generator: also log possible execv error 2018-08-30 13:14:10 +02:00
Peter Rajnoha
3d5c4847b6 scripts: lvm2-activation-generator: add prefix for all kmsg messages
Add "lvm2-activation-generator: " prefix for all kmsg messages written by
lvm2-activation-generator so we can identify the message in global system log.
2018-08-30 13:14:10 +02:00
Peter Rajnoha
cb17ef221b scripts: add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service
We need to have Ceph RBD devices mapped first before use in a stack
where LVM is on top so make sure rbdmap.service is called before
generated lvm2-activation-net.service.

On shutdown, we need to stop blk-availability first before we stop the
rbdmap.service.

Resolves: rhbz1623479
2018-08-30 12:35:58 +02:00
Zdenek Kabelac
b55d30956d build: drop some more old files 2018-07-02 10:21:42 +02:00
David Teigland
428514a07f Drop --ignoreskippedcluster option
It's no longer needed.  Clustered VGs are now handled in
the same way as foreign VGs, and as shared VGs that
can't be accessed:

- A command processing all VGs sees a clustered VG,
  prints a message ("Skipping clustered VG foo."),
  skips it, and does not fail.

- A command where the clustered VG is explicitly
  named on the command line, prints a message and fails.
  "Cannot access clustered VG foo, see lvmlockd(8)."

The option is listed in the set of ignored options for
the commands that previously accepted it.  (Removing it
entirely would cause commands/scripts to fail if they
set it.)
2018-06-15 15:59:34 -05:00
Zdenek Kabelac
7d8bd97187 scripts: clvmd gone 2018-06-15 00:46:24 +02:00
Zdenek Kabelac
b58160a191 systemd: add conficting sockets
Since we are using "DefaultDependencies=no" we do not get automatic STOP
job on socket connection - so automatically refuse connection on
shutdown by adding this Conflict definition to socket Unit.
2018-06-14 22:02:01 +02:00
David Teigland
9b79f0244a Remove makefile entries for removed script 2018-06-13 15:04:26 -05:00
David Teigland
fa00fce97c Remove systemd script for starting shared VG
Shared VGs will generally be started and activated by
the resource agent.  Without the agent, this script doesn't
have a good way to know which LVs to activate.
2018-06-13 14:37:16 -05:00
Joe Thornber
286c1ba336 device_mapper: rename libdevmapper.h -> all.h
I'm paranoid a file will include the global one in /usr/include
by accident.
2018-06-08 12:31:45 +01:00
Joe Thornber
bd8c6cf862 scripts/lvm2_activation_generator_systemd_red_hat: rewrite to use lvmconfig
Unit tested the new code, but not run functional tests (assuming they exist).
2018-06-07 16:15:04 +01:00
Joe Thornber
232918fb86 build: libbase.a 2018-06-04 13:53:07 +01:00
Joe Thornber
21a5be2364 build: link lvm2_activation_generator_systemd_red_hat with libdevice-mapper.a 2018-06-04 10:00:44 +01:00
Joe Thornber
dbba1e9b93 Merge branch 'master' into 2018-05-11-fork-libdm 2018-06-01 13:04:12 +01:00
Joe Thornber
3417d6229d scripts/code-stats.rb: count files better, handle bad utf8 2018-05-17 09:52:13 +01:00
Joe Thornber
64dd656ef7 scripts: add a little scripts to show git history for the last 2 weeks. 2018-05-16 15:27:52 +01:00
Joe Thornber
ccc35e2647 device-mapper: Fork libdm internally.
The device-mapper directory now holds a copy of libdm source.  At
the moment this code is identical to libdm.  Over time code will
migrate out to appropriate places (see doc/refactoring.txt).

The libdm directory still exists, and contains the source for the
libdevmapper shared library, which we will continue to ship (though
not neccessarily update).

All code using libdm should now use the version in device-mapper.
2018-05-16 13:00:50 +01:00
Joe Thornber
7f97c7ea9a build: Don't generate symlinks in include/ dir
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
2018-05-14 10:30:20 +01:00