SOLVED Space not reclaimed after deleting files

Status
Not open for further replies.

zaggynl

Dabbler
Joined
Jan 22, 2016
Messages
17
zfs list shows:
Code:
NAME													   USED  AVAIL  REFER  MOUNTPOINT
zfsdump												   5.80T  1.02T  3.67T  /mnt/zfsdump

du -sh /mnt/zfsdump/ shows:
Code:
3.7T	/mnt/zfsdump"

Cleaned up snapshots and did a scrub without results.

zfs list -t snapshot -o space shows:
Code:
NAME															 AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
freenas-boot/ROOT/11.1-U2@2017-10-21-07:03:42						-  7.12M		 -	   -			  -		  -
freenas-boot/ROOT/11.1-U2@2017-11-18-20:10:13						-  16.0M		 -	   -			  -		  -
freenas-boot/ROOT/11.1-U2@2017-12-27-17:16:13						-   743M		 -	   -			  -		  -
freenas-boot/ROOT/11.1-U2@2018-01-23-20:55:43						-   832M		 -	   -			  -		  -
freenas-boot/ROOT/11.1-U2@2018-02-24-14:08:39						-   833M		 -	   -			  -		  -
zfsdump@auto-20180209.1400-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180209.1500-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180209.1600-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180209.1700-3m										-   151K		 -	   -			  -		  -
zfsdump@auto-20180209.1800-3m										-   151K		 -	   -			  -		  -
zfsdump@auto-20180209.1900-3m										-   151K		 -	   -			  -		  -
zfsdump@auto-20180209.2000-3m										-   151K		 -	   -			  -		  -
zfsdump@auto-20180209.2100-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180209.2200-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180209.2300-3m										-   128K		 -	   -			  -		  -
zfsdump@auto-20180210.0900-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180210.1000-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180210.1100-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180210.1200-3m										-	  0		 -	   -			  -		  -
zfsdump@auto-20180210.1300-3m										-	  0		 -	   -			  -		  -
zfsdump/.system@backup											   -   105K		 -	   -			  -		  -
zfsdump/.system/configs-e2eccb3703ad46d2b19f2e4809443384@backup	  -   116K		 -	   -			  -		  -
zfsdump/.system/cores@backup										 -  1.12M		 -	   -			  -		  -
zfsdump/.system/rrd-e2eccb3703ad46d2b19f2e4809443384@backup		  -	  0		 -	   -			  -		  -
zfsdump/.system/samba4@backup										-   308K		 -	   -			  -		  -
zfsdump/.system/syslog-e2eccb3703ad46d2b19f2e4809443384@backup	   -  11.2M		 -	   -			  -		  -
zfsdump/jails/.warden-template-standard-10.3-x64@clean			   -  93.3M		 -	   -			  -		  -

zfs list -t all -o space zfsdump shows below:
Code:
NAME	 AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
zfsdump  1.03T  5.80T	 2.09T   3.67T			  0	  29.9G

Which suggests 2.09T used by snapshots, I don't understand.
 

Attachments

  • freenas_space.jpg
    freenas_space.jpg
    93.4 KB · Views: 835
Last edited by a moderator:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Sir,

That first command,
Code:
zfs list -t snapshot -o space 
is probably not what you wanted.

try
Code:
zfs list -t filesystem -o space
. This will show you the size of the blocks used by snapshots thereto associated in the "USEDSNAP" column, broken out by every dataset.

I think you'll find your mystery space is somewhere in there.
 

zaggynl

Dabbler
Joined
Jan 22, 2016
Messages
17
Sir,

That first command,
Code:
zfs list -t snapshot -o space 
is probably not what you wanted.

try
Code:
zfs list -t filesystem -o space
. This will show you the size of the blocks used by snapshots thereto associated in the "USEDSNAP" column, broken out by every dataset.

I think you'll find your mystery space is somewhere in there.


Thanks for replying.
zfs list -t filesystem -o space shows:
Code:
NAME													  AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
zfsdump												   1.02T  5.81T	 2.09T   3.68T			  0	  30.0G

So the 3.68T(usedbydataset) adds up, not sure where the 2.09T(usedbysnapshots) comes from.

Full output:
root@freenas:/ # zfs list -t filesystem -o space
Code:
NAME													  AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
freenas-boot											  23.8G  3.85G		 0	 64K			  0	  3.85G
freenas-boot/ROOT										 23.8G  3.83G		 0	 29K			  0	  3.83G
freenas-boot/ROOT/11.0-U4								 23.8G   116K		 0	116K			  0		  0
freenas-boot/ROOT/11.1-RELEASE							23.8G  7.20M		 0   7.20M			  0		  0
freenas-boot/ROOT/11.1-U1								 23.8G  8.23M		 0   8.23M			  0		  0
freenas-boot/ROOT/11.1-U2								 23.8G  3.82G	 2.99G	847M			  0		  0
freenas-boot/ROOT/Initial-Install						 23.8G	 1K		 0	  1K			  0		  0
freenas-boot/ROOT/default								 23.8G   169K		 0	169K			  0		  0
freenas-boot/grub										 23.8G  6.85M		 0   6.85M			  0		  0
zfsdump												   1.02T  5.81T	 2.09T   3.68T			  0	  30.0G
zfsdump/.system										   1.02T  94.6M	  105K	151K			  0	  94.4M
zfsdump/.system/configs-e2eccb3703ad46d2b19f2e4809443384  1.02T  76.0M	  116K   75.9M			  0		  0
zfsdump/.system/cores									 1.02T  3.26M	 1.12M   2.14M			  0		  0
zfsdump/.system/rrd-e2eccb3703ad46d2b19f2e4809443384	  1.02T   140K		 0	140K			  0		  0
zfsdump/.system/samba4									1.02T  1.07M	  308K	790K			  0		  0
zfsdump/.system/syslog-e2eccb3703ad46d2b19f2e4809443384   1.02T  13.9M	 11.2M   2.70M			  0		  0
zfsdump/iohyve											1.02T   279K		 0	140K			  0	   140K
zfsdump/iohyve/Firmware								   1.02T   140K		 0	140K			  0		  0
zfsdump/jails											 1.02T  15.1G		 0   69.4M			  0	  15.1G
zfsdump/jails/.warden-template-VirtualBox-4.3.12		  1.02T   763M		 0	763M			  0		  0
zfsdump/jails/.warden-template-pluginjail-9.3-x64		 1.02T   547M		 0	547M			  0		  0
zfsdump/jails/.warden-template-standard-10.3-x64		  1.02T  2.19G	 93.3M   2.10G			  0		  0
zfsdump/jails/.warden-template-standard-9.3-x64		   1.02T  2.12G		 0   2.12G			  0		  0
zfsdump/jails/MiniDLNA									1.02T  3.22G		 0   3.22G			  0		  0
zfsdump/jails/mumble2									 1.02T  1.69G		 0   1.69G			  0		  0
zfsdump/jails/plexmediaserver_1						   1.02T  4.56G		 0   4.56G			  0		  0
 
Last edited by a moderator:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
That certainly is very strange. It indicates the main dataset, 'zfsdump', has the snapshots. Yet, you are saying, that parent dataset has no snapshots......
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I still see a bunch of snapshots. Note that total space used by snapshots is not the sum of the USED property of each snapshot. Data shared by snapshots is not included in any snapshot until it ceases being shared by multiple snapshots.
 

zaggynl

Dabbler
Joined
Jan 22, 2016
Messages
17
I've just removed all but one snapshot and USEDSNAP is now down to 0.
zfs list -o space now shows:

Code:
NAME													  AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
zfsdump												   1.74T  5.08T		 0   3.69T			  0	  1.40T


One of the removed snapshots was a recursive snapshot from ages ago.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Check again in a while. Deletes happen asynchronously because they take a while.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Don't forget to update the bug ticket, so that it doesn't linger around unnecessarily.
 
Status
Not open for further replies.
Top