Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know that ZFS reserves 1.6% disk space for copy-on-write. However, I am losing more than that. I have a ubuntu server with native ubuntu-zfs installed. The server has 45 drives, each 3TB. I am making three raidz2 arrays with 15 drives each:

#zpool create data raidz2 /dev/sd[b-p] raidz2 /dev/sd[q-z] /dev/sda[a-e] raidz2 /dev/sda[f-t]

# zpool list
NAME   SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
data   122T  1.52M   122T     0%  1.00x  ONLINE  -

# zfs list
NAME   USED  AVAIL  REFER  MOUNTPOINT
data  1.25M  98.7T   335K  /data

3000000000000 bytes * 15 * 3 = 122.78 TB. So zpool list output is correct.

3000000000000 bytes * (15 - 2) * 3 = 106.41 TB.

106.41 TB * (1 - 0.016) = 104.70 TB.

The available disk space should be (1 - 0.016) * ((3000000000000 bytes * (15-2)) * 3) = 104.7 TB.

Why is ZFS only showing 98.7T?

share|improve this question
add comment

1 Answer

zfs is reporting the actual available space, i.e. does not include the disk space required for redundancy overhead (See http://docs.oracle.com/cd/E26502_01/html/E29007/gbbti.html ).

Other internal metadata like metaslabs space maps, used to track free space, might also be part of the missing space.

Finally, the sector size (512b vs 4kB) also affects the available disk space.

share|improve this answer
    
Will reducing the sector size increase the capacity? How can I do it? –  user2101712 Apr 9 '13 at 5:39
    
The sector size is a characteristic of your disks. You might try to recreate your pool with 512b sectors (using zpool create -o ashift=9 ...) vs 4K (ashift=12) but this would likely severely affect performance. –  jlliagre Apr 10 '13 at 6:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.