accidentally increased the proxmox host sda3 to max

AN00b

New Member
Jan 7, 2025
14
1
3
i ssh'd into the wrong hostname and instead of running cfdisk on the VM i ran in on the proxmox node and resized it to max capacity
not sure possible issues down the road
 
and instead of running cfdisk on the VM i ran in on the proxmox node
Running commands on the wrong system happened to all of us. Bt;dt.

There is no question in your post...

On my systems sdx3 points to the largest part of a disk - being used for ZFS. (And there is not much space after it.)

Please describe your system verbally, especially the storage part. Then add the current output of
  • lsblk /dev/sda; lsblk -f /dev/sda
  • fdisk -l /dev/sda
  • zpool status; zpool list -v
... and/or whatever makes sense. Please use "</>"-tags for this.

Enlarging a partition does not affect the "client" application - usually. (Shrinking is dangerous...)
 
Running commands on the wrong system happened to all of us. Bt;dt.

There is no question in your post...

On my systems sdx3 points to the largest part of a disk - being used for ZFS. (And there is not much space after it.)

Please describe your system verbally, especially the storage part. Then add the current output of
  • lsblk /dev/sda; lsblk -f /dev/sda
  • fdisk -l /dev/sda
  • zpool status; zpool list -v
... and/or whatever makes sense. Please use "</>"-tags for this.

Enlarging a partition does not affect the "client" application - usually. (Shrinking is dangerous...)

I was doing this pretty early before i had all my coffees...im concerned about potential issues down the road
im not sure about how proxmox uses the free space
also i only ran cfdisk but did not run resize2fs

Code:
# lsblk /dev/sda; lsblk -f /dev/sda
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                            8:0    0 931.5G  0 disk
|-sda1                         8:1    0  1007K  0 part
|-sda2                         8:2    0     1G  0 part
`-sda3                         8:3    0 930.5G  0 part
  |-pve-swap                 252:0    0     8G  0 lvm  [SWAP]
  |-pve-root                 252:1    0    96G  0 lvm  /
  |-pve-data_tmeta           252:2    0   8.1G  0 lvm 
  | `-pve-data-tpool         252:4    0 793.8G  0 lvm 
  |   |-pve-data             252:5    0 793.8G  1 lvm 
  |   |-pve-vm--110--disk--0 252:6    0     2G  0 lvm 
  |   |-pve-vm--113--disk--0 252:7    0    30G  0 lvm 
  |   |-pve-vm--116--disk--0 252:8    0     5G  0 lvm 
  |   |-pve-vm--118--disk--0 252:9    0    10G  0 lvm 
  |   `-pve-vm--122--disk--0 252:10   0     7G  0 lvm 
  `-pve-data_tdata           252:3    0 793.8G  0 lvm 
    `-pve-data-tpool         252:4    0 793.8G  0 lvm 
      |-pve-data             252:5    0 793.8G  1 lvm 
      |-pve-vm--110--disk--0 252:6    0     2G  0 lvm 
      |-pve-vm--113--disk--0 252:7    0    30G  0 lvm 
      |-pve-vm--116--disk--0 252:8    0     5G  0 lvm 
      |-pve-vm--118--disk--0 252:9    0    10G  0 lvm 
      `-pve-vm--122--disk--0 252:10   0     7G  0 lvm 
NAME                         FSTYPE      FSVER    LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                                           
|-sda1                                                                                                       
|-sda2                       vfat        FAT32          F24C-BCB2                                             
`-sda3                       LVM2_member LVM2 001       ZW3TvJ-JFGh-7zUu-aaaB-IX46-gfuJ-xLHaoR               
  |-pve-swap                 swap        1              f2098100-79f4-45dd-9f98-a7ec3142521f                  [SWAP]
  |-pve-root                 ext4        1.0            1d79693f-4568-4dce-97ef-66b29b8fdbdc     82.8G     7% /
  |-pve-data_tmeta                                                                                           
  | `-pve-data-tpool                                                                                         
  |   |-pve-data                                                                                             
  |   |-pve-vm--110--disk--0                                                                                 
  |   |-pve-vm--113--disk--0                                                                                 
  |   |-pve-vm--116--disk--0                                                                                 
  |   |-pve-vm--118--disk--0                                                                                 
  |   `-pve-vm--122--disk--0                                                                                 
  `-pve-data_tdata                                                                                           
    `-pve-data-tpool                                                                                         
      |-pve-data                                                                                             
      |-pve-vm--110--disk--0                                                                                 
      |-pve-vm--113--disk--0                                                                                 
      |-pve-vm--116--disk--0                                                                                 
      |-pve-vm--118--disk--0                                                                                 
      `-pve-vm--122--disk--0                                                                                 

# fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 870
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: F64E1115-CFBE-4AB9-8D5B-BB148F12BFB0

Device       Start        End    Sectors   Size Type
/dev/sda1       34       2047       2014  1007K BIOS boot
/dev/sda2     2048    2099199    2097152     1G EFI System
/dev/sda3  2099200 1953525134 1951425935 930.5G Linux LVM

# zpool status; zpool list -v
no pools available
no pools available
 
I can see the partition is 930.5G while the PV is 793.8G. Since this is LVM pvs might be of interest as well. This shouldn't really hurt anything but if it bothers you you should be able to shrink the partition to slighly bigger than the PV if you really wanted to.
 
Last edited:
  • Like
Reactions: AN00b
As long as you have only enlarged the partition, no harm has been done. LVM would require a separate pvresize command to make use of the additional space. However, I strongly suspect that you haven't actually changed anything.

By default, Proxmox uses almost the entire boot disk for the LVM partition. The 793.8 GiB shown in your output is the size of the LVM thin pool, not the physical volume.

The remaining space is used by the root and swap volumes, thin-pool metadata (including a spare metadata volume), and some free space reserved within the volume group.

Your partition layout looks perfectly normal for a standard Proxmox installation.

To verify, please post the output of:

pvs -o pv_name,pv_size,pv_free
vgs
lvs -a

I would not attempt to shrink anything at this point.
 
  • Like
Reactions: AN00b
As long as you have only enlarged the partition, no harm has been done. LVM would require a separate pvresize command to make use of the additional space. However, I strongly suspect that you haven't actually changed anything.

By default, Proxmox uses almost the entire boot disk for the LVM partition. The 793.8 GiB shown in your output is the size of the LVM thin pool, not the physical volume.

The remaining space is used by the root and swap volumes, thin-pool metadata (including a spare metadata volume), and some free space reserved within the volume group.

Your partition layout looks perfectly normal for a standard Proxmox installation.

To verify, please post the output of:

pvs -o pv_name,pv_size,pv_free
vgs
lvs -a

I would not attempt to shrink anything at this point.
thanks, i t was around 6am when i did this....freaked me out for a minute
ignore th issue with vm-110; i was tryng to to fix when i messed up; its been restored from a backup

Code:
~# pvs -o pv_name,pv_size,pv_free
  PV         PSize    PFree
  /dev/sda3  <930.00g 16.00g

~# vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  pve   1  10   0 wz--n- <930.00g 16.00g

~# lvs -a
  WARNING: Thin volume pve/vm-110-disk-0 maps <4.57 GiB while the size is only 2.00 GiB.
  LV              VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data            pve twi-aotz-- <793.80g             6.98   0.44                           
  [data_tdata]    pve Twi-ao---- <793.80g                                                   
  [data_tmeta]    pve ewi-ao----   <8.10g                                                   
  [lvol0_pmspare] pve ewi-------   <8.10g                                                   
  root            pve -wi-ao----   96.00g                                                   
  swap            pve -wi-ao----    8.00g                                                   
  vm-108-disk-0   pve Vwi---tz--    7.00g data                                               
  vm-110-disk-0   pve Vwi-a-tz--    2.00g data        100.00                                 
  vm-113-disk-0   pve Vwi-aotz--   30.00g data        98.08                                 
  vm-116-disk-0   pve Vwi-aotz--    5.00g data        68.33                                 
  vm-117-disk-0   pve Vwi---tz--    2.00g data                                               
  vm-118-disk-0   pve Vwi-aotz--   10.00g data        84.61                                 
  vm-122-disk-0   pve Vwi-aotz--    7.00g data        52.62
 
Your LVM layout looks perfectly normal for a standard Proxmox installation.

The 793.8 GiB mentioned earlier is the size of the thin pool, not the physical volume.

Your PV is approximately 930 GiB, with 16 GiB of unallocated space remaining in the volume group, which is the Proxmox installer default.

There is a small difference of approximately 512 MiB between the partition size (930.5 GiB) and the PV size (930 GiB). This might actually be the space you added using cfdisk.

Since you haven't run pvresize, LVM hasn't incorporated that additional space. There is no need to shrink the partition or to incorporate the 512 MByte to the PV.

However, the warning concerning vm-110-disk-0 is unrelated and worth investigating separately. It suggests that this thin volume may have been shrunk without releasing all its previous mappings.