1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/metadata
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
..
cache_manip.c cleanup: typos in comments 2024-08-30 16:51:15 +02:00
integrity_manip.c cov: avoid expression overflow 2024-08-09 13:20:44 +02:00
lv_alloc.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lv_manip.c lv_manip: handle swap devices in fs-related checks for lvreduce/lvextend 2024-10-02 13:31:54 +02:00
lv.c vg: remove unused hostnames hash table 2024-09-23 15:04:53 -05:00
lv.h lv: remove unused declaration 2024-01-10 14:02:22 +01:00
merge.c cleanup: typos in logging 2024-08-30 16:51:15 +02:00
metadata-exported.h cleanup: typos in comments 2024-08-30 16:51:15 +02:00
metadata.c cleanup: typos in comments 2024-08-30 16:51:15 +02:00
metadata.h cleanup: typos in comments 2024-08-30 16:51:15 +02:00
mirror.c cleanup: typos in comments 2024-08-30 16:51:15 +02:00
pool_manip.c cleanup: typos in comments 2024-08-30 16:51:15 +02: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: typos in comments 2024-08-30 16:51:15 +02:00
segtype.c segtype: add linear 2018-06-05 16:23:18 +02:00
segtype.h metadata: use lv_hash in segment-specific metadata parsing 2024-09-10 11:51:15 -05:00
snapshot_manip.c cleanup: typos in comments 2024-08-30 16:51:15 +02:00
takeover_matrix.h const: raid takover arrays 2024-05-04 01:01:57 +02:00
thin_manip.c cleanup: typos in comments 2024-08-30 16:51:15 +02:00
vdo_manip.c vdo: depcreate unused settings 2024-09-26 16:25:12 +02:00
vg.c vg: remove unused hostnames hash table 2024-09-23 15:04:53 -05:00
vg.h vg: remove unused hostnames hash table 2024-09-23 15:04:53 -05:00
writecache_manip.c cov: drop unused header inclusion 2024-08-09 13:20:44 +02:00