Ssd partitioning with partitions

Palerm0

New Member
Oct 4, 2024
2
0
1
Good afternoon, I have a question. I have a proxmox server with a 256gb ssd.

Can you help me with the partitioning of this disk. I would like to have 75gb for the proxmox installation (incl. the installation requirements such as swap, etc.). And another partition for the VM, ISO etc.

I just don't know how to partition that.
A wipe of a server is no problem since there is nothing on it yet.

Thanks in advance for your help
Greetings
Palermo
 
Just do a standard pve installation (lvm+ ext4/xfs) on your ssd and pve will do nearly your expectations which could you fine-tuning in more/less gb's, eg. on a 200GB ssd it results in 60gb "/", 8 gb swap and 105gb data (in lvm).
 
Why do you want to partition and not use all available space for PVE and the VMs? Why this artificial restriction? You can do that with a lot of storage options in PVE, the simplest is to use one filesystem for everything and store your VMs as QCOW2 on them, which offers the maximum of features (tree-like snapshots, thin-provisioning and also compression if you enable it manually).
 
Well... Just like in windows, What is the best implementation.
If the file system broke, you would still have the data on the other partition. Maybe this is an old habit.

I replaced the storage with a 512GB ssd. The other one was defective.
I did a new installation.

LVM 512.03GB
LVM-Thin I have 374.78GB

Local 100.86GB
Local-lvm 374.87GB

What I understand is that 93.93GB is used for the installation disk, and 7.69GB for the swap.

How can I reduce the space for the installation of the pve to 50 or 70gb. Does he really need this.

Thanks in advance for your help
Greetings
Palermo
 
Can you help me with the partitioning of this disk. I would like to have 75gb for the proxmox installation (incl. the installation requirements such as swap, etc.). And another partition for the VM, ISO etc.

During install [1], make use of the "Advanced LVM Configuration Options", take it from there with e.g. gdisk or parted post-install as per your liking.
Note it is possible to e.g. set maxvz to 0.

hdsize
Defines the total hard disk size to be used. This way you can reserve free spaceon the hard disk for further partitioning (for example for an additional PV andVG on the same hard disk that can be used for LVM storage).

swapsize
Defines the size of the swap volume. The default is the size of the installedmemory, minimum 4 GB and maximum 8 GB. The resulting value cannot be greaterthan hdsize/8.

maxroot

Defines the maximum size of the root volume, which stores the operationsystem. The maximum limit of the root volume size is hdsize/4.

maxvz

Defines the maximum size of the data volume. The actual size of the datavolume is:
datasize = hdsize - rootsize - swapsize - minfree
Where datasize cannot be bigger than maxvz

minfree

Defines the amount of free space that should be left in the LVM volume grouppve. With more than 128GB storage available, the default is 16GB, otherwisehdsize/8 will be used.

[1] https://pve.proxmox.com/wiki/Installation#installation_installer
 
I normally use 8G for the root partition. It takes around ~3G.
That is terrible advice to give a beginner.

The journal will grow up to 2 GB by default, you need space for uploaded ISO files and the like, apt/dpkg will take significant space for their database, plus you need space in /var/tmp for making backups.

32 GB makes a lot more sense for most people, unless you are very familiar with Linux and plan to slice-and-dice things with a bunch of extra partitions. In this case where he has a separate data disk it might even make sense to just have the larger drive be an LVM and the smaller one entirely used for the OS.
 
That is terrible advice to give a beginner.

I have always used ~8G partitions for root on Linux install, when I run out of space there, I know I am doing something else wrong. It is what I do and it's for the OP to decide for his case.

The journal will grow up to 2 GB by default, you need space for uploaded ISO files and the like, apt/dpkg will take significant space for their database, plus you need space in /var/tmp for making backups.

EDIT: OP said in his initial post he wants separate partition for ISOs.

I never suggested to keep ISO files in the original dir. I suppose he will do something useful with the rest of the space afterwards. The ~3G already includes apt, it's post-install fully upgraded state. I do not normally exceed /var/tmp, but if I did, I would mount it separately. Easy to add (with plenty to spare). /var/tmp is for persistent files, I hope backups do not use that. I usually mount /tmp if needed.

32 GB makes a lot more sense for most people, unless you are very familiar with Linux and plan to slice-and-dice things with a bunch of extra partitions.

Probably, but PVE install does not even need spare space in /home, /var, etc. to be mounted separately.

In this case where he has a separate data disk it might even make sense to just have the larger drive be an LVM and the smaller one entirely used for the OS.

I do not believe root should share partition with anything that is not meant to be lost upon re-install, beginner or not. Of course everyone is entitled to their own opinion. I think it's a topic like running out of space with old kernels on 512M ESP.
 
Last edited:
I never suggested to keep ISO files in the original dir. I suppose he will do something useful with the rest of the space afterwards.
So your advice is at best very incomplete since uploading some ISO files is something a new user will want to do very soon after the install. Your personal use-case of being the forum gadfly and messing around with PVE to find bugs or design choices you disagree with is, shall we say, a minority one. Most people want to do stuff with it.

You are also much more adept with Linux than the average person and aren't the kind of person who posts here for advice on partition sizes.
 
  • Like
Reactions: Neobin
Well... Just like in windows, What is the best implementation.
There is no "best implementation", it always depends on what you want and this is not Windows, this is Linux with so much freedom to choose what you want. This freedom of choice is not for everyone, especially if you don't know what you want.

For me, the best implementation for a single host is using ZFS, which is a filesystem and a volume manager so that you don't have to care about partitions or where do you have space where not. This is already taken care of. Partitioning is so 1990. There has been so much great stuff happening in the last 35 years .. of course not in consumer Windows world ... but in all non-windows operating systems and that's volume managers.

If you want to seperate the OS and the data, which you cannot do completely by the way because /etc/pve is always on the OS and holds the configuration of your VMs, you need to have at least two disks. The PVE installer is not able to just use a partition for the install, it always uses the whole disk.
 
  • Like
Reactions: UdoB
The PVE installer is not able to just use a partition for the install, it always uses the whole disk.

I don't see anyone mention Debian installer [1] on this thread. That way, you can partition all you want, including having full-disk encryption or you can have the root outside of LVM.

Also, having a dissenting opinion here, I would definitely e.g. NOT want to have ZFS on root of any Linux.

[1] https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm
 
The PVE installer is not able to just use a partition for the install, it always uses the whole disk.

Also, this is factually incorrect, I see people do not use the options on their install at all, mentioned in my post above.

E.g. selecting hdsize 16, swapsize 0, maxroot 16, minfree 8, maxvz 0, you get:

Code:
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS FSTYPE 
vda          253:0    0  256G  0 disk       
├─vda1       253:1    0 1007K  0 part       
├─vda2       253:2    0    1G  0 part             vfat
└─vda3       253:3    0   15G  0 part             LVM2_member
  └─pve-root 252:0    0  7.5G  0 lvm  /           xfs



Disk /dev/vda: 256 GiB, 274877906944 bytes, 536870912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 77B10729-DC07-48A6-B58C-0C17C49823DA

Device       Start      End  Sectors  Size Type
/dev/vda1       34     2047     2014 1007K BIOS boot
/dev/vda2     2048  2099199  2097152    1G EFI System
/dev/vda3  2099200 33554432 31455233   15G Linux LVM


Disk /dev/mapper/pve-root: 7.5 GiB, 8048869376 bytes, 15720448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

This is a really nice partitioning if you don't mind the LVM.

Post-install (no CEPH):

Code:
# du -shx /
2.5G    /

# apt update -y && apt full-upgrade -y
...

# du -shx /
3.3G    /

# apt clean
# du -shx /
3.2G    /

# du -shx /var/cache/
134M    /var/cache/

# dpkg --list | grep proxmox-kernel
ii  proxmox-kernel-6.8                   6.8.12-2                            all          Latest Proxmox Kernel Image
ii  proxmox-kernel-6.8.12-2-pve-signed   6.8.12-2                            amd64        Proxmox Kernel Image (signed)
ii  proxmox-kernel-6.8.4-2-pve-signed    6.8.4-2                             amd64        Proxmox Kernel Image (signed)
ii  proxmox-kernel-helper                8.1.0                               all          Function for various kernel maintenance tasks.
 
Last edited:
We did 2 experimental installation as linux desktops to look of useability and upgradeability, once a proxmox pve inst. with X and xfce, the other with debian upgraded to "pve" and X and xfce also. The debimox is nice as it allows luks encryption and the absence of lvm too but has all the wonderfull pve (and standard linux) possibilities, my personal new favorite :)
 
  • Like
Reactions: esi_y
We did 2 experimental installation as linux desktops to look of useability and upgradeability, once a proxmox pve inst. with X and xfce

That would be ~4GB. ;)

The debimox is nice as it allows luks encryption and the absence of lvm too but has all the wonderfull pve (and standard linux) possibilities, my personal new favorite :)

I do not like to run anything extra (xfce) on the host, especially if you depend on the local firewall, etc. But for homelab, sure, why not!
 
Last edited:
Also, this is factually incorrect, I see people do not use the options on their install at all, mentioned in my post above.
Sorry, I wasn't clear enough ... I meant to only USE a partion of the disk while keeping everything else intact. Of course can you install PVE on just a small partition, yet everything else will be wiped on the disk.
 

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!