Snapshot, deleting files, free space

Status
Not open for further replies.

FireBIade

Dabbler
Joined
Jan 4, 2012
Messages
25
I have a question about snapshots,

What happens if I take a snapshot and then afterwards delete some of the files on my Cifs share?

Does it:

a) give me the free space back thus corrupting the snapshot
b) reserve the space taken by those files included in the snaphot and pretend to give the space back? e.g. the data is still recoverable
c) reserve the space and not give the free space back
d) none of the above

if the answer is b, what happens if I then fill my drive up? Does that overwrite the snapshot data or is this prevented by the system?
 

FireBIade

Dabbler
Joined
Jan 4, 2012
Messages
25
Ok after a bit of experimenting I found out what it does. It's option c

Whilst the data is still available on the drive (i.e. not deleted yet) the snapshots of that data remain tiny. However when you delete the files contained within a snapshot that space cannot obviously be freed again until the relating snapshot/s are also deleted in which case the snapshot effectively reserves that space hence you see your snapshot suddenly shoot up in size and actually the total size of the device is reduced by that same amount.

So for instance in my case running out of disc space is the worst case scenario as it's a production environment with data constantly going on and off the server, so, it's imperative that snapshots lifetime is short so as not to reserve too much space on the server which would potentially cause us to run out of disc space or get into a grid lock where data is not coming off the server faster then it's going on.
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
Ok after a bit of experimenting I found out what it does. It's option c

Whilst the data is still available on the drive (i.e. not deleted yet) the snapshots of that data remain tiny. However when you delete the files contained within a snapshot that space cannot obviously be freed again until the relating snapshot/s are also deleted in which case the snapshot effectively reserves that space hence you see your snapshot suddenly shoot up in size and actually the total size of the device is reduced by that same amount.

So for instance in my case running out of disc space is the worst case scenario as it's a production environment with data constantly going on and off the server, so, it's imperative that snapshots lifetime is short so as not to reserve too much space on the server which would potentially cause us to run out of disc space or get into a grid lock where data is not coming off the server faster then it's going on.
This makes it imperative to figure out how storage is to be arranged.

Higly volatile data should be on it's own filesystem where snapshots ara short lived.
Whenever longer lifetime on snapshots are desired there should be a low rate of changes in the
filesystem.
And for longterm storage snapshots most likely not the solution, here separate volumes ( backupsets)
would fit better ( or several replicas all read-only)
 

FireBIade

Dabbler
Joined
Jan 4, 2012
Messages
25
You are right, in my circumstances it will be to get a full backup from the server and because it constantly has data going on and coming off we need a snapshot style system otherwise 'some' data would never get backedup. But of course we do not want to run out of disc space, so it will need some fine tuning of number of snapshots vs snapshot lifetime vs time it takes to replicate the snapshot.
 
Status
Not open for further replies.
Top