Resize /dev/mapper/pve-root & rootfs

synden

New Member
Apr 9, 2015
16
0
1
Like the topic I would like to resize rootfs and the pve-root folders due to they don't use much space and I would like to give that
space to /dev/mapper/pve-data instead.

rootfs 28G 1.2GB(used) 25G(available) 5%(use%) /
/dem/mapper/pve-root 28G 1.2GB(used) 25G(available) 5%(use%) /

I've googled some but I don't find any good explanation how I will do this. Is rescue CD only option to resize or can I do it via command line?

Best reagards!
 
Online shrinking is not possible, AFAIK online resizing works only while enlarging.

The rescue CD would be an option, should work something like:
1. backup the machine
2. start it from a linux cd (systemrescuecd, grml etc.)
3. check the filesystem on /dev/mapper/pve-root (e2fsck)
4. resize the filesystem on /dev/mapper/pve-root (resize2fs)
5. reduce the logical volume /dev/mapper/pve-root (lvreduce)
6. extend the logical volume /dev/mapper/pve-data (lvextend)
7. resize the filesystem on /dev/mapper/pve-data (resize2fs)
That it has some minimal risk is self explaining.

As you're gaining "only" around 20G adding a new disk to your system would be an good option to, would also save you the hassle with resizing.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!