Вы находитесь на странице: 1из 6

NetApp Cheat Sheet Written by DuEL Saturday, 21 November 2009 13:04 inShare

How to create a NetApp filer volume for testing purpose, for example, we will create a 20GB NetApp snapshot related operations. NetApp-filer > vol create FilerVol aggr 20g Creation of volume 'filervol' with size 20g on containing aggregate NetApp-filer > df -h filervol Filesystem total used avail capacity Mounted on /vol/filervol/ 8192MB 1420KB 8190MB 0% /vol/filervol/ /vol/filervol/.snapshot 2048MB 0MB 2048MB 0% /vol/filervol/.snapshot NetApp-filer >

How to create NetApp filer Snapshot? NetApp-filer > snap list filervol Volume filervol working... No snapshots exist. NetApp-filer > snap create filervol FilerSnap creating snapshot... NetApp-filer > snap list filervol Volume filervol working... %/used %/total date name ---------- ---------- ------------ -------0% ( 0%) 0% ( 0%) Nov 20 21:01 FilerSnap NetApp-filer >

How to delete NetApp Filer Snapshot? NetApp-filer > snap delete filervol snapFiler deleting snapshot... NetApp-filer > snap list filervol Volume filervol working... No snapshots exist. NetApp-filer >

How to restore Snap in NetApp Filer? Export and mount the filervol to put some contents in the volume. NetApp-filer > exportfs -p rw=Google.com,root=Google.com /vol/filervol Login to the server for which volume was exported(for example Google.com) [root@NetApp]# mkdir /test [root@NetApp]# mount NetApp-filer:/vol/filervol /test [root@NetApp]# df -h /test Filesystem Size Used Avail Use% Mounted on NetApp-filer:/vol/filervol 19.5G 1.8M 19.5G 1% /test [root@NetApp]# cd /test [root@NetApp]# touch file.before_snapshot NetApp-filer > snap create filervol Filersnap creating snapshot... NetApp-filer > snap list filervol Volume filervol working... %/used %/total date name ---------- ---------- ------------ --------

0% ( 0%)

0% ( 0%) Nov 19 23:01 Filersnap

[root@NetApp]# touch file.aftersnap [root@NetApp]# ls -l total 0 -rw-r--r-- 1 root root 0 Nov 19 21:01 file.aftersnap -rw-r--r-- 1 root root 0 Nov 19 23:01 file.before_snapshot Snapshot Filersnap hold only file.before_snapshot [root@NetApp]# ls .snapshot/Filersnap/ file.before_snapshot

How to reserve Snap Space in NetApp Filer? Default snapshot space reserve is 20% of the volume size NetApp-filer > snap reserve filervol Volume filervol: current snapshot reserve is 20% or 2097152 k-bytes. NetApp-filer > df -h filervol Filesystem total used avail capacity Mounted on /vol/filervol/ 8192MB 1796KB 8190MB 0% /vol/filervol/ /vol/filervol/.snapshot 2048MB 0MB 2048MB 0% /vol/filervol/.snapshot

Changing the snapshot reserve to 5% of the volume size NetApp-filer > snap reserve filervol 5 NetApp-filer > snap reserve filervol Volume filervol: current snapshot reserve is 5% or 524288 k-bytes. NetApp-filer > df -h filervol Filesystem total used avail capacity Mounted on /vol/filervol/ 9728MB 1796KB 9726MB 0% /vol/filervol/ /vol/filervol/.snapshot 512MB 0MB 512MB 0% /vol/filervol/.snapshot NetApp-filer >

How to rename NetApp Filer Snapshot? NetApp-filer > snap rename filervol Filersnap snapFiler NetApp-filer > snap list filervol Volume filervol working... %/used %/total date name ---------- ---------- ------------ -------5% ( 5%) 0% ( 0%) Nov 20 21:01 snapFiler NetApp-filer >

How to restore volume using Snapshot? NetApp-filer > snap restore -t vol -s Filersnap filervol WARNING! This will revert the volume to a previous snapshot. All modifications to the volume after the snapshot will be irrevocably lost. Volume filervol will be made restricted briefly before coming back online. Are you sure you want to do this? yes You have selected volume filervol, snapshot Filersnap Proceed with revert? yes Volume filervol: revert successful. [root@NetApp]# ls file.before_snapshot

NetApp Filer Snap reclaimable NetApp-file > snap reclaimable filervol Filersnap Processing (Press Ctrl-C to exit) . snap reclaimable: Approximately 424 Kbytes would be freed.

How to restore file using Snapshot? [root@NetApp]# rm file.before_snapshot rm: remove regular empty file `file.before_snapshot'? y NetApp-filer> snap restore -t file -s Filersnap -r /vol/filervol/file.before_snapshot /vol/filervol/file.before_snapshot WARNING! This will restore a file from a snapshot into the active filesystem. If the file already exists in the active filesystem, it will be overwritten with the contents from the snapshot. Are you sure you want to do this? yes You have selected file /vol/filervol/file.before_snapshot, snapshot Filersnap It will be restored as /vol/filervol/file.before_snapshot Proceed with restore? yes [root@NetApp]# ls file.before_snapshot NetApp-file >#

Execute Snap Delta [root@NetApp]# touch file{1,2,3,4} NetApp-file > snap create filervol Filersnap1 creating snapshot... NetApp-file > snap list filervol Volume filervol working... %/used %/total date name

---------- ---------- ------------ -------0% ( 0%) 0% ( 0%) Dec 19 02:23 Filersnap1 19% (19%) 0% ( 0%) Dec 19 02:15 Filersnap NetApp-file > snap delta filervol Volume filervol working... From Snapshot To KB changed Time Rate (KB/hour) --------------- -------------------- ----------- ------------ --------------Filersnap1 Active File System 56 20s 10181.000 Filersnap Filersnap1 424 0d 00:09 3133.488 Summary... From Snapshot To KB changed Time Rate (KB/hour) --------------- -------------------- ----------- ------------ --------------Filersnap Active File System 480 0d 00:09 3129.101 NetApp-file>

Comments Ajay Warrier - SME - Storage Hi Duel, That was an excellent documentation of the basic stuff that we do on NetApps.Great documentation. Could you post a documentation on SNAPMIRROR as well if you can. Its easy to understand from your blog rather than browsing thru 1000 others. Ajay

Add NewSearch |2010-05-16 08:53:13

Вам также может понравиться