Default drive partitioning is sub-optimal for small drives

shodan

Active Member
Sep 1, 2022
344
79
48
Hi,

So, I have proxmox on a very small device.

Code:
=== START OF INFORMATION SECTION ===
Device Model:     LITEON IT LST-16S9G-HP
LU WWN Device Id: 5 002303 1004f1458
Firmware Version: 9402
User Capacity:    16,013,942,784 bytes [16.0 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      < 1.8 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        Not in smartctl database 7.5/5706
ATA Version is:   ACS-3 (minor revision not indicated)
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Nov 21 16:07:04 2026 EST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

And I notice the default config is wasting a lot of it.

Code:
root@pxtext:~/thin-root-for-proxmox-0.3.43# pvs
  PV         VG  Fmt  Attr PSize  PFree
  /dev/sda3  pve lvm2 a--  14.41g 8.00m
root@pxtext:~/thin-root-for-proxmox-0.3.43# vgs
  VG  #PV #LV #SN Attr   VSize  VFree
  pve   1   3   0 wz--n- 14.41g 8.00m
root@pxtext:~/thin-root-for-proxmox-0.3.43# lvs
  LV   VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data pve twi-a-tz-- <4.70g             0.00   1.57
  root pve -wi-ao----  6.70g
  swap pve -wi-ao----  1.00g
root@pxtext:~/thin-root-for-proxmox-0.3.43# lvs -a -o +chunk_size
  LV              VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Chunk
  data            pve twi-a-tz-- <4.70g             0.00   1.57                             64.00k
  [data_tdata]    pve Twi-ao---- <4.70g                                                         0
  [data_tmeta]    pve ewi-ao----  1.00g                                                         0
  [lvol0_pmspare] pve ewi-------  1.00g                                                         0
  root            pve -wi-ao----  6.70g                                                         0
  swap            pve -wi-ao----  1.00g                                                         0
root@pxtext:~/thin-root-for-proxmox-0.3.43#

In particular 1GB of metadata and 1GB of spare metadata, when 32MB each would be sufficient

Also in this case the swap does not help anything and will probably kill the drive if kept.

And of course the thick root, is wasting space as well

I would recommend at least being a little bit smarter with metadata size (and maybe chunk size as well, hdd should get bigger chunks for throughput maybe ?)
And I would make the swap optional, and I heard "zram" is something I should setup ?

Also maybe partition level data compression ?
 
16 GB is a very special setup, maybe just go with PVE-on-Debian in order to setup everything manually. For VMs, this is not really going to fly unless you use ZFS with thin-provisioning, compression and even deduplication. I hope the main data is on the network.