1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Peter Rajnoha 5096335277
lv_manip: handle swap devices in fs-related checks for lvreduce/lvextend
This provides better hints when trying to resize the fs on top of an LV.
Also needs a3f6d2f593 for proper operation.

❯  lvs -o name,size vg/swap
  lv_name lv_size
  swap     60.00m

Before:

❯  lvextend -L72m vg/swap
  Size of logical volume vg/swap changed from 60.00 MiB (15 extents) to 72.00 MiB (18 extents).
  Logical volume vg/swap successfully resized.

❯  lvreduce -L60m vg/swap
  File system swap found on vg/swap.
  File system device usage is not available from libblkid.

❯  lvreduce -L50m vg/swap
  Rounding size to boundary between physical extents: 52.00 MiB.
  File system swap found on vg/swap.
  File system device usage is not available from libblkid.

After:

❯  lvextend -L72m vg/swap
  Size of logical volume vg/swap changed from 60.00 MiB (15 extents) to 72.00 MiB (18 extents).
  Logical volume vg/swap successfully resized.

❯  lvreduce -L60m vg/swap
  File system swap found on vg/swap.
  File system size (60.00 MiB) is equal to the requested size (60.00 MiB).
  File system reduce is not needed, skipping.
  Size of logical volume vg/swap changed from 72.00 MiB (18 extents) to 60.00 MiB (15 extents).
  Logical volume vg/swap successfully resized.

❯  lvreduce -L50m vg/swap
  Rounding size to boundary between physical extents: 52.00 MiB.
  File system swap found on vg/swap.
  File system size (60.00 MiB) is larger than the requested size (52.00 MiB).
  File system reduce is required and not supported (swap).
2024-10-02 13:31:54 +02:00
..
activate cleanup: typos in comments 2024-08-30 16:51:15 +02:00
cache cleanup: typos in comments 2024-08-30 16:51:15 +02:00
cache_segtype metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
commands cleanup: fix typos 2024-09-27 13:42:45 +02:00
config lvmlockd: configurable sanlock lease sizes on 4K disks 2024-09-27 17:59:03 -05:00
datastruct cleanup: eliminate unused assign 2021-03-11 00:18:01 +01:00
device dev-type: get swap device size from blkid using FSSIZE 2024-10-02 13:31:54 +02:00
display cleanup: typos in comments 2024-08-30 16:51:15 +02:00
error error: try with modprobe 2024-05-27 15:16:26 +02:00
filters cleanup: typos in comments 2024-08-30 16:51:15 +02:00
format_text metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
freeseg device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
integrity metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
label cleanup: typos in comments 2024-08-30 16:51:15 +02:00
locking cov: potentially overflowing expression 2024-09-30 15:00:03 +02:00
log cov: annotate 2024-09-30 15:00:03 +02:00
lvmpolld cleanup: typos in logging 2024-08-30 16:51:15 +02:00
metadata lv_manip: handle swap devices in fs-related checks for lvreduce/lvextend 2024-10-02 13:31:54 +02:00
mirror metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
misc cleanup: typos in comments 2024-08-30 16:51:15 +02:00
mm memlock: use value of 0 to disable memory locking 2024-09-27 13:42:45 +02:00
notify cleanup: fix typos 2024-09-27 13:42:45 +02:00
properties cleanup: typos in comments 2024-08-30 16:51:15 +02:00
raid metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
report vdo: depcreate unused settings 2024-09-26 16:25:12 +02:00
snapshot metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
striped metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
thin metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
unknown metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
uuid cleanup: use _ for static var 2024-06-03 15:30:05 +02:00
vdo vdo: depcreate unused settings 2024-09-26 16:25:12 +02:00
writecache metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
zero const: _ops segtype handler 2024-05-04 01:01:57 +02:00
Makefile.in devices: factor common list functions 2022-11-07 11:38:46 -06:00