From Thick to Thin and Back Again - A Whirlwind Tour of Thin Provisioning on NetApp

by Frequent Contributor on ‎2010-07-07 09:59 AM

Erick Moore recently did a nice little script to determine how much space your current thick LUNs and volumes are wasting http://communities.netapp.com/docs/DOC-6383 .  This set me thinking about Thin Provisioning and how it applies to NetApp.

Since at least 2004, all LUNs on NetApp are at heart thin.  Back in those days, the market wasn’t as accepting of thin provisioning.  You may recall that as late as 2008 much of the industry thinking revolved around the fallacy of “Real Fibre Channel”.  In order to give thin LUNs the appearance of being thick, NetApp used a system of reservations and guarantees to ensure that the space was really there.

What a difference the last few years have made.  Today, the market gets “thin”.  Many vendors have various means and methods to migrate or convert thick LUNs to thin ones.  Many of these methods are time consuming and involve the physical movement of data between storage pools.  On NetApp, which has always been “thin inside” this is not the case.  On NetApp, a thick to thin conversion simply means that we remove the reservations and guarantees.

The NetApp storage model starts with the RAID group.  RAID groups are combined into pools of storage called Aggregates.  Aggregates are partitioned into logical containers called FlexVols.  Either LUNs or files can reside in Flexvols.  A thin LUN is given the illusion of being thick by reserving space within the Flexvol for the full size of the LUN.  To convert a thick LUN to think, you simply set the LUNSpaceReserved property of the LUN to “off”.  This can be done on the fly and involves no actual movement of data; the LUN is already thin inside.

At the Flexvol, we have a combination of the volume reserve and the volume guarantee.  The guarantee reserves the space of the volume from the containing aggregate or pool.  The guarantee can be set to volume, file, or none.  Volume reserves the full declared space of volume from the containing aggregate.  File, reserves the total declared space of files in the volume from the containing aggregate.  None, reserves no space from the aggregate.  When the reserve is set to volume, you can also declare a percentage of space to reserve called a fractional reserve.  If you set that to 0, then no space is reserved.

Thin or thick LUNs can exist in thin or thick volumes.  There are no restrictions in this regard.  One oddity, a holdover from the days of emulated thick LUNs, is that in versions of Data ONTAP prior to 7.3.3, in order to set a volume guarantee to none, you must first set the reserve to 100%.  This caveat was removed in ONTAP 7.3.3.  This means in versions prior to 7.3.3, you need to make sure you temporarily have in your volume, if you are currently using a reserve less than 100, before you can set the guarantee to none.  In ONTAP 7.3.3, there is no such need; if your LUNs (thick or thin) fit in your thick volume today, then you can convert  without potential for space issues.

All of this, converting thick to thin LUNs and volumes in any version of ONTAP can be done quickly and easily via the Data ONTAP PowerShell Toolkit.  I have included two examples; one for ONTAP versions prior to 7.3.3, and one for ONTAP 7.3.3.  Both versions convert all of the LUNs, and the volumes that contain them, on aggr1 from thick to thin:

ONTAP Prior to 7.3.3

Connect-nacontroller SIM1;foreach($vol in (get-navol | ? {$_.ContainingAggregate –eq “aggr1”} )){ get-nalun | ? {$_.Path -Like "*"+$Vol.Name+"*"} | set-nalunspacereserved –off;set-navoloption $Vol.name guarantee volume;Set-navoloption $vol.name fractional_reserve 100;set-navoloption $vol.name guarantee none}

ONTAP 7.3.3

Connect-nacontroller SIM1;foreach($vol in (get-navol | ? {$_.ContainingAggregate –eq “aggr1”} )){ get-nalun | ? {$_.Path -Like "*"+$Vol.Name+"*"} | set-nalunspacereserved –off; set-navoloption $vol.name guarantee none}

Should you decide that thin provisioning is not for you after you’ve made the conversion, no worries.  Converting back from thin to thick is as simple as setting the reservations and guarantees (provided you have the space).  If you decide to move forward with thin provisioning then, as Erick states in his post, it’s important to monitor if you do decide to thin provision.  You want to have enough time to take action before running out of space.  Expect more to follow on that one…

Happy Scripting

J

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.