[solved]raid-z2 shows just a small part of all available diskspace

hboetes2

New Member
Jun 27, 2024
1
0
1
Hi there,

I just set up a new proxmox host with 12 8Tb disks,

Code:
root@manny ~ #  diskinfo
KNAME TYPE  SIZE MODEL               SERIAL
sda   disk  7.3T ST8000NM017B-2TJ103 WWZ3HRXT
sda1  part 1007K                     
sda2  part    1G                     
sda3  part  475G                     
sdb   disk  7.3T ST8000NM017B-2TJ103 WWZ3HRVS
sdb1  part 1007K                     
sdb2  part    1G                     
sdb3  part  475G                     
sdc   disk  7.3T ST8000NM017B-2TJ103 WRQ28EGQ
sdc1  part 1007K                     
sdc2  part    1G                     
sdc3  part  475G                     
sdd   disk  7.3T ST8000NM017B-2TJ103 WWZ3HS46
sdd1  part 1007K                     
sdd2  part    1G                     
sdd3  part  475G                     
sde   disk  7.3T ST8000NM017B-2TJ103 WWZ4G0DN
sde1  part 1007K                     
sde2  part    1G                     
sde3  part  475G                     
sdf   disk  7.3T ST8000NM017B-2TJ103 WWZ4FZYB
sdf1  part 1007K                     
sdf2  part    1G                     
sdf3  part  475G                     
sdg   disk  7.3T ST8000NM017B-2TJ103 WWZ3HRTP
sdg1  part 1007K                     
sdg2  part    1G                     
sdg3  part  475G                     
sdh   disk  7.3T ST8000NM017B-2TJ103 WWZ4FHWA
sdh1  part 1007K                     
sdh2  part    1G                     
sdh3  part  475G                     
sdi   disk  7.3T ST8000NM017B-2TJ103 WWZ3HRW8
sdi1  part 1007K                     
sdi2  part    1G                     
sdi3  part  475G                     
sdj   disk  7.3T ST8000NM017B-2TJ103 WWZ55EFE
sdj1  part 1007K                     
sdj2  part    1G                     
sdj3  part  475G                     
sdk   disk  7.3T ST8000NM017B-2TJ103 WWZ55EF3
sdk1  part 1007K                     
sdk2  part    1G                     
sdk3  part  475G                     
sdl   disk  7.3T ST8000NM017B-2TJ103 WWZ55EHQ
sdl1  part 1007K                     
sdl2  part    1G                     
sdl3  part  475G                     
root@manny ~ #  zpool status
  pool: rpool
 state: ONLINE
config:

    NAME                                        STATE     READ WRITE CKSUM
    rpool                                       ONLINE       0     0     0
      raidz2-0                                  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ3HRXT-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ3HRVS-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WRQ28EGQ-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ3HS46-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ4G0DN-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ4FZYB-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ3HRTP-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ4FHWA-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ3HRW8-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ55EFE-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ55EF3-part3  ONLINE       0     0     0
        ata-ST8000NM017B-2TJ103_WWZ55EHQ-part3  ONLINE       0     0     0

errors: No known data errors

Just like I did for another host, albeit that one had much smaller SSDs. That host did get 6TB of the 8TB of the total disk space. With this host, there's just 4 TB available.

Code:
root@manny ~ #  df
Filesystem             Size  Used Avail Use% Mounted on
udev                    32G     0   32G   0% /dev
rpool/ROOT/pve-1       4.2T  2.7G  4.2T   1% /
efivarfs               128K   53K   71K  43% /sys/firmware/efi/efivars
rpool/var-lib-vz       4.2T  256K  4.2T   1% /var/lib/vz
rpool                  4.2T  256K  4.2T   1% /rpool
rpool/data             4.2T  256K  4.2T   1% /rpool/data
rpool/ROOT             4.2T  256K  4.2T   1% /rpool/ROOT
/dev/fuse              128M  132K  128M   1% /etc/pve
snoopy:/proxmox_share  1.3T   17G  1.3T   2% /mnt/pve/proxmox_share


I suspect this is because I accidentally selected the installation SSD as install medium, which I then removed from the install disks. The installation went fine, but somehow kept the size of the install SSD as the right disk size.

With a bit of googling, I found the solution: First set the autoexpand feature on your pool:

zpool set autoexpand=on rpool

And then for each hard disk, enter the following commands (C&P does not work here):

parted /dev/sdl
print
resizepart 3 100%
print
q


References:
https://blog.doussan.info/posts/how-to-expand-a-zfs-pool-partitions/
https://serverfault.com/questions/946055/increase-the-zfs-partition-to-use-the-entire-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!