1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
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
..
cache_manip.c cov: initialize attr 2021-09-13 12:34:41 +02:00
integrity_manip.c fix fs block size detection 2022-09-09 15:50:00 -05:00
lv_alloc.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lv_manip.c lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
lv.c cleanup: use already known lv size 2021-09-27 18:56:14 +02:00
lv.h lvremove: support faster removal of thin-pools 2021-03-11 00:18:01 +01:00
merge.c vdo: use single validator 2022-07-11 01:18:24 +02:00
metadata-exported.h lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
metadata.c lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
metadata.h lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
mirror.c devices: fix dev_name assumptions 2022-02-24 17:22:04 -06:00
pool_manip.c lvresize: restructure code 2022-09-09 16:18:55 -05:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_list.c devices: fix dev_name assumptions 2022-02-24 17:22:04 -06:00
pv_manip.c cov: remove unneeded includes 2021-07-28 00:49:28 +02:00
pv_map.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
pv_map.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
pv.c cov: clean up pvid and vgid usage 2021-08-16 11:31:15 -05:00
pv.h cov: clean up pvid and vgid usage 2021-08-16 11:31:15 -05:00
raid_manip.c cleanup: use dm_list_empty 2021-10-06 15:43:31 +02:00
segtype.c segtype: add linear 2018-06-05 16:23:18 +02:00
segtype.h vdo: support v4 kernel target line 2022-07-11 01:18:24 +02:00
snapshot_manip.c gcc-fanalyzer: add extra check for origin_from_cow 2021-09-20 13:58:57 +02:00
takeover_matrix.h lvconvert: add infrastructure for RaidLV reshaping support 2017-02-24 05:20:58 +01:00
thin_manip.c thin: rename internal function 2022-08-30 13:54:19 +02:00
vdo_manip.c devices: drop double // from sysfs path 2022-08-19 14:56:57 +02:00
vg.c devices: fix dev_name assumptions 2022-02-24 17:22:04 -06:00
vg.h metadata: remember parsing size of VG metadata 2021-09-27 18:49:41 +02:00
writecache_manip.c writecache: use cleaner message instead of table reload 2021-01-28 15:14:25 -06:00