summaryrefslogtreecommitdiff
path: root/test/shell/lvresize-fs.sh
Commit message (Collapse)AuthorAgeFilesLines
* lvresize: fix check for mounted and renamed LV to handle spacesDavid Teigland2023-02-231-0/+14
| | | | | | | | | | Replace spaces with \040 in directory paths from getmntent (mtab). The recent commit 5374a44c5712 compares mount point directory paths from /etc/mtab and /proc/mounts, in order to detect when a mounted LV has been renamed. The directory path comparison does not work correctly when the path contains spaces because getmntent uses ascii space chars and proc replaces spaces with \040.
* lvresize: fail early if mounted LV was renamedDavid Teigland2023-01-261-0/+11
| | | | | | If a mounted LV is renamed, then fs resizing utilities will fail, so detect this condition and fail the command before any changes are made.
* lvreduce: require active LV when no fs option is usedDavid Teigland2022-10-111-3/+4
| | | | | Without an --fs option set, make lvreduce of an inactive LV fail and report that the LV must be active.
* tests: skip lvresize tests without mkfs.xfsDavid Teigland2022-10-101-0/+2
|
* tests: skip new lvresize tests when missing new libblkidDavid Teigland2022-09-131-0/+6
|
* lvresize: add new options and defaults for fs handlingDavid Teigland2022-09-131-0/+1186
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. The new option "--fsmode String" can be used to control mounting and unmounting of the fs during resizing. Possible --fs values: checksize Only applies to reducing size; does nothing for extend. 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 Resize the fs using the fs-specific resize command. This may include mounting, unmounting, or running fsck. See --fsmode to control mounting behavior, and --nofsck to disable fsck. resize_fsadm Use the old method of calling fsadm to handle the fs (deprecated.) Warning: this option does not prevent lvreduce from destroying file systems that are unmounted (or mounted if prompts are skipped.) ignore Resize the LV without checking for or handling a file system. Warning: using ignore when reducing the LV size may destroy the file system. Possible --fsmode values: manage Mount or unmount the fs as needed to resize the fs, and attempt to restore the original mount state at the end. nochange Do not mount or unmount the fs. If mounting or unmounting is required to resize the fs, then do not resize the fs or the LV and fail the command. offline Unmount the fs if it is mounted, and resize the fs while it is unmounted. If mounting is required to resize the fs, then do not resize the fs or the LV and fail the command. 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.