1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
David Teigland 264827cb98 lvresize: add new options and defaults for fs handling
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.
2022-09-13 15:15:05 -05:00
..
activate lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
cache apply multipath_component_detection=0 to duplicate PV handling 2022-07-25 13:50:43 -05:00
cache_segtype gcc: remove invalid attribute 2021-09-13 12:34:41 +02:00
commands lvresize: restructure code 2022-09-09 16:18:55 -05:00
config gcc: eliminate warnings 2022-09-07 14:58:01 +02:00
datastruct cleanup: eliminate unused assign 2021-03-11 00:18:01 +01:00
device lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
display gcc-fanalyzer: helping understand answer is not null 2021-09-21 21:03:47 +02:00
error device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
filters filters: remove unused internal filter 2022-04-06 12:51:34 -05:00
format_text _vg_read_raw_area: fix segfault caused by using null pointer 2022-08-15 09:39:02 -05:00
freeseg device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
integrity cleanup: no backtraces needed after log_error 2021-03-10 01:11:52 +01:00
label cov: remove unused headers 2022-07-11 01:18:24 +02:00
locking lvresize: restructure code 2022-09-09 16:18:55 -05:00
log shell: add pre-cmd log report object type and enable lastlog for it 2022-08-22 14:06:34 +02:00
lvmpolld device usage based on devices file 2021-02-23 16:43:32 -06:00
metadata lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
mirror lv_info: missing check for info.exists 2021-03-14 16:34:38 +01:00
misc utils: define macro for ffs 2021-09-27 18:56:14 +02:00
mm mm: use mallinfo2 when available 2022-08-30 13:56:16 +02:00
notify build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
properties build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
raid cleanup: reduce code dupliction 2021-03-19 23:21:18 +01:00
report report: fix lv_active column type from STR to BIN 2022-09-06 15:49:27 +02:00
snapshot typo: fixes 2021-02-08 23:53:41 +01:00
striped device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
thin thin: rename internal function 2022-08-30 13:54:19 +02:00
unknown device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
uuid asan: fix some reports from libasan 2022-02-07 20:02:11 +01:00
vdo vdo: support v4 kernel target line 2022-07-11 01:18:24 +02:00
writecache typo: fixes 2021-02-08 23:53:41 +01:00
zero device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
Makefile.in lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00