summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* lvresize: add new options and defaults for fs handlingdev-dct-lvresize-4David Teigland2022-07-2918-91/+2312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new option "--fs String" for lvresize/lvreduce/lvextend controls the handling of file systems before/after resizing the LV. --resizefs is the same as --fs resize. Possible --fs values: checksize Only used when reducing the size, does nothing when exending. Check the fs size, and reduce the LV if the fs is not using the affected space, i.e. the fs does not need to be shrunk. Fail the command without reducing the fs or LV if the fs is using the affected space. resize_remount | resize Resize the fs if needed. Mounts or unmounts the fs as required (avoids mounting/unmounting when possible.) Attempts to restore the original mount state when finished. resize_keepmount Resize the fs if needed, only if it can be done without changing the current mount state. Fail the command without resizing the fs or LV if an fs resize requires mounting or unmounting. resize_unmount Resize the fs if needed, only while unmounted. Unmount the fs if needed. Fail the command without resizing the fs or LV if an fs resize is needed that requires the the fs to be mounted. resize_fsadm Use the old method of calling fsadm to do handle the fs (deprecated). ignore Resize the LV without checking for or handling a file system. Notes on lvreduce: When no --fs or --resizefs option is specified: . lvextend default behavior is fs ignore. . lvreduce default behavior is fs checksize (includes activating the LV.) With the exception of --fs resize_fsadm|ignore, lvreduce requires the recent libblkid fields FSLASTBLOCK and FSBLOCKSIZE. FSLASTBLOCK*FSBLOCKSIZE is the last byte used by the fs on the LV, which determines if reducing the fs is necessary.
* lvresize: restructure codeDavid Teigland2022-07-0115-559/+886
| | | | | Rewrite top level resize function to prepare for adding new fs resizing.
* lvmdbustest: Add test for property "Get"Tony Asleson2022-06-302-1/+25
| | | | We typically use "GetAll", so add test for "Get" and check values.
* lvmdbusd: Remove try/except for mkfifoTony Asleson2022-06-301-5/+2
| | | | We should never run into this error condition when using tempfile.mkdtemp.
* lvmdusd: Remove non lvm JSON output supportTony Asleson2022-06-303-233/+20
|
* lvmdbustest: Increase number of LVsTony Asleson2022-06-301-1/+1
| | | | As storage is getting faster, we need to create more LVs to pass this test.
* lvmdbustest: Correct comment spelling/grammarTony Asleson2022-06-301-11/+11
|
* lvmdbustest: Test job remove path when job not completeTony Asleson2022-06-301-0/+11
|
* lvmdbusd: Correct grammar in lvm shell proxy commentsTony Asleson2022-06-301-2/+2
|
* lvmdbusd: Don't require "lvm> " prompt for shellTony Asleson2022-06-301-40/+43
| | | | | | | Depending on how lvm is compiled, it may not present the "lvm> " prompt when using the lvm shell. Don't require it to be present. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2090391
* lvmdbusd: Job prop. Get/GetAll exec. immediatelyTony Asleson2022-06-301-0/+18
| | | | | This allows API user the ability to check on the status of a long running job without blocking in the request queue.
* lvmdbusd: Remove the use of sub shell for lvm shellTony Asleson2022-06-301-13/+11
| | | | This reduces the number of processes and improves security.
* lvmdbusd: Fix env variable LVM_DBUSD_TEST_MODETony Asleson2022-06-301-4/+8
| | | | Make it more logical.
* lvmdbusd: Change unit test vdo minimum sizeTony Asleson2022-06-301-5/+9
|
* lvmdbusd: Add debug output for which lvm binary is usedTony Asleson2022-06-301-0/+2
|
* lvmdbusd: re-work lvm shell mainTony Asleson2022-06-301-18/+28
| | | | | Add an optional single argument "bisect" to use with git bisect for automation. Normal case is no arguments when running stand-alone.
* lvmdbusd: Simplify child process envTony Asleson2022-06-301-1/+2
| | | | | We don't need to duplicate the entire env from the parent, supply only what is needed.
* lvmdbusd: Correct conditional for lvm child process runningTony Asleson2022-06-301-1/+1
| | | | | Poll returns None when process is running, else exit value. If poll returns 0 we will fail to exit the select loop.
* pvdisplay: restore --reportformat optionDavid Teigland2022-06-241-2/+2
| | | | | | | | Fixes commit b8f4ec846 "display: ignore --reportformat" by restoring the --reportformat option to pvdisplay. Adding -C to pvdisplay turns the command into a reporting command (like pvs, vgs, lvs) in which --reportformat can be useful.
* filter-mpath: get wwids from sysfs vpd_pg83David Teigland2022-06-088-43/+454
| | | | | | | | | to compare with wwids in /etc/multipath/wwids when excluding multipath components. The wwid printed from the sysfs wwid file may not be the wwid used in multipath wwids. Save the wwids found for each device on dev->wwids to avoid repeating reading and parsing the sysfs files.
* tests: skip running tests for non root userZdenek Kabelac2022-06-071-0/+6
| | | | | Testing needs 'root' privileges. Only 'make run-unit-test' can work without them.
* tests: update for wrapperZdenek Kabelac2022-06-071-6/+7
| | | | | | | Update calling vdo manager since our vdo wrapper has a simple shell arg parser so it needs args without '=' Also correct using DM_DEV_DIR for 'pvcreate'
* tests: add lvm_vdo_wrapperZdenek Kabelac2022-06-072-0/+354
| | | | | | | | | | | | Introduce a replacement vdo manager wrapper for testing. When using test suite on a system without vdo manager (which has got deprecated) - we still need its functionality to prepare 'vdo volume' for testing lvm_import_vdo. Wrapper currently need 2 binaries from older 'vdo 6.2' package - to be named: oldvdoformat - format VDO metadata with older format oldvdoprepareforlvm - shift vdo metadata by 1MiB
* vdo: fix conversion of vdo_slab_size_mbZdenek Kabelac2022-06-072-12/+4
| | | | | | | | | | | | When converting VDO volume, the parameter vdo_slabSize was incorrectly copied as vdo_blockMapCacheSize, however this parameter is then no longer used for any table line creation so the wrong value was only stored in metadata. Also use just single get_kb_size_with_unit_ and remove it's duplicate functionality with get_mb_size_with_unit_. Use $VERB for vdo remove call.
* filter-mpath: handle other wwid types in blacklistDavid Teigland2022-06-061-5/+6
| | | | | | | Fixes commit 494372b4eed0c8f6040e3357939eb7511ac25745 "filter-mpath: use multipath blacklist" to handle wwids with initial type digits 1 and 2 used for t10 and eui ids. Originally recognized type 3 naa.
* devices file: fail if --devicesfile filename doesn't existDavid Teigland2022-05-272-0/+13
| | | | | | | A typo of the filename after --devicesfile should result in a command error rather than the command falling back to using no devices file at all. Exception is vgcreate|pvcreate which create a new devices file if the file name doesn't exist.
* devices file: move clean up after command is runDavid Teigland2022-05-272-2/+1
| | | | | devices_file_exit wasn't being called between lvm_shell commands, so the file lock wouldn't be released.
* post-releaseMarian Csontos2022-05-184-2/+8
|
* pre-releasev2_03_16Marian Csontos2022-05-184-6/+12
|
* make: generateMarian Csontos2022-05-1845-90/+135
|
* toollib: fix segfault when handling selection with historical LVsPeter Rajnoha2022-05-052-3/+5
| | | | | | | | | | | | | When processing historical LVs inside process_each_lv_in_vg for selection, we need to use dummy "_historical_lv" for select_match_lv. This is because a historical LV is not an actual LV, but only a tiny representation with subset of original properties that we recorded (name, uuid...). To use the same processing functions we use for full-fledged non-historical LVs, we need to use the prefilled "_historical_lv" structure which has all the other missing properties hard-coded.
* make: generateZdenek Kabelac2022-05-0345-66/+170
|
* vdo: support --vdosettingsZdenek Kabelac2022-05-0313-39/+313
| | | | | | | | Allow to use --vdosettings with lvcreate,lvconvert,lvchange. Support settings currenly only configurable via lvm.conf. With lvchange we require inactivate LV for changes to be applied. Settings block_map_era_length has supported alias block_map_period.
* improve description of devices optionDavid Teigland2022-05-021-2/+3
|
* filter-mpath: use multipath blacklistDavid Teigland2022-04-223-12/+342
| | | | | | | | Explicit wwid's from these sections control whether the same wwid in /etc/multipath/wwids is recognized as a multipath component. Other non-wwid keywords are not used, and may require disabling the use of the multipath wwids file in lvm.conf.
* tests: devicesfile-edit.sh fix loop file nameDavid Teigland2022-04-211-2/+2
| | | | don't remove dash from loop file name
* devices file: remove extraneous unlock in vgchange -uDavid Teigland2022-04-131-4/+3
| | | | | vgchange -u exit path was unlocking the devices file in cases when it wasn't needed, which produced an warning.
* lvmlockd: return error from vgcreate init_vg_sanlockDavid Teigland2022-04-081-2/+2
| | | | | | in vgcreate for shared sanlock vg, if sanlock_write_resource returns an unexpected error, then make init_vg_sanlock fail which will cause the vgcreate to fail.
* filters: remove unused internal filterDavid Teigland2022-04-064-99/+1
|
* filter: remove unused EAGAIN case and flagDavid Teigland2022-04-0610-77/+8
| | | | | The case of filters returning EAGAIN and using the FILTER_AFTER_SCAN flag is no longer used.
* lvmdevices: --deldev using device idDavid Teigland2022-04-067-7/+80
| | | | | When used with --deviceidtype, --deldev can specify a device id to remove.
* vgimportdevices: fix incorrect deviceidtype usageDavid Teigland2022-04-061-2/+1
| | | | | | | | When a VG has PVs with different device id types, it would try to use the idtype of the previous PV in the loop. This would produce an unncessary warning, or could lead to using the devname idtype when a better idtype is available.
* pvscan: warn about /dev/sda excluded by devices fileDavid Teigland2022-04-011-0/+28
| | | | | | | | | | In most installations, /dev/sda* or /dev/vda* should be included in system.devices because the root, home, etc LVs are usually on sda or vda. Add a special case warning when a pvscan autoactivation command sees that /dev/sda* or /dev/vda* are excluded by system.devices, either not listed or having a different device id.
* change messages about filtered devicesDavid Teigland2022-04-015-11/+11
| | | | | | Change messages that refer to devices being "excluded by filters" to say just "excluded". This will avoid mistaking the word "filters" with the lvm.conf filter setting.
* lvmdevices update: correct multipath entriesDavid Teigland2022-04-012-0/+49
| | | | | Remove multipath components. Add multipath devs that have multipath components listed.
* devices file: warn about missing multipath entryDavid Teigland2022-04-015-5/+38
| | | | | | | | | | | Warn if a scsi device is listed in the devices file that is used by a multipath device that is not listed. This will happen if a scsi device is listed in the devices file and then an mpath device is set up to use it. The way to correct this would be to remove the devices file entry for the component device and add a new entry for the multipath device.
* thin: fix message processing on thin-pool extensionZdenek Kabelac2022-03-303-1/+80
| | | | | | When thin-pool had queued some delete message on extension operation such message has been 'lost' and thin-pool kernel metadata has been left with a thin volume that no longer existed for lvm2 metadata.
* fix args entry for nolockingDavid Teigland2022-03-251-1/+1
| | | | typo in previous commit
* Move nolocking warning to man pageDavid Teigland2022-03-252-5/+3
| | | | | | It's more logical to warn about --nolocking in the man page before it's used rather than after it's used and too late. Also, warnings are usually for things the user may not know.
* vgchange monitor: don't use udev infoDavid Teigland2022-03-251-0/+11
| | | | | vgchange --monitor y is run during startup when udev is being initialized and is not yet ready to be used.