This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
fuss:lvm [2020/06/08 04:15] – office | fuss:lvm [2024/11/23 15:12] (current) – office | ||
---|---|---|---|
Line 113: | Line 113: | ||
and LVM will take care to flush the cache to the cached logical drive before removing it. | and LVM will take care to flush the cache to the cached logical drive before removing it. | ||
+ | ====== Relocating Extents Before Resizing ====== | ||
+ | |||
+ | When attempting to resize a physical volume containing a logical volume, it may happen that an error pops up regarding extents or blocks that are allocated later '' | ||
+ | |||
+ | The reason for that is that the actual data on the drive is not written exactly at the start of the partition or there are holes within the free space but changing the size of the PV requires that the data is laid out contiguously on the drive. | ||
+ | |||
+ | {{fuss: | ||
+ | |||
+ | This can be solved rather easily using '' | ||
+ | |||
+ | <code bash> | ||
+ | pvs -v --segments /dev/sda4 | ||
+ | </ | ||
+ | |||
+ | Just as an example, the following data was printed in this case: | ||
+ | < | ||
+ | PV | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | and the interpretation is that the drive, in this case partition, ''/ | ||
+ | |||
+ | Having understood the former, the command for this particular case will be: | ||
+ | <code bash> | ||
+ | pvmove --alloc anywhere / | ||
+ | </ | ||
+ | where: | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | |||
+ | This might be a length process but after it is completed, the size of the physical drive can be changed with a partition manager. | ||
+ | |||
+ | |||
+ | |||
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.