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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Using hints with vgchange in the udev rule is not helpful because
repeated pvscans during startup are constantly invalidating hints.
Use -r with systemd-run so that the transient service used to
run vgchange remains visible and can be inspected.
(cherry picked from commit 7b87ffce2a5d635fb10bde3477847339b0ebb776)
'.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>
(cherry picked from commit 9421c3f38293b0fcb871e6db8f723a77b585a6ee)
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>
(cherry picked from commit 9ac24b6c66ad1074e1ed33c523a2d5ceb62e22a1)
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
(cherry picked from commit bebce91cb9d8dc6170b6432972f98f45c28714c5)
pvscan --cache <dev>
. read only dev
. create online file for dev
pvscan --listvg <dev>
. read only dev
. list VG using dev
pvscan --listlvs <dev>
. read only dev
. list VG using dev
. list LVs using dev
pvscan --cache --listvg [--checkcomplete] <dev>
. read only dev
. create online file for dev
. list VG using dev
. [check online files and report if VG is complete]
pvscan --cache --listlvs [--checkcomplete] <dev>
. read only dev
. create online file for dev
. list VG using dev
. list LVs using dev
. [check online files and report if VG is complete]
. [check online files and report if LVs are complete]
[--vgonline]
can be used with --checkcomplete, to enable use of a vg online
file. This results in only the first pvscan command to see
the complete VG to report 'VG complete', and others will report
'VG finished'. This allows the caller to easily run a single
activation of the VG.
[--udevoutput]
can be used with --cache --listvg --checkcomplete, to enable
an output mode that prints LVM_VG_NAME_COMPLETE='vgname' that
a udev rule can import, and prevents other output from the
command (other output causes udev to ignore the command.)
The list of complete LVs is meant to be passed to lvchange -aay,
or the complete VG used with vgchange -aay.
When --checkcomplete is used, lvm assumes that that the output
will be used to trigger event-based autoactivation, so the pvscan
does nothing if event_activation=0 and --checkcomplete is used.
Example of listlvs
------------------
$ lvs -a vg -olvname,devices
LV Devices
lv_a /dev/loop0(0)
lv_ab /dev/loop0(1),/dev/loop1(1)
lv_abc /dev/loop0(3),/dev/loop1(3),/dev/loop2(1)
lv_b /dev/loop1(0)
lv_c /dev/loop2(0)
$ pvscan --cache --listlvs --checkcomplete /dev/loop0
pvscan[35680] PV /dev/loop0 online, VG vg incomplete (need 2).
VG vg incomplete
LV vg/lv_a complete
LV vg/lv_ab incomplete
LV vg/lv_abc incomplete
$ pvscan --cache --listlvs --checkcomplete /dev/loop1
pvscan[35681] PV /dev/loop1 online, VG vg incomplete (need 1).
VG vg incomplete
LV vg/lv_b complete
LV vg/lv_ab complete
LV vg/lv_abc incomplete
$ pvscan --cache --listlvs --checkcomplete /dev/loop2
pvscan[35682] PV /dev/loop2 online, VG vg is complete.
VG vg complete
LV vg/lv_c complete
LV vg/lv_abc complete
Example of listvg
-----------------
$ pvscan --cache --listvg --checkcomplete /dev/loop0
pvscan[35684] PV /dev/loop0 online, VG vg incomplete (need 2).
VG vg incomplete
$ pvscan --cache --listvg --checkcomplete /dev/loop1
pvscan[35685] PV /dev/loop1 online, VG vg incomplete (need 1).
VG vg incomplete
$ pvscan --cache --listvg --checkcomplete /dev/loop2
pvscan[35686] PV /dev/loop2 online, VG vg is complete.
VG vg complete
(cherry picked from commit d6495e9bfc7d6a3bed2a2a1d187e220d4f4bbed3)
The new system_id_source="appmachineid" will cause
lvm to use an lvm-specific derivation of the machine-id,
instead of the machine-id directly. This is now
recommended in place of using machineid.
(cherry picked from commit 9f73ead7d42597cc8eb57fd0b63af050eece0718)
When merging 2 VG, where both of them have pmspare volume,
select the bigger one and remove the other.
(cherry picked from commit 9cbc9e8296752df35626a9b50de1cb551ff5e99e)
(cherry picked from commit 5b388f30fd2b1b960b1caa8c05dee712176985da)
When splitting VG with thin/cache pool volume, handle pmspare during
such split and allocate new pmspare in new VG or extend existing pmspare
there and eventually drop pmspare in original VG if is no longer needed
there.
(cherry picked from commit 2132fdc11f7bc285638765e001bef6a3e595b286)
Conflicts:
WHATS_NEW
(cherry picked from commit 03bbbd14f8433cfd2b8f7e3480e2fd4534241fcc)
As pmspare is an invisible LV it's not getting automatically removed
since vgremove removes only visible LVs and it depending LVs.
If there was no other thin/cache pool volume, such pmspare stayed
undeleted and caused command failure.
So handle explicitelly such forgotten pmspare and remove it.
(cherry picked from commit 5042463c5083cc71546297344058bd0fa523aa5c)
(cherry picked from commit bec864948785d145bcd19603cb3781d514eb00e8)
When check active componet of thinLV with external origin,
we need to check if the external origin isn't already active.
For this however we need to use layered check for -real device.
(cherry picked from commit d38fdb25e4debc035f1e4585432c2627460d5e50)
Conflicts:
WHATS_NEW
(cherry picked from commit f29ce593ec5c19296f50a1dbd1adbced1a1a53a7)
Add tool 'vdoimport' to support easy conversion of an existing VDO manager managed
VDO volumes into lvm2 managed VDO LV.
When physical converted volume is already a logical volume, conversion
happens with the VG itself, just with validation for extent_size, so
the virtually sized logical VDO volume size can be expressed in extents.
Example of basic simple usage:
vdoimport --name vg/vdolv /dev/mapper/vdophysicalvolume
(cherry picked from commit ed48cb26a31e8e5a12d82d96d8bec6bfc4d5b218)
Conflicts:
WHATS_NEW
(cherry picked from commit 864babf4c7c73ad03ebac450257f3d7ef93e9654)
Add profilable configurable setting for vdo pool header size, that is
used as 'extra' empty space at the front and end of vdo-pool device
to avoid having a disk in the system the may have same data is real
vdo LV.
For some conversion cases however we may need to allow using '0' header size.
TODO: in this case we may eventually avoid adding 'linear' mapping layer
in future - but this requires further modification over lvm code base.
(cherry picked from commit 2c6a2b6e86b57aeb96e93618193426ee129b00a6)
Conflicts:
tools/lvconvert.c
(cherry picked from commit 65e0829f34c8c7555dc94e5616700950646673fc)
Match rest of code.
(cherry picked from commit 5fcbc3bd7d3473f14e556508fff1b381431c59f0)
Conflicts:
tools/lvconvert.c
(cherry picked from commit a021aba6ef328c89975583489de785f35d0490f4)
Ignore the wwid value reported by scsi_debug devices
that begin "t10.Linux scsi_debug". The devname
will be used as the device id.
(cherry picked from commit 1139a05939f85bd86a756b451a8f194bc7a72a2c)
(cherry picked from commit 013303da9deb39c0518a9c8bdfb0237ef359747e)
When adding a device to the devices file with --adddev, lvm
by default chooses the best device ID type for the new device.
The new --deviceidtype option allows the user to override the
built in preference. This is useful if there's a problem with
the default type, or if a secondary type is preferrable.
If the specified deviceidtype does not produce a device ID,
then lvm falls back to the preference it would otherwise use.
(cherry picked from commit 440d6ae79fb4df92c7992d3c1689ba4f2d242d6a)
(cherry picked from commit de8d6238dfa4075ee0ed7f368dffff4b2cf648ad)
check for "(deleted)" in the backing_file string and
fall back to devname for id.
$ cat /sys/block/loop0/loop/backing_file
/root/looptmp (deleted)
(cherry picked from commit ca930bd936de2e7d4a83fa64add800baf6cfd116)
(cherry picked from commit e9227b4bcce72e97b0149e4a1775fcccb27605ff)
"lvconvert --thinpool LV" should allow LV to have a writecache,
but there was an extra type check preventing it.
(cherry picked from commit c35f7722d588009edad22d59c68c82150bb5c216)
(cherry picked from commit 118ba7161355132420296546711baf13d94fa36f)
The existing check didn't cover the unusual case where the
cachevol exists on the same device as the origin LV.
(cherry picked from commit e7f107c24666c8577f30e530b74f1ce0347e459b)
(cherry picked from commit f15472d5aacfa8f62500edf398bc9d368d64a33f)
converting an LV with a writecache to thin pool data in
addition to previous attaching writecache to thin pool data
(cherry picked from commit a65f8e0a62b9ab3c2fc909a63abfa0e933619a8c)
Commit 5bf1dba9eb8a8b77410e386e59dadeb27801b14e broke load of kvdo
kernel module - correct it by loading kvdo instead of trying dm-vdo.
(cherry picked from commit b725b5ea6ecfeef428fd7ffcd6855a38378d761b)
Conflicts:
WHATS_NEW
When the device is not a PV print
"No PV found on device ..."
instead of
"Failed to read lvm info for ... PVID ."
an earlier check had been added with a different
message for the same condition.
error reading dev and no pvid on dev were both
returning 0. make it easier for callers to
know which, if they care.
return 1 if the device could be read, regardless
of whether a pvid was found or not.
set has_pvid=1 if a pvid is found and 0 if no
pvid is found.
While we heavily try to spot arrays that are not yet in-sync,
some kernels tends to block our lvm2 command in kernel,
while we resume these smaller raid arrays even for 5 seconds.
But since the result is not really wrong - report these
check failures only as TEST WARNING.
Missed -l option in man page, although users should prefer
lvresize -r when the also want to do a volume management,
as there they can specify i.e. extents for allocation.
Also mention dm-crypt support in command description.