Windows share, .recycle and shadow copies

Status
Not open for further replies.

Dariusz1989

Contributor
Joined
Aug 22, 2017
Messages
185
Yep, you are right, I misread the column.




Yes, you can delete it.



Correct. Deleting a snapshot only deletes data exclusive to that snapshot. For example, let's say you have 100 files. You take a snapshot. The snapshot (a read only version of the filesystem) has 100 files in it. It takes up no space because those files are the same as the active dataset. Now you add a file. The current dataset now has 101 files. You delete the snapshot. You still have those 101 files.

Let's say you have 100 files. You take a snapshot. The snapshot has 100 files in it. (And again takes up no space.) Now you delete a file on the active dataset. You don't recover any space. Why? The snapshot still has that deleted file in it. So that space cannot be freed by the system. However, the current dataset only has 99 files now. So now you delete the snapshot. You still have those 99 files in the active dataset, but you free up the space from the file you deleted because the snapshot that contained that file has been deleted.

Make sense?
Yep all clear, I had a feeling it works this way, was just not 100% sure. Better ask than to be sorry. So in my case I have 2 weeks worth of bin folders.I take there is no way to remove just a bin folder from all existing snapshots and I have to wipe out all my snapshots right?
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
You may have to wipe out all snapshots, yes. Depends on what is in each of them really. Using the 100 files analogy, let's say you start with 100 files. You snapshot 1x/day for 2 weeks. Now you have 14 snapshots. You delete a file in the active dataset and are down to 99 files. No space is freed up. You delete the 1st snapshot from 14 days ago. No space is freed up. Why? You have 13 other snapshots that have 100 files in them. The deleted file is in all 13 remaining snapshots. The space from that file will not be freed until there are no more snapshots that contain the file.

So in this example you would have to delete all 14 snapshots to free the space.

This is likely what's happening in your actual case. But I would start with that manual snapshot you took and see what happens. Otherwise, yes, you probably will end up having to delete all of them.
 

Dariusz1989

Contributor
Joined
Aug 22, 2017
Messages
185
Hey

Yep, it was .recycle being stored in snapshots. Once I removed recycle&snapshots everything went down and I recovered all the space I was after. I guess my wish from freenas would be to allow me to exclude directories from snapshooting so I can avoid it in future or set up some kind of task that clears up recycle every day after files were in there for like 1-3 days.

Thanks for help! my Nas survived :- )

Regards
Dariusz
 
Status
Not open for further replies.
Top