Reclaiming free space

Status
Not open for further replies.

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
Hi,

I am running a RAIDZ setup with about 10TB of storage. My FreeNAS is setup to take snapshots every 30 minutes for two weeks. I have deleted a few hundred gigs of data from my SMB share but it does not properly reflect on the share. I deleted the snapshots that were taken up the space (sorted by used column) however that didn't help. What am I doing wrong? I am expecting to see a lot more free space.

upload_2017-3-7_22-24-57.png

zpool list:
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
freenas-boot 59.5G 649M 58.9G - - 1% 1.00x ONLINE -
vol1 14.5T 14.0T 499G - 54% 96% 1.00x ONLINE /mnt

upload_2017-3-7_22-28-41.png
 
Last edited by a moderator:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Is your pool 96% full? Does it actually delete the files when you do that? You should check out the ref field in snapshots to do what space they use .

Sent from my Nexus 5X using Tapatalk
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
It doesn't do that. About 2TB of files were deleted, but I am only seeing 20+ GB free. I started deleting snapshots but that does not help? Do I need to delete all of the snapshots that referenced deleted files? I have about two weeks worth of snapshots. Here is an example of ref field:

upload_2017-3-8_7-18-15.png


P.S. in my original post I said it was replicating every 30 minutes. it was actually set to every 5 minutes.

Space barely increased after deleting snapshots:
upload_2017-3-8_7-19-38.png
 
Last edited by a moderator:

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
Is your pool 96% full? Does it actually delete the files when you do that? You should check out the ref field in snapshots to do what space they use .

Sent from my Nexus 5X using Tapatalk

Do those snapshots need to be deleted because they are holding the space from deleted files ? I posted a screenshot of my snapshots with the reference field.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Yes delete the snapshots if you can delete stuff.

Sent from my Nexus 5X using Tapatalk
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
How soon after deleting a snapshot should I see space increase ? I have deleted several large ones that I thought, but it only freed up a few gigs of space.
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
Yes delete the snapshots if you can delete stuff.

Sent from my Nexus 5X using Tapatalk
Yes delete the snapshots if you can delete stuff.

Sent from my Nexus 5X using Tapatalk
How soon after deleting a snapshot should I see space increase ? I have deleted several large ones that I thought, but it only freed up a few gigs of space.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
The space instantly frees up. You should probably just delete all your snapshots if you don't need them. Or find the ones that reference the most data.

Sent from my Nexus 5X using Tapatalk
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
Is there a fast way of doing it ? I have about 1600 snapshots to go through :( plus I want to keep some of them at least one for each day for the past two weeks. Do they have a concept of chain, meaning you need a precious snapshot to recover a file or are they independed of each other.

I think I over killed it with snapshots every 5 minutes for two weeks. Maybe daily snapshots would be better.
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
The space instantly frees up. You should probably just delete all your snapshots if you don't need them. Or find the ones that reference the most data.

Sent from my Nexus 5X using Tapatalk

Is there a fast way of doing it ? I have about 1600 snapshots to go through :( plus I want to keep some of them at least one for each day for the past two weeks. Do they have a concept of chain, meaning you need a precious snapshot to recover a file or are they independed of each other.

I think I over killed it with snapshots every 5 minutes for two weeks. Maybe daily snapshots would be better.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
You won't gain the free space until all the snapshots that reference the data you deleted are removed.
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
You won't gain the free space until all the snapshots that reference the data you deleted are removed.
Ahhhgg that painful. So Let's says I had 14 snapshots for the same data vs. 1600 snapshots that I have now, would the space allocated for snapshots be different or the same ?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
would the space allocated for snapshots be different or the same ?
Depends on the data referenced at the time of the snapshot. But regardless of how many you have you won't see the free space until they are all deleted.
 

snaptec

Guru
Joined
Nov 30, 2015
Messages
502
if you delete a 150gb file that was created 15 days ago and this file is referecend in just one snapshot, you have to delete every single snapshot made in the last 15 days until the 150gb are free again.
It doesn't matter if it is in 1 or 1500 snapshots.
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
if you delete a 150gb file that was created 15 days ago and this file is referecend in just one snapshot, you have to delete every single snapshot made in the last 15 days until the 150gb are free again.
It doesn't matter if it is in 1 or 1500 snapshots.
But if the time passes and the deleted file is no longer on the share will the space automatically free up? Let's say snapshots are taken for 14 days and I delete the file 13 days ago. On day 15 the snapshot will not have that file referenced so will the space free up ?
 

snaptec

Guru
Joined
Nov 30, 2015
Messages
502
Yes.
If you created it 15 or more days ago. And delete it 10 days ago.
Every snapshot from day 10-15 must be deleted.
Then the space will automatically be free


Gesendet von iPhone mit Tapatalk
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I think I over killed it with snapshots every 5 minutes for two weeks. Maybe daily snapshots would be better.
Or set up multiple snapshot tasks. Every 5 minutes that last for an hour. Hourly that last for a day. Daily that last for a week. Weekly that last for a month, etc. You don't have to do it all with one snapshot task.
 

heimos

Dabbler
Joined
Nov 9, 2016
Messages
29
Or set up multiple snapshot tasks. Every 5 minutes that last for an hour. Hourly that last for a day. Daily that last for a week. Weekly that last for a month, etc. You don't have to do it all with one snapshot task.

Will that save space ?
 

snaptec

Guru
Joined
Nov 30, 2015
Messages
502
only when you create a file in the morning, delete it 3 hours later and have the snapshot valid for just one day f.e.
 
Status
Not open for further replies.
Top