2012-01-30 12:55 AM
I want to restrict space for snapshot on a volume to certain percentage. As I have seen in default, if a volume is of 100GB with 20% snapshot definition.
If user has used 60 GB of space and data changes in this drive very quickly, the snaphot size will be large and then it takes space more than allocated 20%. Thus if data is deleted to create space in volume, it does not become available as free space. Is there a way to restrict it to certain size and it should remove old snapshot if new has to be created as in First In First Out.
Solved! SEE THE SOLUTION
2012-01-30 01:00 AM
It is not possible to restrict space (meaning – prevent snapshot creation if it would exceed allocated space). It is possible to configure NetApp to autodelete snapshots in this case. See “snap autodelete” command.
2012-01-31 05:41 AM
From "snap autodelete" command details, I was asking for same thing as you mentioned. I am interested in removing old snapshot if space reserved for snapshot get full. So that Data space does not get used by snapshot. Currently I have set commands as follows, will revert back if any further help is needed.
filer> snap autodelete common_vol on
filer> snap autodelete common_vol trigger snap_reserve delete_order oldest_first
2012-01-31 06:13 AM
I suppose, when autodelete triggers on snap_reserve it removes all snapshots that exists for the volume. Because as soon as I configured autodelete it removed all 5 existing snaps.
Is it possible to remove only one snap or two as per new snapshot space requirement ?
2012-01-31 07:06 AM
Normally it should not delete all snapshots - the "target free space" parameter should come into play.
Have a look at this KB:
and also the TR referred there:
2012-01-31 09:40 AM
Thanks for quick reply. As it is % of volume. That means if we define 20% reserve for snaps, and autodelete is set for "target_free_space" to 20%, so when autodelete activates it will remove all snaps to get 20% of snap_reserve free.
Now in my case I have set snap_reserve to 25% and target_free_space to 10%, I hope this will work. Will monitor it for 1 day and come back if face any issues.
2012-01-31 09:53 AM
If you are increasing snap reserve, you are actually decreasing the amount of free space in a volume
Say a volume is 100GB big & snap reserve is set to 20% - the available space in a volume is shown as 80GB, so when you populate there 40GB of data, you have 50% of free space.
Now if you increase snap reserve to 25% - available space is 75GB, and with 40GB of data you have less than 50% of free space (not bothered to calculate the actual percentage )
It is a bit confusing, as the user data cannot overflow into snap reserve space, whilst the reverse is possible.
2012-01-31 09:59 AM
It depends on target_free_space. If it set so high, that single snapshot exceeds it - yes, it will remove all snapshots. If you set target_free_space to 50% and last remaining snapshot consumes 60% of snap reserve, it will be removed.