Recently a colleague of mine pointed towards a very interesting command on Netapp Data Ontap.
I was very surprised to learn that this is the defrag tool of Netapp, built right in the Ontap OS.
This can be used not only on volumes, in fact you can run this on a file, lun or aggregate itself. However I should warn you that optimization of lun may not give you any performance benefit or may get worse, as Ontap doesn’t have any clue what’s in the lun and it’s file system layout.
First you have to turn on the reallocation on system with ‘reallocate on’ command. This command turns on the reallocation on system and same way turns off with off switch.
If you want to run the reallocation only one time you should use -f or -o switch however if you want Ontap to keep a track of your FS and optimize the data when if feels necessary you should control it with –i switch or schedule it with ‘reallocate schedule’ command.
To check current optimization level of volume, you can use ‘reallocate measure -o ’ or if you want to feel adventurous use ‘wafl scan measure layout ’ through advanced mode, though I This command is pretty straightforward and no harm (except extra load on CPU and disk).