I've inherited a FreeNAS installation from a colleague who has left the company. The installation is used for keeping in-house rsync backups of our many web servers dotted around the world.
The storage in the FreeNAS box is running short and I've discovered we still have backups from servers which were decommissioned as far back as 2013. We don't need these old archives anymore so I'd like to remove them to free up some space.
The initial results of df -h
were:
...
raid-1 283G 261G 22G 92% /mnt/raid-1
raid-1/clone-auto-20140925.0800-2m 283G 261G 22G 92% /mnt/raid-1/clone-auto-20140925.0800-2m
...
So, in my naivety, I simply deleted the old rsync snapshots, i.e. rm -rf /mnt/raid-1/backups/old.server.1 /mnt/raid-1/backups/old.server.2
. Following that, df -h
now looks like:
...
raid-1 266G 244G 22G 92% /mnt/raid-1
raid-1/clone-auto-20140925.0800-2m 283G 261G 22G 92% /mnt/raid-1/clone-auto-20140925.0800-2m
...
O_o
I've narrowed the problem down to my lack of understanding of ZFS. Obviously, df
isn't reporting disk usage in the traditional sense I expected, nor is a naive delete going to solve my problem.
I'd be hugely grateful if anyone could:
point me in the right direction for a description of how FreeNAS utilises ZFS so I can understand it, and- offer some guidance on how to free up some space by removing copies of those ancient backups.
EDIT 1
I've been reading up and I now understand that the space is not being released because of ZFS's CoW.
Output of zfs list
:
NAME USED AVAIL REFER MOUNTPOINT
raid-1 1.76T 21.5G 245G /mnt/raid-1
raid-1/clone-auto-20140925.0800-2m 34.8G 21.5G 261G /mnt/raid-1/clone-auto-20140925.0800-2m
EDIT 2
Output of `zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
raid-1@auto-20140925.0800-2m 91.0G - 261G -
raid-1@auto-20150102.0800-2m 9.13G - 301G -
raid-1@auto-20150103.0800-2m 4.68G - 301G -
raid-1@auto-20150104.0800-2m 4.70G - 302G -
raid-1@auto-20150105.0800-2m 4.63G - 302G -
raid-1@auto-20150106.0800-2m 15.5G - 297G -
raid-1@auto-20150107.0800-2m 15.6G - 297G -
raid-1@auto-20150108.0800-2m 15.7G - 297G -
raid-1@auto-20150109.0800-2m 16.0G - 297G -
raid-1@auto-20150110.0800-2m 15.9G - 297G -
raid-1@auto-20150111.0800-2m 16.2G - 298G -
raid-1@auto-20150112.0800-2m 15.2G - 297G -
raid-1@auto-20150113.0800-2m 13.8G - 297G -
raid-1@auto-20150114.0800-2m 14.1G - 298G -
raid-1@auto-20150115.0800-2m 19.1G - 298G -
raid-1@auto-20150116.0800-2m 19.3G - 299G -
raid-1@auto-20150117.0800-2m 16.6G - 299G -
raid-1@auto-20150118.0800-2m 16.7G - 300G -
raid-1@auto-20150119.0800-2m 15.7G - 299G -
raid-1@auto-20150120.0800-2m 16.3G - 300G -
raid-1@auto-20150121.0800-2m 16.6G - 300G -
raid-1@auto-20150122.0800-2m 19.5G - 300G -
raid-1@auto-20150123.0800-2m 19.8G - 299G -
raid-1@auto-20150124.0800-2m 17.4G - 299G -
raid-1@auto-20150125.0800-2m 17.6G - 300G -
raid-1@auto-20150126.0800-2m 16.4G - 299G -
raid-1@auto-20150127.0800-2m 16.9G - 300G -
raid-1@auto-20150128.0800-2m 17.5G - 297G -
raid-1@auto-20150129.0800-2m 20.0G - 297G -
raid-1@auto-20150130.0800-2m 20.2G - 297G -
raid-1@auto-20150131.0800-2m 5.43G - 297G -
raid-1@auto-20150201.0800-2m 5.46G - 302G -
raid-1@auto-20150202.0800-2m 16.7G - 307G -
raid-1@auto-20150203.0800-2m 16.8G - 308G -
raid-1@auto-20150204.0800-2m 17.2G - 309G -
raid-1@auto-20150205.0800-2m 20.5G - 309G -
raid-1@auto-20150206.0800-2m 17.4G - 309G -
raid-1@auto-20150207.0800-2m 17.7G - 310G -
raid-1@auto-20150208.0800-2m 17.8G - 311G -
raid-1@auto-20150209.0800-2m 575M - 310G -
raid-1@auto-20150210.0800-2m 575M - 310G -
raid-1@auto-20150211.0800-2m 20.9G - 309G -
raid-1@auto-20150212.0800-2m 21.0G - 309G -
raid-1@auto-20150213.0800-2m 20.6G - 306G -
raid-1@auto-20150214.0800-2m 17.8G - 306G -
raid-1@auto-20150215.0800-2m 18.1G - 308G -
raid-1@auto-20150216.0800-2m 561M - 307G -
raid-1@auto-20150217.0800-2m 561M - 307G -
raid-1@auto-20150218.0800-2m 20.7G - 308G -
raid-1@auto-20150219.0800-2m 21.3G - 308G -
raid-1@auto-20150220.0800-2m 21.6G - 308G -
raid-1@auto-20150221.0800-2m 18.9G - 309G -
raid-1@auto-20150222.0800-2m 19.1G - 310G -
raid-1@auto-20150223.0800-2m 18.0G - 309G -
raid-1@auto-20150224.0800-2m 18.2G - 309G -
raid-1@auto-20150225.0800-2m 18.6G - 310G -
raid-1@auto-20150226.0800-2m 19.1G - 310G -
raid-1@auto-20150227.0800-2m 22.1G - 238G -
raid-1@auto-20150228.0800-2m 19.4G - 238G -
raid-1@auto-20150301.0800-2m 12.2G - 239G -
raid-1@auto-20150302.0800-2m 314M - 245G -
raid-1/clone-auto-20140925.0800-2m@auto-20150102.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150103.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150104.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150105.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150106.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150107.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150108.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150109.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150110.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150111.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150112.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150113.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150114.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150115.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150116.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150117.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150118.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150119.0800-2m 584M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150120.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150121.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150122.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150123.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150124.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150125.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150126.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150127.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150128.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150129.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150130.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150131.0800-2m 584M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150201.0800-2m 584M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150202.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150203.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150204.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150205.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150206.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150207.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150208.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150209.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150210.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150211.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150212.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150213.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150214.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150215.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150216.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150217.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150218.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150219.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150220.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150221.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150222.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150223.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150224.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150225.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150226.0800-2m 584M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150227.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150228.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150301.0800-2m 585M - 261G -
raid-1/clone-auto-20140925.0800-2m@auto-20150302.0800-2m 584M - 261G -