17 Replies Latest reply: Apr 2, 2013 11:51 PM by saranraj456 RSS

Fractional reserve in Volume

saranraj456
Currently Being Moderated

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

  • Re: Fractional reserve in Volume
    aborzenkov
    Currently Being Moderated

    Please show

     

    df -r

    snap list

    • Re: Fractional reserve in Volume
      saranraj456
      Currently Being Moderated

      snap list NYC1ECHIDESX01TEMPVOL02
      Volume NYC1ECHIDESX01TEMPVOL02
      working...

      No snapshots exist.

       

      df -r NYC1ECHIDESX01TEMPVOL02

      Filesystem              kbytes       used      avail   reserved  Mounted on

      /vol/NYC1ECHIDESX01TEMPVOL02/  486014976  404393880   81621096   57572656  /vol/NYC1ECHIDESX01TEMPVOL02/

      snap reserve          54001664          0   54001664          0  /vol/NYC1ECHIDESX01TEMPVOL02/..

  • Re: Fractional reserve in Volume
    paleon
    Currently Being Moderated

    The fractional reserve of a volume comes into play when two conditions exist.  The first condition is that the volume contains one or more LUNs (I strongly recommend that each volume have no more than 1 LUN.)  The second condition is that a snapshot creation is attempted.    The snapshot reserve is not directly related to the fractional reserve.

     

    The fractional reserve is designed to ensure that the LUN remain writable at all times.  When a snapshot is created, the fractional reserve will consume enough data blocks to ensure that x% of LUN data can change.

     

    Let's assume a 120GB volume with a 50GB LUN, a 0% snapshot reserve, and a 100% fractional reserve.

    * At T0 (time zero), the volume will show 70GB of available space.
    * At T1, a snapshot is created.  The fractional reserve will seize 50GB of available space.  That way, of 100% of the data blocks in the LUN are changed, the volume will not run out of free space.  The volume now shows 20GB of free space.
         - 50GB are reserved for the LUN in the active file system.
         - 50GB are reserved for future snapshots of the LUN because of the fractional reserve.
    * At T2, 10GB of data has changed in the LUN.  The volume still shows 20GB of free space.

         - 50GB are reserved for the LUN in the active file system.
         - 50GB are reserved for future snapshots of the LUN because of the fractional reserve.  Of the 50GB, 10GB are used.

    * At T3, a snapshot is created.  The fractional reserve will seize an additional 10GB of space because the snapshot because 10GB of the fractional reserve is consumed by the snapshot from T1.  The volume now shows 10GB of free space.
         - 50 GB are reserved for the LUN in the active file system.

         - 10 GB are reserved in the snapshot from T1.

         - 50 GB are reserved for future snapshots of the LUN because of the fractional reserve.

    At T4, 20GB of LUN data has changed.  The volume now shows 10GB of free space.
         - 50 GB are reserved for the LUN in the active file system.

         - 10 GB are reserved in the snapshot from T1.

         - 50 GB are reserved for future snapshots of the LUN because of the fractional reserve.  Of the 50GB, 20GB are used.

    At T5, a snapshot creation is attempted.  It fails because the NetApp cannot reserve 50GB of available space to protect the LUN's ability to remain writable.

     


    Please let me know if that explanation helps to clear up the fractional reserve and its role.

     

    Bill

    • Re: Fractional reserve in Volume
      saranraj456
      Currently Being Moderated

      Thanks for the info bill..

      Here in my case,no snapshot is been created but it reserves some space in volume..

      Volume size 463 GB

      LUN size 450 GB

      The volume shows as 100% used..

    • Re: Fractional reserve in Volume
      saranraj456
      Currently Being Moderated

      Hi,

       

      According to,https://communities.netapp.com/groups/chris-kranz-hardware-pro/blog/2009/03/05/fractional-reservation--lun-overwrite

      document .FR space will start consume once it uses all the available free space.

       

      Regards,

      Saran

    • Re: Fractional reserve in Volume
      saranraj456
      Currently Being Moderated

      Hi,

      Snap reserve space should be equivalent to the fractional reserve space , is that right ?

      if the above statement holds true, why the default snap reserve for volume is set to 20% ( i mean in older ontap version)


      Saran

      • Re: Fractional reserve in Volume
        REGIS.GARRUCHET
        Currently Being Moderated

        I think it's because ONTAP was originally made for NAS (in the 90's). And a 20% snapreserve was a good choice at that time (maybe a little too high for most environment but OK).

         

        When SAN features arrived on ONTAP (in 2002 as far as I remember), snapreserve of 20% was an issue but the default settings stayed to 20% until now. SO you had to change it in ONTAP CLI or former GUI FilerView.

        Snap reserve was not the only paramater to change for SAN volumes (create_ucode, convert_ucode, for example), and fractional_reserve appeared later (at the beginning, you had to keep fractional_reserve=100).

         

        Since then, System Manager has been a good choice to have all settings right for SAN volumes.:

         

        In a normal situation for a SAN volume, you would have:

        - snap reserve = 0 in all cases (so all space in the volume is available for lun overwrite)

        - a volume big enough to include the whole lun, plus estimated snap size plus some margin (for fractional_reserve) if you wish.

        - autodelete or autosize or both activated, so you minimize risk to have a write failure.

        - IMHO, volume guarantee set to volume would be the best choice for luns (but some other may think differently).

        - for fractional_reserve:

             - if no snapshots are created, there is no need for fractional reserve (but be careful, deduplication, snapmirror, and other features can create snapshots).

             - if there are snapshots, and you know that your server won't fill and rewrite large parts of the lun or autosize/autodelete policies and their targets are OK to avoid the volume to fill, then fractional_reserve=0 (most cases).

             - if there are snapshots and you don't know how the server will write on the lun, and autodelete/autosize policies won't be able to avoid volume filling (because you need to keep some snapshots for example and you don't have enough space to grow the volume), then you may use some fractional_reserve to avoid any risk. This means that fractional_reserve is not linked at all with snap reserve.

         

        Regis

        • Re: Fractional reserve in Volume
          saranraj456
          Currently Being Moderated

          Let us assume, if we have volume size of 100 GB & LUN size of 50 GB with Fractional Reserve 50 % .At time T1 , snapshot S1 in place FR freezes 25 GB. At time T2, snapshot S2 was taken ,data change happens for 25 GB it  completely utilizes 25 GB FR space & snap reserve from S1 snapshot uses 25 GB. Does the above scenario framed correctly?

           

          Thanks

          Saran

          • Re: Fractional reserve in Volume
            saranraj456
            Currently Being Moderated

            Snap reserve space should be equivalent to the fractional reserve space , is that right ?

            Does the above statement holds true ?

             

            Saran

            • Re: Fractional reserve in Volume
              REGIS.GARRUCHET
              Currently Being Moderated

              Hi,

               

              snap reserve has not to be equivalent to fractional reserve.

              In a few words, snap reserve guarantees some space for snapshots while fractional reserve guarantees some space for active filesystem.

              By default, both should be 0 for SAN volumes in most cases.

               

              In details:

              Snap Reserve is some space in the volume where there are only snapshoted blocks that have been modified or removed from the active filesystem.

              For example, if you have 20% of snap reserve then there is only 80% of the volume left for active file system. When these 80% are full, you can't write anymore in the active filesystem.

              (But you can have more than 20% of snapshots in the volume unless you set a autodelete/autosize policy that prevents this. If you're snapshots take 30% of volume space even with a snapreserve of 20% than you have only 70% of volume space available for writes).

               

              Important: In volumes that holds luns, you want all space available for active filesystem to limit the risk of write failure in the lun. That's why you want in nearly all case a snapreserve of 0 for SAN volumes.

               

              Fractional Reserve is different (nearly the opposite).

              Fractional Reserve is some space in a volume where you can't have snapshots.

              When you take a snapshot, all blocks where there is data become read-only, so there is no mean to modify, remove, rewrite them. After a snapshot is taken on a volume, it means that you can write only on empty blocks.

              When the volume is full because the lun is full and the room you left in the volume for snapshots is full as well , then you can't write anymore on the lun and it's a big issue because the server doesn't know about NetApp volumes.

              There aredifferent options to make this less a pain:

              - you can , if you want, have some autosize/autodelete policies, that will grow the volume or delete some snapshots, so there are always some free blocks available for writes. This is definitely recommended.

              - you can have a fractional reserve higher than 0.

               

              For example, if you have a fractional reserve of 20%, then you can fill the lun, and take some snapshots. If you take a snapshot while the lun is full then all the blocks of the lun become readonly. You still have some free blocks in the volume for writes (if you sized your volume correctly).

              You can rewrite data on the lun and take new snapshots as long as fractional space is not used.

              When there is only 20% of lun size free (i.e. fractional_reserve), then you can not take any new snapshots. As long as you can't take new snashots, blocks from the fractional reserve can be written, modified removed because they never become readonly.

               

              A fractional reserve of 100 is for worst case scenario: lun full then snapshots, modifications that make snapshots growing, and finally rewrite of the whole lun, and you don't want autosize/autodelete policies

              A fractional reserve of 0 is OK for most scenarios where lun is not too full and there is no risk of large rewrites and you have autosize/autodelete policies set.

              Fractional reserve in-between is for cases, where you don't know how the application will behave, and youset autosize/autodelete policies but you still  want to have some security room.

               

              As a rule, you should size your volume knowing your luns and how it will behave:

              - volume size = lun size + estimated snapshot size + fractional_reserve size

               

              Hope this helps

               

               

              • Re: Fractional reserve in Volume
                saranraj456
                Currently Being Moderated

                Thank so much for your valuable explanations, Still my doubt remains

                Sorry to put that again

                 

                let say volume holds of A, B, C blocks

                 

                untitled1.bmp

                If a snapshot s1 is taken these blocks will be locked. And at the same time Fractional reserve will reserve the space in volumes for given percentage

                And when there is a change happens in block c, the overwrite block C' will return in Fractional reserve space.

                 

                untitled.bmp

                the block space c is used in snap reserve space. So here in this case space used by Fractional reserve and snap reserve is equal ?

                 

                Saran

                • Re: Fractional reserve in Volume
                  radek.kubka
                  Currently Being Moderated

                  It is incorrect.

                   

                  As soon as you have a snapshot in a volume (1 or more), fractional reserve starts reserving place. But the amount of space reserved is a function of two factors:

                  1) Fractional reserve setting value

                  2) The amount of space actually used in a LUN

                   

                  So let's say we have FR=100% and 100GB LUN completely filled with data (or zeroes) - snapshot is taken in a volume & FR reserves 100GB of space.

                   

                  In second example FR=50%, LUN size is 100GB, but there is only 50GB of data (or zeroes) in the LUN - FR will reserve 25GB when a snapshot is taken.

                  • Re: Fractional reserve in Volume
                    saranraj456
                    Currently Being Moderated

                    Yes your statement is right on the reserved space . however i meant here is used space.

                     

                    let's say we have FR=100% and 100GB LUN completely filled with data (or zeroes) - snapshot is taken in a volume & FR reserves 100GB of space.  
                    

                    reserved space is 100 gb , snapshot will lock that 100GB( active file sytem) if the data change is for 20gb the fractional reserve space will be used by 20 GB  & same will reflect in the snap reserve space . This is my point.

                     

                    Saran

                • Re: Fractional reserve in Volume
                  REGIS.GARRUCHET
                  Currently Being Moderated

                  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.

More Like This

  • Retrieving data ...