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

4166 Commits

Author SHA1 Message Date
Zdenek Kabelac
9cad26be32 WHATS_NEW: update 2019-11-11 22:44:25 +01:00
Zdenek Kabelac
569e328cc0 WHATS_NEW: update 2019-10-31 15:43:02 +01:00
Tony Asleson
8b3cf53e24 Experimental VDO lvmdbusd support 2019-10-30 10:55:06 -05:00
Zdenek Kabelac
6163b733e1 WHATS_NEW 2019-10-26 00:50:23 +02:00
Marian Csontos
c8b01f33a6 post-release 2019-10-23 09:51:55 +02:00
Marian Csontos
b9391b1b9f pre-release 2019-10-23 09:51:55 +02:00
Marian Csontos
3e01ff2783 dm: fix compilation of dmsetup
Fix: 889c88e9da
Use correct enum DM_DEVICE_GET_TARGET_VERSION.
2019-10-22 13:39:45 +02:00
Zdenek Kabelac
dd7629ea09 cache: use _cpool for used cache-pools
When LV gets cached and uses cache-pool - such cache-pool
will now get _cpool suffix automatically.

Thus 'Pool' column for cached LV will now show either _cvol
or _cpool LV.
2019-10-21 15:31:33 +02:00
Zdenek Kabelac
2a08d6d1d4 cachevol: use CVOL UUID for cdata and cmeta layered devices
Since code is using -cdata and -cmeta UUID suffixes, it does not need
any new 'extra' ID to be generated and stored in metadata.

Since introduce of new 'segtype' cache+CACHE_USES_CACHEVOL we can
safely assume 'new' cache with cachevol will now be created
without extra metadata_id and data_id in metadata.

For backward compatibility, code still reads them in case older
version of metadata have them - so it still should be able
to activate such volumes.

Bonus is lowered size of lv structure used to store info about LV
(noticable with big volume groups).
2019-10-17 13:03:49 +02:00
Zdenek Kabelac
2825ad9dd2 cachevol: improve manipulation with dm tree
Enhance activation of cached devices using cachevol.
Correctly instatiace  cachevol -cdata & -cmeta devices with
'-' in name (as they are only layered devices).
Code is also a bit more compacted (although still not ideal,
as the usage of extra UUIDs stored in metadata is troublesome
and will be repaired later).

NOTE: this patch my brink potentially minor incompatiblity for 'runtime' upgrade
2019-10-14 15:17:50 +02:00
Zdenek Kabelac
a454a1b4ea cachevol: put _cvol as protected suffix.
This revert "drop cvol dm uuid suffix for cachevol LVs"
commit 5191057d9d.
Start using -cvol for  DM UUID.
2019-10-14 15:16:05 +02:00
Zdenek Kabelac
8a8e6ebba2 cachevol: rename converted LV to _cvol
When converting existing public LV to internally used
'CacheVol' LV - rename LV to LV_cvol.

When splitting CacheVol, remove _cvol suffix.
2019-10-14 15:15:12 +02:00
Zdenek Kabelac
f6d171ffe3 cachevol: wipe 'normal' device
For wiping we activate and clear 'regular' devices,
since in case of whole process interuption (i.e. kill -9)
we leave metadata & DM table and workable state all the time.
2019-10-14 15:14:46 +02:00
Zdenek Kabelac
36944e1009 cache: reload only when switched to cleaner policy
Reload cache target only when lvm2 reload table with
cache with clearer policy.
2019-10-14 15:14:22 +02:00
Zdenek Kabelac
76a9a86fd3 lvconvert: fix return value when zeroing fails
Use correct error return code for fail path.
2019-10-14 15:13:33 +02:00
Zdenek Kabelac
414f903cdc WHATS_NEW: update 2019-10-04 17:31:55 +02:00
Zdenek Kabelac
6612d8dd5e vdo: enhance activation with layer -vpool
Enhance 'activation' experience for VDO pool to more closely match
what happens for thin-pools where we do use a 'fake' LV to keep pool
running even when no thinLVs are active. This gives user a choice
whether he want to keep thin-pool running (wihout possibly lenghty
activation/deactivation process)

As we do plan to support multple VDO LVs to be mapped into a single VDO,
we want to give user same experience and 'use-patter' as with thin-pools.

This patch gives option to activate VDO pool only without activating
VDO LV.

Also due to 'fake' layering LV we can protect usage of VDO pool from
command like 'mkfs' which do require exlusive access to the volume,
which is no longer possible.

Note: VDO pool contains 1024 initial sectors as 'empty' header - such
header is also exposed in layered LV (as read-only LV).
For blkid we are indentified as LV with UUID suffix - thus private DM
device of lvm2 - so we do not need to store any extra info in this
header space (aka zero is good enough).
2019-09-17 13:17:19 +02:00
Zdenek Kabelac
66f69e766e thin: activate layer pool aas read-only LV
When lvm2 is activating layered pool LV (to basically keep pool opened,
the other function used to be 'locking' be in sync with DM table)
use this LV in read-only mode - this prevents 'write' access into
data volume content of thin-pool.

Note: since EMPTY/unused thin-pool is created as 'public LV' for generic
use by any user who i.e. wish to maintain thin-pool and thins himself.
At this moment, thin-pool appears as writable LV.  As soon as the 1st.
thinLV is created, layer volume will appear is 'read-only' LV from this moment.
2019-09-17 13:16:50 +02:00
Zdenek Kabelac
693215716b devices: crypto skip
Devices with UUID signature CRYPT-SUBDEV are internal crypto devices.
2019-09-17 13:15:22 +02:00
Zdenek Kabelac
7612c21f55 lvconvert: improve validation thin and cache pool conversion
Limit convertible LVs to thin-pool and cache-pools.
Also fix return code on  interal error path to return ECMD_FAILED.
2019-09-17 13:13:49 +02:00
Zdenek Kabelac
c98e34e4d0 cache: improve vgremove loop
Support internal removal of 'cache origin' volume - which we
do not normally expose to a user - however internal processing
loops may hit this condition (depending on order of list LVs).

So when this operation is internally requested - we automatically
try to remove it's 'holding' LV (cache LV) - which will also
remove the origin.
2019-08-26 15:32:12 +02:00
Zdenek Kabelac
30a98e4d67 activation: add synchronization point
Resuming of 'error' table entry followed with it's dirrect removal
is now troublesame with latest udev as it may skip processing of
udev rules for already 'dropped' device nodes.

As we cannot 'synchronize' with udev while we know we have devices
in suspended state - rework 'cleanup' so it collects nodes
for removal into pending_delete list and process the list with
synchronization once we are without any suspended nodes.
2019-08-20 12:46:11 +02:00
Zdenek Kabelac
0bdd6d6240 pvmove: add missing synchronization
Between 'resume' and 'remove' we need to wait for udev to synchronize,
otherwise udev may 'skip' resume event processing if the udev node
is already gone.
2019-08-20 12:44:39 +02:00
Zdenek Kabelac
0451225c19 pvmove: correcting read_ahead setting
When pvmove is finished, we do a tricky operation since we try to
resume multiple different device that were all joined into 1 big tree.

Currently we use the infromation from existing live DM table,
where we can get list of all holders of pvmove device.
We look for these nodes (by uuid) in new metadata, and we do now a full
regular device add into dm tree structure.  All devices should be
already PRELOAD with correct table before entering suspend state,
however for correctly working readahead we need to put correct info
also into RESUME tree.  Since table are preloaded, the same table
is skip and resume, but correct read ahead is now set.
2019-08-20 12:37:32 +02:00
Peter Rajnoha
125f27ac37 udev: remove unsupported OPTIONS+="event_timeout" rule
The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
that is ~5 years ago.

Since systemd/udev version 243, there's a new message printed if unsupported
OPTIONS value is used:

  Invalid value for OPTIONS key, ignoring: 'event_timeout=180'

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
2019-08-13 15:18:30 +02:00
David Teigland
3a0d493d91 WHATS_NEW: vgcreate/vgextend logical block size 2019-08-01 10:15:27 -05:00
David Teigland
c1996c78c1 WHATS_NEW: fix large physical block size 2019-07-30 16:14:28 -05:00
Marian Csontos
1d1741b23a post-release 2019-06-15 09:23:03 +02:00
Marian Csontos
60bd9e8406 pre-release 2019-06-15 09:21:47 +02:00
David Teigland
a4dbbefaff WHATS_NEW for recent changes 2019-06-13 17:44:14 -05:00
Marian Csontos
dbc5543cbb post-release 2019-06-10 17:04:30 +02:00
Marian Csontos
f1b4aeba66 pre-release 2019-06-10 16:59:49 +02:00
Marian Csontos
4d11bf8d50 post-release 2019-06-07 17:24:51 +02:00
Marian Csontos
cb6277aa8a pre-release 2019-06-07 17:24:51 +02:00
Zdenek Kabelac
e3c4ab0cc7 cache: support no_discard_passdown
Recent kernel version from kernel commit:
de7180ff908b2bc0342e832dbdaa9a5f1ecaa33a
started to report in cache status line new flag:
no_discard_passdown

Whenever lvm spots unknown status it reports:
Unknown feature in status:

So add reconginzing this feature flag and also report this with

'lvs -o+kernel_discards'

When no_discard_passdown is found in status 'nopassdown' gets reported
for this field  (roughly matching what we report for thin-pools).
2019-06-05 15:48:41 +02:00
David Teigland
ef2d61fea8 WHATS_NEW: pvck --dump 2019-05-23 11:50:16 -05:00
Zdenek Kabelac
44cfa55843 libdaemon: use pselect to avoid condition checking race
To avoid tiny race on checking arrival of signal and entering select
(that can latter remain stuck as signal was already delivered) switch
to use  pselect().

If it would needed, we can eventually add extra code for older systems
without pselect(), but there are probably no such ancient systems in
use.
2019-04-16 12:18:34 +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
David Teigland
344a9e9afd WHATS_NEW: add several recent changes 2019-04-08 10:56:43 -05:00
Zdenek Kabelac
fcec6691f0 thin: fix maintenance of _pmspare
When metadata grows lvm2 may need to extend also _pmspare volume.
2019-04-03 13:28:54 +02:00
Zdenek Kabelac
e27d027155 thin: resize metadata with data
When data are growing, adapt also size of metadata.
As we get way too many reports from users doing huge growths of
data portion while keep metadata small and avoiding using monitoring.

So to enhance the user-experience in case user requests grown of
thin-pool (without passing PV list for growth) - lvm2 will automaticaly
grown also the metadata part of thin-pool (if possible).
2019-04-03 13:28:22 +02:00
Zdenek Kabelac
4411fe2ba8 activation: synchronize before removing devices
Udev is running udev-rule action upon 'resume'.

However lvm2 in special case is doing replacement of
'soon-to-be-removed' device with 'error' target for resuming
and then follows actual removal - the sequence is usually quick,
so when udev start action - it can result in 'strange' error
message in kernel log like:

Process '/usr/sbin/dmsetup info -j 253 -m 17 -c --nameprefixes --noheadings --rows -o name,uuid,suspended' failed with exit code 1.

To avoid this - we need to ensure there is synchronization wait for udev
between 'resume'  and 'remove' part of this process.

However existing code put strict requirement to avoid synchronizing with
udev inside critical section - but this originally came from requirement
to not do anything special while there could be devices in
suspend-state. Now we are able to see differnce between critical section
with or without suspended devices.  For udev synchronization only
suspended devices are prohibited to be there - so slightly relax
condition and allow calling and using 'fs_sync()' even inside critical
section - but there must not be any suspended device.
2019-03-20 14:39:09 +01:00
Zdenek Kabelac
677aa84be3 vdo: enable caching for vdopool LV and vdo LV
Allow using caching with VDO.
User can either cache a single vdopool or
a vdo LV - difference when the caching is put-in depends on a use-case
and it's upto user to decide which kind of speed is expected.
2019-03-20 14:38:31 +01:00
Zdenek Kabelac
030c39073e cache: support vgsplit
Enable vgsplit to work with VG containing cached LVs.
2019-03-20 14:38:02 +01:00
Zdenek Kabelac
dc6dea4033 filter: enhance mpath detection
Internal detection of SCSI device being in-use by DM mpath has been
performed several times for each component device - this could be
eventually racy - so instead when we do remember  1st. checked result
for device being mpath and use it consistenly over the filter runtime.
2019-03-20 14:37:42 +01:00
Zdenek Kabelac
1eeb2fa3f6 dev_manager: add dev_manager_remove_dm_major_minor
Move DM usage into dev_manager.c source file.
Also convert STATUS to INFO ioctl - as that's enough
to obtain UUID - this also avoid issuing unwanted flush on checked DM
device for being mpath.
2019-03-20 14:37:10 +01:00
David Teigland
07483cc165 WHATS_NEW: io_memory_size 2019-03-04 12:22:49 -06:00
David Teigland
eff33684f7 WHATS_NEW: concurrent pvscan autoactivation 2019-02-21 15:31:23 -06:00
David Teigland
71a302effe WHATS_NEW: scan_lvs default change 2019-02-20 14:04:49 -06:00
Zdenek Kabelac
78dd9d820d thin: select chunk size as power of 2
Whenever thin-pool chunk size is unspecified and left for lvm calculation
try to select the size as nearest highest power-of-2 instead of
just being a multiple of 64KiB.
2019-01-28 22:17:25 +01:00