Adding storage to initial setup

johnmaag

New Member
Mar 14, 2021
3
0
1
64
First a question on installation storage. Proxmox had a 500G drive and IMO it wasted it. Here is what it looks like:

Filesystem Size Used Avail Use% Mounted on
udev 122G 0 122G 0% /dev
tmpfs 25G 10M 25G 1% /run
/dev/mapper/pve-root 94G 2.2G 88G 3% /
tmpfs 123G 40M 122G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 123G 0 123G 0% /sys/fs/cgroup
/dev/fuse 30M 16K 30M 1% /etc/pve
tmpfs 25G 0 25G 0% /run/user/0

Anyway, I bought a 2T disk for internal storage. This is not to run a business but just to mess with. I needed to add storage for iso's, I did this the old fashioned unix way and just created a partition and mounted it on /var/lib/vz. If there i a better way, please let me know.

Second is to add storage for vm's. Since I will want to thin provision any vm's, it appears I want to add to the already existing pool local-lvm but I cannot find any examples of how to do this. I am expecting a VG to exist that I would add a pv to. When I go to add storage I have way to may choices when there IMO ought to be just ask me where the partiton is and where you want to add it

If I have to create a volume group, then how do I add this to something that already exists like local-lvm. I don't actually care if it is in an already existing "thing" as long as the vm's when created are local provisioned but then if I have to create a volume group et. al. then why do these objects like local,local-lvm exist in the first place?
 
if you already partitioned your drive and mounted it under /var/lib/vz, you'll likely not be able to add it again to a vg
also you can simply use that disk for vm disks too (e.g. with 'raw' or 'qcow2' files, both are thin-provisioned, and qcow2 also supports snapshots)

the default vg name is 'pve' (for pve) and the default lvm thin pool inside is named 'data'
you can use the standard lvm tools (like vgcreate, etc.) to manage that

the gui has only basic support for the most simple setups (so no adding to vg for example)
 
> if you already partitioned your drive and mounted it under /var/lib/vz, you'll likely not be able to add it again to a vg
also you can simply use that disk for vm disks too (e.g. with 'raw' or 'qcow2' files, both are thin-provisioned, and qcow2 also supports snapshots)

I don't 100% follow how I would do this but It is only a 250G partition so no huge. I can lose what is under there btw and redo. How would I do this correctly?

I glean from your statement that GUI is useless for real work which explains a lot of my confusion but then can you please provide commands to add a disk partition or in my case a volume mgr physical disk to vg pve? do I just "vgextend pve <disk-name>"? (I can't remember what I called it)
 
Yes, I previously reviewed it. It did not help me with the why's. See above where dcsapak said I need to add to pve disk group. I did not see this in the wiki link. The definition of a word doesn't tell you how to use it in a sentence.
 

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!