# ZFS: where did my free space go to



## hashime (Jul 7, 2016)

Hello,

I am using a simple zraid1 pool which looks like this:

```
NAME     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
zroot   18.1T  11.7T  6.43T         -    27%    64%  1.00x  ONLINE  -
```

As you can see, I have been very imaginative with the poolname, but thats besides the point now. It shows 6.43T Free.
However when looking at it via `zfs list` I get this output:

```
NAME                   USED  AVAIL  REFER  MOUNTPOINT
...
zroot/whatever         9.34T  4.69T   166K  /mnt/whatever
zroot/whatever/a     153K  4.69T   153K  /mnt/whatever/a
zroot/whatever/b   2.34T  4.69T  2.34T  /mnt/whatever/b
...
```
Which shows only 4.69T free space. I have no quotas or reservations or anything, where did my 1.74T go?


----------



## gkontos (Jul 7, 2016)

The first one shows the total bytes of storage available in the pool. The second shows the total bytes of storage available to the filesystem, after redundancy is taken into account.


----------



## SirDice (Jul 7, 2016)

Also, don't forget about snapshots. At first a snapshot will barely use any data. But the more the actual filesystem is changed the bigger the snapshots will get.


----------



## hashime (Jul 7, 2016)

There are no snapshots in the pool.
If `zpool list` shows 6.43T, should not the redundancy be already taken into account? That is very misleading.

Thanks for the clarification.


----------



## gkontos (Jul 7, 2016)

I know it can be misleading .....


```
root@storage:~ # zpool list storage
NAME      SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
storage   130T  66.0T  64.0T         -    19%    50%  1.00x  ONLINE  -
```


```
root@storage:~ # zfs list storage
NAME      USED  AVAIL  REFER  MOUNTPOINT
storage  44.0T  39.9T  44.0T  /storage
```


----------



## phoenix (Jul 10, 2016)

`zpool list` shows the raw storage available in the pool.

`zfs list` shows the usable storage available to filesystems.

Think of it like the difference between the unformatted and formatted sizes of disks running different filesystems.


----------

