You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows volumes to be created with insufficient available space in the zpool.
I'm raising this on behalf of the person who investigated it (thanks to reddit.com/user/Dagger0)
Describe how to reproduce the problem
Create a zvol larger than 64TB with default volblocksize 16k.
This was tested on a 12-wide RAIDZ3 zpool of 10TB disks, zpool created with ashift=12.
This example shows increments in the size of the zvol by 5TB each time with an extra examples around 64TB.
I get the correct 'out of space' error when there is insufficient space in the zpool until I create a volume larger than 64TB at which time the refreservation value overflows. All examples from 64.1TB onwards exhibit this behaviour.
nas-01:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
ZFSNAS01_zpool 1.77M 79.2T 279K /ZFSNAS01_zpool
nas-01:~# zfs create -V 45T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol;
ZFSNAS01_zpool/Testvol refreservation 66.2T local
nas-01:~# zfs create -V 50T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol;
ZFSNAS01_zpool/Testvol refreservation 73.5T local
nas-01:~# zfs create -V 55T ZFSNAS01_zpool/Testvol
cannot create 'ZFSNAS01_zpool/Testvol': out of space
nas-01:~# zfs create -V 60T ZFSNAS01_zpool/Testvol
cannot create 'ZFSNAS01_zpool/Testvol': out of space
nas-01:~# zfs create -V 63.9T ZFSNAS01_zpool/Testvol
cannot create 'ZFSNAS01_zpool/Testvol': out of space
nas-01:~# zfs create -V 64T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol
ZFSNAS01_zpool/Testvol refreservation 65.0T local
nas-01:~# zfs create -V 64.1T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol
ZFSNAS01_zpool/Testvol refreservation 1.15T local
nas-01:~# zfs create -V 64.2T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol
ZFSNAS01_zpool/Testvol refreservation 1.30T local
nas-01:~# zfs create -V 64.3T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol
ZFSNAS01_zpool/Testvol refreservation 1.44T local
nas-01:~# zfs create -V 64.4T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol
ZFSNAS01_zpool/Testvol refreservation 1.59T local
nas-01:~# zfs create -V 65T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol;
ZFSNAS01_zpool/Testvol refreservation 2.47T local
nas-01:~# zfs create -V 70T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol;
ZFSNAS01_zpool/Testvol refreservation 9.82T local
nas-01:~# zfs create -V 75T ZFSNAS01_zpool/Testvol; zfs get -H refreservation ZFSNAS01_zpool/Testvol;
ZFSNAS01_zpool/Testvol refreservation 17.2T local
Reddit user Dagger0 reported the following:
I tracked it down to this calculation: libzfs_dataset.c#L5569 which overflows uint64_t when nblocks * asize > 128T.
The text was updated successfully, but these errors were encountered:
System information
Describe the problem you're observing
The default refreservation allocation exhibits an overflow for zvols larger than 64TB for volblocksize=16k (default):
This allows volumes to be created with insufficient available space in the zpool.
I'm raising this on behalf of the person who investigated it (thanks to reddit.com/user/Dagger0)
Describe how to reproduce the problem
Create a zvol larger than 64TB with default volblocksize 16k.
This was tested on a 12-wide RAIDZ3 zpool of 10TB disks, zpool created with ashift=12.
This example shows increments in the size of the zvol by 5TB each time with an extra examples around 64TB.
I get the correct 'out of space' error when there is insufficient space in the zpool until I create a volume larger than 64TB at which time the refreservation value overflows. All examples from 64.1TB onwards exhibit this behaviour.
Reddit user Dagger0 reported the following:
The text was updated successfully, but these errors were encountered: