summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* writecache: enable use with thin pool datadev-dct-writecache-thinDavid Teigland2020-10-282-1/+199
| | | | | | | | | | . it's of little use since the thin pool cannot be extended while it's using writecache. . lvconvert --splitcache on tdata isn't working, the writecache table doesn't get updated with the cleaner setting. . adding writecache to existing tdata not yet implemented
* tests: revert lvm shell use in pvck-dumpDavid Teigland2020-10-271-1/+1
| | | | doesn't work on my machine
* pvck: fix dev filteringDavid Teigland2020-10-271-10/+21
| | | | | | | filters needing io weren't being run because bcache wasn't set up. Read the first 4k of the device before doing filtering or reading ondisk structs to reduce reads.
* pvck: handle first mda at non-4096 offsetDavid Teigland2020-10-271-5/+6
| | | | | | | | | It's possible for a machine with a non-4k page size to create a PV with an mda_header at an offset other than 4k. Fix pvck --dump to work with these other mda offsets. pvck --repair will write a new first mda at 4096 but lvm with other page sizes will work with this.
* writecache: disallow partial or degraded activationDavid Teigland2020-10-262-0/+37
| | | | when either main or fast lvs are incomplete
* lvchange: allow syncaction check with integrityDavid Teigland2020-10-262-13/+146
| | | | syncaction check will detect and correct integrity checksum mismatches.
* pvcreate: clean up opening and filtering of argsDavid Teigland2020-10-264-39/+120
| | | | | | | | | | | | | | | | | | | | | | | | | The args for pvcreate/pvremove (and vgcreate/vgextend when applicable) were not efficiently opened, scanned, and filtered. This change reorganizes the opening and filtering in the following steps: - label scan and filter all devs . open ro . standard label scan at the start of command - label scan and filter dev args . open ro . uses full md component check . typically the first scan and filter of pvcreate devs - close and reopen dev args . open rw and excl - repeat label scan and filter dev args . using reopened rw excl fd - wipe and write new headers . using reopened rw excl fd
* gcc: cleanup warns from older gccZdenek Kabelac2020-10-262-3/+3
|
* tests: minor updateZdenek Kabelac2020-10-261-2/+2
|
* fsadm: better check for getsize64 supportZdenek Kabelac2020-10-261-8/+5
| | | | | | | | | | 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.
* WHATS_NEW: updateZdenek Kabelac2020-10-241-0/+2
|
* man: regenerateZdenek Kabelac2020-10-2443-129/+86
|
* man: more precise UNITZdenek Kabelac2020-10-241-3/+2
| | | | | | | | Since 'kilobytes' could be seen in 2 way - SI as '1000', while all programmers sees it as '1024' - switch to commonly acceptted KiB, MiB.... Resolves RHBZ 1496255.
* lv_manip: add space into messageZdenek Kabelac2020-10-241-1/+1
| | | | Just add space between %s(.
* tests: fsadm test continue after fs repairZdenek Kabelac2020-10-241-1/+26
| | | | | | Test case where filesystem has been corrected via fsck. In such case fsck returns '1' as success and should be handled in a same way as '0' since fs is correct.
* fsadm: enhance error handlingZdenek Kabelac2020-10-241-19/+28
| | | | | | | 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'.
* fsadm: handle fsck return 1 for corrected fsZdenek Kabelac2020-10-241-7/+18
|
* fsadm: use NULLZdenek Kabelac2020-10-241-10/+10
| | | | Use consistently $NULL as in other places.
* get dev size when setting pv deviceDavid Teigland2020-10-221-2/+6
| | | | | | In some cases the dev size may not have been read yet in set_pv_devices(). In this case get the dev size before comparing the dev size with the pv size.
* pvscan: rework to improve PVs without metadataDavid Teigland2020-10-224-618/+733
| | | | | | | | | | | | | | | Restructure the pvscan code, and add new temporary files that list pvids in a VG, used for processing PVs that have no metadata. The new temp files, in /run/lvm/pvs_lookup/<vgname>, allow a proper pvscan --cache to be done on PVs that have no metadata. pvscan --cache <dev> is only supposed to read <dev>, but when <dev> has no metadata, this had not been possible. The command had to fall back to scanning all devices to read all VG metadata to get the list of all PVIDs needed to check for a complete VG. Now, the temp file can be used in place of reading metadata from all PVs on the system.
* add label_scan_devs_cachedDavid Teigland2020-10-212-0/+16
| | | | | | label_scan_devs without invalidating data first for cases where the caller wants to use any bcache data they have already read.
* add label_read_pvidDavid Teigland2020-10-212-0/+49
| | | | | | | To read the lvm headers and set dev->pvid if the device is a PV. Difference from label_scan_ functions is this does not read any vg metadata or add any info to lvmcache.
* lvmcache: rename label_read label_scan_devDavid Teigland2020-10-214-6/+5
| | | | for consistent naming with other similar functions
* lvmcache: add lvmcache_get_dev_mdaDavid Teigland2020-10-212-0/+17
| | | | for future patch
* scanning: improve filtering controlDavid Teigland2020-10-211-48/+70
| | | | | | | | | | | | | | | | | | | | | Filtering in label_scan was controlled indirectly by the fact that bcache was not yet set up when label_scan first ran. The result is that filters that needed data would not run and would return -EAGAIN, which would result in the dev flag FILTER_AFTER_SCAN being set. After the dev header was read for checking the label, filters would be rechecked because of FILTER_AFTER_SCAN. All filters would be checked this time because bcache was now set up, and the filters needing data would largely use data already scanned for reading the label. This design worked but is hard to adjust for future cases where bcache is already set up. Replace this method (based on setting up bcache, or not) with a new cmd flag filter_nodata_only. When this flag is set filters that need data will not run. This allows the same label_scan behavior when bcache has been set up. There are no expected changes in behavior.
* filters: nodata optionDavid Teigland2020-10-215-0/+16
| | | | | When filter_nodata_only is set, a filter that uses data is skipped.
* filters: allow filter wipe for one deviceDavid Teigland2020-10-213-6/+15
| | | | as passes_filter already does
* tests: writecache-misc disable with lvmlockdDavid Teigland2020-10-211-1/+2
| | | | in a shared vg pvmove requires a named lv
* tests: check dmevent with bigger reserved_stackZdenek Kabelac2020-10-201-3/+6
| | | | | Check dmeventd remains working when reserved_stack is above 300KiB.
* memlock: allocate at most halve of rlimit stackZdenek Kabelac2020-10-201-4/+7
| | | | | | Touch of stack allocation validated given size with rlimit and if the reserved_stack was above rlimit, its been completely ignored - now we will always touch stack upto rlimit/2 size.
* lvmcmdlib: lvm2_init_threadedZdenek Kabelac2020-10-207-10/+28
| | | | | | | | | | | | | cmd context has 'threaded' value that used be set by clvmd - and allowed proper memory locking management. Reuse same bit for dmeventd. Since dmeventd is using 300KiB stack per thread, we will ignore any user settings for allocation/reserved_stack until some better solution is find. This avoids crashing of dmevend when user changes this value and because in most cases lvm2 should work ok with 64K stack size, this change should not cause any problems.
* libdm: relocate code for sending messagesZdenek Kabelac2020-10-191-11/+11
| | | | | | To be able to send messages for recently resumed devices, move code into inner loop. Matching commit c1a6b10d09aae6179e4f08c7d8c03d5e3068ad94.
* cov: split check for type assignmentZdenek Kabelac2020-10-191-4/+5
| | | | | | | Check that type is always defined, if not make it explicit internal error (although logged as debug - so catched only with proper lvm.conf setting). This ensures later type being NULL can't be dereferenced with coredump.
* dm: remove created devices on error pathZdenek Kabelac2020-10-193-106/+51
| | | | | | | | DM tree keeps track of created device while preloading a device tree. When fail occures during such preload, it will now try to remove all created and preloaded device. This makes it easier to maintain stacking of device, since we do not need to check in-depth for existance of all possible created devices during the failure.
* debug: shorten error messageZdenek Kabelac2020-10-191-18/+8
| | | | Just check for sigint during log_error().
* libdm: validate thin-pool before sending messagesZdenek Kabelac2020-10-191-0/+9
| | | | | Alhtough lvm2 does validation on its side, ensure DM code is not sending messages to failed thin pool.
* libdm: enhance error messageZdenek Kabelac2020-10-191-2/+31
|
* libdm: split code for sending messageZdenek Kabelac2020-10-191-26/+36
| | | | | Move message sending from _thin_pool_node_message to new _node_message for possible better code sharing.
* properties: fix data_usage typoZdenek Kabelac2020-10-191-1/+1
| | | | | | | Patch 4de6f58085c533c79ce2e0db6cdeb6ed06fe05f8 introduce typo, we need to use data_usage. Note: this code was used by lvmapp library and currently is unused.
* tests: extend area covered by error targetZdenek Kabelac2020-10-191-1/+1
| | | | | | | Since 'BLKZEROOUT' streams out more block at once, at can easily zero-out larger set of blocks after 1st. failing one. So the test is adapted to fully 'hide' swap header under error target.
* make: generateMarian Csontos2020-10-151-0/+8
|
* gitignore: ignore gcov filesMarian Csontos2020-10-151-0/+4
|
* Revert "tests: Adapt RAID test to changes"Marian Csontos2020-10-131-4/+2
| | | | | | The cpnversion of degraded RAID should still report a failure. This reverts commit e12bdd591a1e60f055baee6cf5e9a144ea245a33.
* rpm: bare words are no longer supportedZdenek Kabelac2020-10-021-2/+2
| | | | Update for new rpm requirement and use "..." words.
* tests: enable tests for lvmlockdZdenek Kabelac2020-10-022-5/+3
|
* tests: aux hides zero and error deviceZdenek Kabelac2020-10-021-4/+4
| | | | | | When ERR_DEV and ZERO_DEV are used, they are automatically taken down when the last user no longer needs them, so hide them from 'forgotten' device check.
* tests: rename shown debug traceZdenek Kabelac2020-10-021-0/+1
| | | | | | | As there could be few invokes of stacktrace, avoid repeatedly display logs from commands. So after first display rename debug.log* -> debug_log so the file still can remain for reading in test dir.
* debug: drop vgid from debugZdenek Kabelac2020-10-021-2/+2
| | | | | | From the code can be seen the VGID will be always NULL here as vgid != NULL is already handled before. Thus drop from being displayed.
* debug: no backtraceZdenek Kabelac2020-10-021-1/+1
| | | | As the path already printed verbose message drop backtrace.
* debug: show actually reason for taking this code pathZdenek Kabelac2020-10-021-2/+4
| | | | Instead of not so useful backtrace, report what was the reason.