IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
New systemd services for startup:
lvm-devices-wait.service
Used in place of systemd-udev-settle, this service waits
for udev+pvscan to process PVs listed in system.devices.
It runs the command "lvmdevices --wait pvsonline".
This only waits for PVs that can be matched to a device in
sysfs, so it only waits for devices attached to the system.
It waits specifically for the /run/lvm/pvs_online/<pvid>
files to be created by pvscan. It quits waiting after a
configurable number of seconds. This service gives the
first activation service a chance to activate VGs from
PVs that are available immediately at startup. If this
service quits waiting before all the expected pvid files
appear, then the VG associated with those PVs will most
likely be activated by the -last service rather than the
initial -main service. If those PVs are even slower to
complete processing than the -last service, then the VG
will be activated by event activation whenever they are
finally complete.
lvm-activate-vgs-main.service
Calls "vgchange -aay", after lvm-devices-wait, to activate
complete VGs. It only considers PVs that have been
processed by udev+pvscan and have pvs_online files.
This is expected to activate VGs from basic devices
(not virtual device types) that are present at startup.
lvm-activate-vgs-last.service
Calls "vgchange -aay", after multipathd has started, to
activate VGs that became available after virtual device
services were started, e.g. VGs on multipath devices.
Like -main, it only looks at PVs that have been processed
by pvscan.
This vgchange in the -last service enables event activation
by creating the /run/lvm/event-activation-on file. Event
activation will activate any further VGs that appear on the
system (or complete udev processing) after the -last service.
In the case of event activation, the udev rule will run
vgchange -aay <vgname> via a transient service
lvm-activate-<vgname>.service. This vgchange only scans
PVs in the VG being activated, also based on the pvs_online
files from pvscan.
When there are many VGs that need activation during system
startup, the two fixed services can activate them all much
faster than activating each VG individually via events.
lvm.conf auto_activation_settings can be used to configure
the behavior (default ["service_and_event", "pvscan_hints"]).
"service_and_event" - the behavior described above, where
activation services are used first, and event activation
is used afterward.
"service_only" - only lvm-activate-vgs-* are used, and
no event-based activation occurs after the services finish.
(Equivalent to setting lvm.conf event_activation=0.)
"event_only" - the lvm-activate-vgs* services are skipped,
and all VGs are activated individually with event-based
activation.
"pvscan_hints" - the vgchange autoactivation commands
use pvs_online files created by pvscan. This optimization
limits the devices scanned by the vgchange command to only
PVs that have been processed by pvscan.
A new form of hints to use in autoactivation commands
during startup to reduce device scanning. Using these
hints, vgchange will read only the devices for the VG
it is activating.
Standard hints allow a command with a named VG arg to scan
only the PVs in the named VG, rather than scanning all
available PVs. Standard hints are useful with a stable set
of system devices. When new devices are arriving, as occurs
during system startup, the hints are repeatedly invalidated,
which makes standard hints unhelpful while devices are
regularly appearing. This is the situation in which
vgchange -aay is used, so standard hints are not generally
helpful for autoactivation.
In the context of system startup, pvscan --cache is keeping
track of available PVs using the pvs_online files, similar
to what the hints file does for a running system. Given this,
a new hint mode, hints = "pvs_online", is added which derives
an equivalent to standard hints, based on pvs_online files
that are being created by udev-run pvscans. This hint mode
is useful while devices are appearing, e.g. during system
startup, and vgchange -aay can benefit from it.
pvscan --cache -aay autoactivation already has a similar
optimization (the "quick" activation case) that is based
on the pvs_online file, but it is not implemented as a
form of hints.
This new form of hints is mainly useful in the context of
event based autoactivation, during which standard hints are
not useful. Once the system is in a steady state after startup
(devices are not regularly appearing), the standard hints are
most useful. The pvs_online hint method could be used on a
running system, but would be no better than standard hints,
and may be inferior because pvs_online files are not rigidly
updated after system startup.
Help bootstrapping existing shared vgs into the devices file.
Reading the vg in vgimportdevices would require locking to be
started, but vgchange lockstart won't see the vg if it's not
in the devices file. The lvmlockd locks are not protecting
vg modifications so skipping them here won't be a problem.
As we are not using 'enable-compat' for anything, remove this section.
Also remove duplicated check for blkid.
Move setting of some AC_ARG_ENABLE defaults into the macro so it's always
defined.
When scanning configured /dev dir, avoid entring
directories with different filesystem.
This minimizes risk we will block on i.e. entring
directory with mount point.
Enhance logic for checking supported systemd version,
while doing only a single check for systemd package.
For version checking use PKG_CHECK_EXISTS() macro.
Also use one pkg check for blkid.
Avoid checking version for thin/cache_check when tools are not present
on system.
Resolve event_activation configure option just once.
Do not print debug_devs about 'bad' filtering, when
actually filter already printed reason for skipping
Do not trace more then once about backup being disabled.
No debug when unlinked file does not exists in pvscan.
Handle automatically new setttings
--disable-systemd-journal
--disable-appmachineid
Both setting will check presence of apropriate header files.
In case they are present, build will try to automatically build with
them (adding systemd dependency)
User can anytime disabled them and drop systemd dependency.
Also add --with-default-use-devices-file configure option to
select automatically default value for this option.
For this moment keep default upstream as 0
Reporting non-PVs / "all devices" is only done by
pvs -a or pvdisplay -a, so avoid the work managing
a list of all devices in process_each_pv.
In the case when it's needed, use the results of
label_scan which already determines which devs
are not PVs.
Just setting lvm.conf level=N should not send messages to
syslog (now the journal by default.)
Sending messages to syslog should require setting lvm.conf
log { syslog=1 level=N }.
'.ID_FS_TYPE_NEW' is a custom property added by an LVM UDev rule
which is now being removed and 'ID_FS_TYPE' has the same value.
Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
new udev rule 69-dm-lvm.rules replaces
69-dm-lvm-meta.rules and lvm2-pvscan.service
udev rule calls pvscan directly on the added device
pvscan output indicates if a complete VG can be activated
udev env var LVM_VG_NAME_COMPLETE is used to pass complete
VG name from pvscan to the udev rule
udev rule uses systemd-run to run vgchange -aay <vgname>
Configure via lvm.conf log/journal or command line --journal.
Possible values:
"command" records command information.
"output" records default command output.
"debug" records full command debugging.
Multiple values can be set in lvm.conf as an array.
One value can be set in --journal which is added to
values set in lvm.conf