Shrink Local Storage

endy66

New Member
May 10, 2015
3
0
1
Hello

Im running Proxmox VE 3.1. Now my local storage on my node is 4TB of size, but i only Need about 300GB. Is there a safe way to shrink the 4TB storage to 500GB and add a secondary Partition with the rest of the space (~3,5TB), which i then can Mount to one of my openvz Containers?

Thanks
 
Can nobody help me with this Problem?
Hi,
I guess, because it's don't be an pve problem.

The safe way is a temporary second disk, which you add to the VG, rename LV data to data-old, create new smaller LV data - transfer all data from data-old to data (umount data-old and mount data (/var/lib/vz)).
Move all content from sda2 to the temp secondary disk (pvmove). Remove the free PV with pvremove.
Now you can partition your sda, add the smaller partion to the VG again and move the LVs back with pvmove.

After that you can remove the temp-disk with pvremove and you are finished.

Before you start, be sure you have an valid backup and you are know what you are doing!

Udo
 
Hi,
I guess, because it's don't be an pve problem.

The safe way is a temporary second disk, which you add to the VG, rename LV data to data-old, create new smaller LV data - transfer all data from data-old to data (umount data-old and mount data (/var/lib/vz)).
Move all content from sda2 to the temp secondary disk (pvmove). Remove the free PV with pvremove.
Now you can partition your sda, add the smaller partion to the VG again and move the LVs back with pvmove.

After that you can remove the temp-disk with pvremove and you are finished.

Before you start, be sure you have an valid backup and you are know what you are doing!

Udo

Thank you for your answer. The Problem is, that i havent physical Access to the node, so i cant install a temporary second disk. Is there another way, to have the free space on a seperate disk?
 
I guess you have most of space occupied by /dev/mapper/pve-data. If so the easiest way to get more space would be:
1. Unmount and reduce file system size at /dev/mapper/pve-data
2. Reduce size of LVM volume /dev/mapper/pve-data (Be careful here. If you make the volume smaller then the FS size then FS will be broken.)
3. Create a new LVM volume /dev/mapper/pve-myvol and do whatever you want
 

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!