Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root dataset (or any other dataset) on new zpool smaller than it should be #1089

Closed
indigophox opened this issue Nov 15, 2012 · 1 comment
Closed
Labels
Type: Documentation Indicates a requested change to the documentation
Milestone

Comments

@indigophox
Copy link

The following is so far inexplicable. The numbers add up just fine in the first case, but even with (power of 2)+2 disks in the second case, a bunch of space has gone AWOL:

root@medusa:# zpool create -o ashift=12 medusa0 raidz2 $(ls /dev/disk/by-id/scsi-SATA_ST3000DM001-9YN_???????? | head -n 6)
root@medusa:
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
medusa0 16.2T 1.58M 16.2T 0% 1.00x ONLINE -
root@medusa:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
medusa0 919K 10.7T 272K /medusa0

(4/6) * 16.2T = 10.8T

root@medusa:# zpool create -o ashift=12 medusa0 raidz2 $(ls /dev/disk/by-id/scsi-SATA_ST3000DM001-9YN_???????? | head -n 10)
root@medusa:
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
medusa0 27.2T 1.35M 27.2T 0% 1.00x ONLINE -
root@medusa:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
medusa0 1.03M 20.4T 311K /medusa0

(8/10) * 27.2T = 21.76T

root@medusa:# zpool create -o ashift=12 medusa0 raidz2 $(ls /dev/disk/by-id/scsi-SATA_ST3000DM001-9YN_???????? | head -n 12)
root@medusa:
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
medusa0 32.5T 1.58M 32.5T 0% 1.00x ONLINE -
root@medusa:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
medusa0 1.03M 24.4T 311K /medusa0

(10/12) * 32.5T = 27T

@indigophox
Copy link
Author

So, here are the ratios of actual available space on ZFS vs "ideal" (pool "size" * (non-parity disks / total disks)), multiplied by 64/63 to account for metadata block reservation, each for 3..12 disks:

raidz1:
1.0002346 0.9667880 0.9990663 0.9631981 0.9793372 0.9586220 0.9982507 0.9876543 0.9759153 0.9684182

raidz2:
0.9983580 0.9674093 0.9884843 1.0064668 0.9356725 0.9444202 0.9809246 0.9523810 0.9312169 0.9152234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Indicates a requested change to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants