1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/device
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
..
bcache-utils.c cov: ensure data is not derefenced 2021-09-20 14:26:09 +02:00
bcache.c cov: mask some warning about leakage 2021-09-20 14:26:09 +02:00
bcache.h bcache: use indirection table for fd 2020-09-18 15:10:11 -05:00
dev-cache.c vgimportdevices: fix locking when creating devices file 2022-08-30 14:52:00 -05:00
dev-cache.h filter-mpath: get wwids from sysfs vpd_pg83 2022-06-08 15:06:01 -05:00
dev-dasd.c cov: mask uninitialized value 2021-03-10 01:34:27 +01:00
dev-ext-udev-constants.h dev-type: check for DEVLINKS udev db variable existence if udev_device_get_is_initialized fn is not present 2016-09-06 13:21:29 +02:00
dev-ext.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-io.c devices: drop incorrect paths from aliases list 2022-02-24 17:22:03 -06:00
dev-luks.c filter: remove unused EAGAIN case and flag 2022-04-06 12:51:34 -05:00
dev-lvm1-pool.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-md.c filter: remove unused EAGAIN case and flag 2022-04-06 12:51:34 -05:00
dev-mpath.c devices: drop double // from sysfs path 2022-08-19 14:56:57 +02:00
dev-swap.c filter: remove unused EAGAIN case and flag 2022-04-06 12:51:34 -05:00
dev-type.c lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
dev-type.h lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
device_id.c vgimportdevices: fix locking when creating devices file 2022-08-30 14:52:00 -05:00
device_id.h filter-mpath: get wwids from sysfs vpd_pg83 2022-06-08 15:06:01 -05:00
device-types.h devices: recognise rbd (ceph rados block device) 2021-12-13 13:32:06 -06:00
device.h filter-mpath: get wwids from sysfs vpd_pg83 2022-06-08 15:06:01 -05:00
filesystem.c lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
filesystem.h lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
online.c cov: remove unused headers 2022-07-11 01:18:24 +02:00
online.h pvs_online: include devname in pvid files 2021-11-09 11:26:26 -06:00
parse_vpd.c filter-mpath: get wwids from sysfs vpd_pg83 2022-06-08 15:06:01 -05:00