1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/scripts
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
..
lvm2create_initrd doc: change fsf address 2016-01-21 12:11:37 +01:00
.gitignore git: update .gitignore 2021-03-19 23:21:18 +01:00
blk_availability_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
blk_availability_systemd_red_hat.service.in remove static autoactivation 2022-01-27 16:43:11 -06:00
blkdeactivate.sh.in blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo 2020-06-08 15:41:35 +02:00
cmirrord_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
code-stats.rb scripts/code-stats.rb: count files better, handle bad utf8 2018-05-17 09:52:13 +01:00
com.redhat.lvmdbus1.conf lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
com.redhat.lvmdbus1.service.in systemd: use proper sbindir path 2017-10-25 22:02:54 +02:00
dm_event_systemd_red_hat.service.in systemd: remove Install sections from socket-activated services 2017-11-01 15:37:19 +01:00
dm_event_systemd_red_hat.socket.in systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket 2014-06-13 15:45:25 +02:00
fsadm.sh lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
gdbinit doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2_cmirrord_systemd_red_hat.service.in systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_lvmdbusd_systemd_red_hat.service.in systemd: use proper sbindir path 2017-10-25 22:02:54 +02:00
lvm2_lvmpolld_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
lvm2_lvmpolld_systemd_red_hat.service.in systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_lvmpolld_systemd_red_hat.socket.in systemd: put back DefaultDependencies=no for lvmpolld socket unit 2019-04-11 12:18:02 +02:00
lvm2_monitoring_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
lvm2_monitoring_init_rhel4 doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2_monitoring_systemd_red_hat.service.in remove static autoactivation 2022-01-27 16:43:11 -06:00
lvm2_tmpfiles_red_hat.conf.in Use 'd' instead of 'D' in tmpfiles configuration to not overwrite any existing directory. 2012-02-23 14:24:30 +00:00
lvm2-pvscan.service.in lvm2-pvscan: include --autoactivation event 2021-11-04 14:14:37 -05:00
lvm_import_vdo.sh vdo: fix conversion of vdo_slab_size_mb 2nd 2022-07-11 01:18:24 +02:00
lvmdump.sh.in shellcheck: updates 2021-04-23 23:00:55 +02:00
lvmlockd.service.in More cleanup needed for dropped scripts 2018-09-13 11:09:25 -05:00
lvmlocks.service.in Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait 2020-04-21 16:52:45 -05:00
lvresize_fs_helper.sh lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
Makefile.in lvresize: add new options and defaults for fs handling 2022-09-13 15:15:05 -05:00
relpath.awk doc: change fsf address 2016-01-21 12:11:37 +01:00
vgimportclone.sh shellcheck: updates 2021-04-23 23:00:55 +02:00
VolumeGroup.ocf Add OCF support 2010-11-05 16:18:38 +00:00