anzedolenc

New Member
Dec 16, 2023
3
0
1
Hi,

I am currently using volume from root directory to share between CT containers. I am running out of 100GB and need help. I have a 500Gb disk (100Gb local, 400GB local-lvm). I need to share a directory between my containers and in future when I add more disks expand my storage. Does anyone have an idea on how to solve my problem

I know that this might be a dumb question but I am very new to this
 
Last edited:
"local-lvm" is a block storage without a filesystem. So you can't store files/folders there and only virtual disks. There are 3 options:
1.) buy a new disk and use it to store for files/folders
2.) extend your root filesystem (so the "local" storage). As you can't shrink a thin pool (your "local-lvm") to make room for extending your root filesystem you would need to backup all VMs/LXCs, destroy that thin pool and recreate it with a smaller size. Then extend your root LV and its ext4 filesystem. Restore guests. All has to be done manually via CLI.
3.) create a new thin volume on your existing thin pool, format it, mount it. This all has to be done manually via the CLI. This way yu can store files/folders on your existing "local-lvm".

I would prefer option 1 or 3 depending on your future space requirement predictions
 
Last edited:
Short intro to LVM:
3 Layers:
- Physical Volumes
- Volume Groups
- Logical Volumes
pvs shows the physical volumes (physical disks or partitions)
vgs shows the volume group(s), VGs consists of one or more PVs (so if you run out of space you can add a new disk to your VG)
lvs show your logical volumes, which are block devices under linux which can be formated with a filesystem and mounted.

So if your volume group is call vg1 you can create a lv with
lvcreate -L 20G -n mydata vg1
mkfs.ext4 /dev/mapper/vg1/mydata
mount /dev/mapper/vg1/mydata /mydata

If you need more space (as long as you have space left in your VG) just do
lvextend -L +100G /dev/mapper/vg1/mydata
resize2fs /dev/mapper/vg1/mydata
 
  • Like
Reactions: Kingneutron
@ubu This is interesting to me. Please forgive my stupid question!

My "local/pve" is completely full even though I only have 2 small LXC on a fresh Proxmox install (no backups or ISOs).
Can I extend the local(pve) by using space off of "local-lvm"?

Those 2 sit on a 128GB 2.5" SSD but I can easily move the LXCs over to my 1TB NVME.

I would love to understand what I can do and how :)
 

Attachments

  • Screenshot 2024-05-17 at 12.30.35.png
    Screenshot 2024-05-17 at 12.30.35.png
    235.3 KB · Views: 20

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!