ZFS Storage - Free space?

Jasper Möller

New Member
Mar 27, 2017
2
0
1
51
Hi all,

I'm using ZFS as storage and are now a bit confused as to how much space is actually available:

Code:
zpool list
NAME       SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
zfsdata1   464G   280G   184G         -    41%    60%  1.00x  ONLINE  -

Which is consistent with the actual size of the images:

Code:
pvesm list zfsdata1
zfsdata1:vm-100-disk-2                                 raw 21474836480 100
zfsdata1:vm-101-disk-1                                 raw 21474836480 101
zfsdata1:vm-102-disk-1                                 raw 107374182400 102
zfsdata1:vm-102-state-After_Migration                  raw 4821100790 102
zfsdata1:vm-103-disk-1                                 raw 107374182400 103
zfsdata1:vm-103-state-After_upgrade_before_Mysql_5_6   raw 17716740096 103
zfsdata1:vm-103-state-Before_mysql_5_6                 raw 17716740096 103

should be more or less 280 GB, if I understand the numbers correctly? (yeah, I know raw images are frowned upon...)

However, the status seems to indicate the storage is nearly filled up?

Code:
pvesm status
local       dir 1       128751276         3542620       125208656 3.25%
zfsdata1  zfspool 1       471334912       453453236        17881676 96.71%

Using proxmox 4.2-2.

I would hate to have the storage fill up, of course - can someone put me on the right track?

THX in advance
JM
 
what does
Code:
zfs list
say?

do you have snapshots?
 
"zfs list -t snapshot" is your friend.

One of my ZFS file systems (not on Proxmox I should add) filled up and I couldn't figure out where the storage had gone. I had a job that automatically created Snapshots of my VM storage pool and due the number of changes going on, plus the number of snapshots I was storing (2 weeks worth, 1 every hour) the pool filled up. ooopppsssss.
 
Thanks a lot! indeed, zfs snapshot seem to be the "problem":

Code:
 zfs list -t snapshot
NAME                                                    USED  AVAIL  REFER  MOUNTPOINT
zfsdata1/vm-102-disk-1@After_Migration                 81.6G      -  96.8G  -
zfsdata1/vm-103-disk-1@After_confluence_5_10_upgrade   1.06G      -  45.9G  -
zfsdata1/vm-103-disk-1@Before_mysql_5_6                34.3M      -  46.2G  -
zfsdata1/vm-103-disk-1@After_upgrade_before_Mysql_5_6   606M      -  46.4G  -

I was misled because the storage shown for the corresponding snapshot (After_Migration) shown in the GUI is only about 5 GB - I forgot that ZFS snapshots are similar to LVM in this regard (i.e. filling up until consolidated). Seems that I have still a lot to learn oO.