resizing LVM partitions #786
Closed
mmguero
started this conversation in
Tips and Tricks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When installing the ISO images for Malcolm or Hedgehog Linux, if the ISO installer options that use Linux's Logical Volume Management (LVM) framework were chosen and the partitions need to be adjusted (for example, a virtual disk was enlarged), the following steps can be used.
sudo pvs
- shows output about physical volumessudo vgs
- shows information about volume groupssudo lvs
- shows information about logical volumeslsblk
- list block devices and partitions/dev/vda
), partition (e.g.,/dev/vda4
), and logical volume (e.g.,/dev/main/root
) to work with. Replace things like/dev/vda
,/dev/vda4
,4
,/dev/main/root
, etc. in the following examples with the correct values for your system.sudo parted /dev/vda print
Fix
if promptedNot all of the space available appears to be used...
sudo parted -s /dev/vda resizepart 4 100%
sudo pvresize /dev/vda4
sudo lvextend -l +100%FREE /dev/main/root
df
if you’re not sure what the filesystem type is, either ext4 or xfs)sudo resize2fs /dev/main/root
sudo xfs_growfs /path/to/dev
lsblk
- list block devices and partitionsdf
- get free spaceBeta Was this translation helpful? Give feedback.
All reactions