ONTAP Discussions
ONTAP Discussions
Hi Folks,
The word fractional reserve is still being a ambiguous term for me.
i)Volume size when the fractional reserve is 100%-LUN Size =450 GB
Filesystem total used avail capacity Mounted on
/vol/NYC1ECHIDESX01TEMPVOL02/ 463GB 463GB 0GB 100% /vol/NYC1ECHIDESX01TEMPVOL02/
snap reserve 51GB 0GB 51GB 0% /vol/NYC1ECHIDESX01TEMPVOL02/..
ii) Volume size with Fractional reserve -50 % for same volume,.
NYCVSNNASA001> df -Vh NYC1ECHIDESX01TEMPVOL02
Filesystem total used avail capacity Mounted on
/vol/NYC1ECHIDESX01TEMPVOL02/ 463GB 454GB 8709MB 98% /vol/NYC1ECHIDESX01TEMPVOL02/
snap reserve 51GB 0GB 51GB 0% /vol/NYC1ECHIDESX01TEMPVOL02/..
I had 2 queries regarding the above
We have snap reserve 10 % for this volume and we don't have any snapshots in the volume
1. As per F.R defn it has to reserve the space once the first snapshot is created.In this case, how there is change in volume size occurs between two scenario's?
2.If F.R is reserved then the volume space needs to be comeback as 50 % when the F.R is reduced to 50%. But it was not happened in this case ,moreover the volume doesn't have any enough space for F.R to reserve a 100% LUN space.
Thanks
Saran
Solved! See The Solution
Hi,
I hope this example can make thing clearer.
To show how fractional reserve behaves, I created a volume and lun on a simulator.
I've made the whole example with lun reservation enable (i.e, the whole lun size is immediatly used in the volume and fractional reserve is enabled).
I disabled autosize and autodelete policies so we can see how fractional reserve behaves.
I choose to create a 1GB volume with a lun of 400 MB and a fractional_reserve of 50%, i.e 200 MB. It means there is still around 400 MB available in the volume for snapshots (400+200+400 MB ~ 1GB).
Don't forget, it can take some time to see the results displayed by df commands to adjust depending on ONTAP scanners (especially in a simulator).
1/ Creation of a volume of 1 GB in System Manager 2.1 as a SAN Volume.
As a default, snap reserve and fractional_reserve are set to 0.
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 0MB 1023MB 0% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB ---% /vol/vol_lun/.snapshot
filer01> snap reserve vol_lun
Volume vol_lun: current snapshot reserve is 0% or 0 k-bytes.
filer01> df -r vol_lun
Filesystem kbytes used avail reserved Mounted on
/vol/vol_lun/ 1048576 132 1048444 0 /vol/vol_lun/
/vol/vol_lun/.snapshot 0 0 0 0 /vol/vol_lun/.snapshot
filer01>
2/ I change fractional_reserve to 50% so we can see something happen
filer01> vol options vol_lun fractional_reserve 50
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 0MB 1023MB 0% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -r vol_lun
Filesystem kbytes used avail reserved Mounted on
/vol/vol_lun/ 1048576 132 1048444 0 /vol/vol_lun/
/vol/vol_lun/.snapshot 0 0 0 0 /vol/vol_lun/.snapshot
filer01>
3/ I create a 400MB lun (with reservation on). On Windows, you loose ~30 MB
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 401MB 622MB 39% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 401MB 622MB 0MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You see that used space is the whole lun size.
4/ I put a 273MB file on the lun
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 401MB 622MB 39% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 401MB 622MB 0MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You can see used space is still the same .
5/ I create a snapshot on the volume
filer01> snap create vol_lun snap1
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 552MB 471MB 54% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 552MB 471MB 150MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You can see that there is no space used in the snapshot but fractional_reserve is now active since there is a snapshot. 50% of what is used in the lun is fractional reserved, i.e 150MB.
Used space becomes lun size + fractional reserve = 300 + 150 ~ 552 MB.
6/ I delete the file in the lun, then rewrite it and fill the lun with other files
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 853MB 170MB 83% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 275MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 853MB 170MB 176MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 275MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You can see that snapshot use about the size of the delete file (273MB)
You can see that fractional reserve space is about 50% of the content of full formatted lun (365 MB /2 = 180 MB):
You can see that there is 170MB free on the volume
You can see that used space is 851 MB ~ lun size + snapshot size + fractional reserve size
7/ Creation of a new snapshot
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 854MB 170MB 83% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 275MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 854MB 170MB 176MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 275MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
8/ Deletion of the big 273MB file, then rewrite of the same file
At that time, there is only 170 MB left in the volume but 176 MB in the fractional reserve.
Every other blocks are locked in snapshots
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 1024MB 0MB 100% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 550MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 1024MB 0MB 176MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 550MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You can see that the volume is full, with 550 MB used by snapshots and 176 MB of rewrite guaranteed by fractional reserve.
8/ Creation of another snapshot (at least, I try)
filer01> snap create vol_lun snap3
Snapshot operation failed: No space left on device.
It fails because the volume is full. If there was no fractional reserve than this snapshot would have been created.
Since the snapshot can not be created , it means that all data written since the previous snapshot (step 5) can be rewritten: this is the goal of fractional reserve: you can overwrite the size of fractional rreserve (as a minimum. In this example, you can rewrite more).
9/ I delete the big file (273MB) and try to write it again.
It works well.
10/ I delete the snapshots
filer01> snap list vol_lun
Volume vol_lun
working...
%/used %/total date name
---------- ---------- ------------ --------
44% (44%) 27% (27%) Apr 02 12:06 snap2
61% (44%) 54% (27%) Apr 02 11:37 snap1
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 1024MB 0MB 176MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 550MB 0MB 0MB /vol/vol_lun/.snapshot
filer01> snap delete vol_lun snap1
Tue Apr 2 12:34:59 CEST [filer01:wafl.snap.delete:info]: Snapshot copy snap1 on volume vol_lun NetApp was deleted by the Data ONTAP function snapcmd_delete. The unique ID for this Snapshot copy is (1, 47).
filer01> snap delete vol_lun snap2
Tue Apr 2 12:35:22 CEST [filer01:monitor.globalStatus.ok:info]: The system's global status is normal.
Tue Apr 2 12:35:44 CEST [filer01:wafl.snap.delete:info]: Snapshot copy snap2 on volume vol_lun NetApp was deleted by the Data ONTAP function snapcmd_delete. The unique ID for this Snapshot copy is (2, 93).
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 402MB 621MB 0MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You can see that snapshots used space and fractional reserve space are back to 0.
11/ I remove all files from the lun, then create a new snapshot while the lun is empty.
filer01> df -m vol_lun
Filesystem total used avail capacity Mounted on
/vol/vol_lun/ 1024MB 578MB 445MB 57% /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB ---% /vol/vol_lun/.snapshot
filer01> df -rm vol_lun
Filesystem total used avail reserved Mounted on
/vol/vol_lun/ 1024MB 578MB 445MB 176MB /vol/vol_lun/
/vol/vol_lun/.snapshot 0MB 0MB 0MB 0MB /vol/vol_lun/.snapshot
filer01>
You can see that the used space is not 400 MB but lun size + fractional_reserve (at its maximum) ~578 MB. This is the maximum we had during the example. Even if the lun is full of zeroes, ONTAP can not see it to show an empty lun.
If you want to see real used space of the lun displayed by df commands in ONTAP CLI then you need to activate Space reclamation feature in Snapdrive for Windows.
Finally, to answer your questions:
- snap reserve has ben set to 0 at the creation of the volume. With a snap reserve higher we would have been stopped sooner in the example, so you should always use 0 for snap reserve on SAN volumes
- fractional reserve as been set to 0 at the creation of the volume but I changed it to 50 just after, so during all the exemple snap reserve and fractional reserve were different.
- Snapsot usage changed all the way during the exemple depending on the actions. It has nothing to do with the values of snap reserve.
Hope this helps.