Netapp Snapshot Management Cheat Sheet
Written by geekyS
This article explains the different commands related to Netapp Snapshot Management.
Creating a test volume of 10gb to perform snapshot related operations
geekyfacts-filer > vol create testvol aggr 10g
Creation of volume 'testvol' with size 10g on containing aggregate
geekyfacts-filer > df -h testvol
Filesystem total used avail capacity Mounted on
/vol/testvol/ 8192MB 1420KB 8190MB 0% /vol/testvol/
/vol/testvol/.snapshot 2048MB 0MB 2048MB 0% /vol/testvol/.snapshot
geekyfacts-filer >
Snapshot Create
geekyfacts-filer > snap list testvol
Volume testvol
working...
No snapshots exist.
geekyfacts-filer > snap create testvol testsnap
creating snapshot...
geekyfacts-filer > snap list testvol
Volume testvol
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Dec 19 01:02 testsnap
geekyfacts-filer >
Snapshot Rename
geekyfacts-filer > snap rename testvol testsnap snaptest
geekyfacts-filer > snap list testvol
Volume testvol
working...
%/used %/total date name
---------- ---------- ------------ --------
3% ( 3%) 0% ( 0%) Dec 19 01:02 snaptest
geekyfacts-filer >
Snapshot Delete
geekyfacts-filer > snap delete testvol snaptest
deleting snapshot...
geekyfacts-filer > snap list testvol
Volume testvol
working...
No snapshots exist.
geekyfacts-filer >
Snap Scheduling
Scheduling automatic snapshot to keep 2 weekly, 2 daily, 8 hourly(taken at hours 8,12,16,20) online.
geekyfacts-filer > snap sched testvol 2 2 8@8,12,16,20
geekyfacts-filer > snap sched testvol
Volume testvol: 2 2 8@8,12,16,20
geekyfacts-filer >
Snap Space Reservation
Default snapshot space reserve is 20% of the volume size
geekyfacts-filer > snap reserve testvol
Volume testvol: current snapshot reserve is 20% or 2097152 k-bytes.
geekyfacts-filer > df -h testvol
Filesystem total used avail capacity Mounted on
/vol/testvol/ 8192MB 1796KB 8190MB 0% /vol/testvol/
/vol/testvol/.snapshot 2048MB 0MB 2048MB 0% /vol/testvol/.snapshot
Changing the snapshot reserve to 5% of the volume size
geekyfacts-filer > snap reserve testvol 5
geekyfacts-filer > snap reserve testvol
Volume testvol: current snapshot reserve is 5% or 524288 k-bytes.
geekyfacts-filer > df -h testvol
Filesystem total used avail capacity Mounted on
/vol/testvol/ 9728MB 1796KB 9726MB 0% /vol/testvol/
/vol/testvol/.snapshot 512MB 0MB 512MB 0% /vol/testvol/.snapshot
geekyfacts-filer >
Snap Restore
Export and mount the testvol to put some contents in the volume.
geekyfacts-filer > exportfs -p rw=geekyfacts.com,root=geekyfacts.com /vol/testvol
Login to the server for which volume was exported(in our case geekyfacts.com)
[root@geekyfacts]# mkdir /test
[root@geekyfacts]# mount geekyfacts-filer:/vol/testvol /test
[root@geekyfacts]# df -h /test
Filesystem Size Used Avail Use% Mounted on
geekyfacts-filer:/vol/testvol
9.5G 1.8M 9.5G 1% /test
[root@geekyfacts]# cd /test
[root@geekyfacts]# touch file.before_snapshot
geekyfacts-filer > snap create testvol testsnap
creating snapshot...
geekyfacts-filer > snap list testvol
Volume testvol
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Dec 19 02:15 testsnap
[root@geekyfacts]# touch file.aftersnap
[root@geekyfacts]# ls -l
total 0
-rw-r--r-- 1 root root 0 Dec 19 02:16 file.aftersnap
-rw-r--r-- 1 root root 0 Dec 19 02:15 file.before_snapshot
Snapshot testsnap hold only file.before_snapshot
[root@geekyfacts]# ls .snapshot/testsnap/
file.before_snapshot
Volume restore using Snapshot
geekyfacts-filer > snap restore -t vol -s testsnap testvol
WARNING! This will revert the volume to a previous snapshot.
All modifications to the volume after the snapshot will be
irrevocably lost.
Volume testvol will be made restricted briefly before coming back online.
Are you sure you want to do this? yes
You have selected volume testvol, snapshot testsnap
Proceed with revert? yes
Volume testvol: revert successful.
[root@geekyfacts]# ls
file.before_snapshot
File Restore using Snapshot
[root@geekyfacts]# rm file.before_snapshot
rm: remove regular empty file `file.before_snapshot'? y
geekyfacts-filer> snap restore -t file -s testsnap -r /vol/testvol/file.before_snapshot /vol/testvol/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/testvol/file.before_snapshot, snapshot testsnap
It will be restored as /vol/testvol/file.before_snapshot
Proceed with restore? yes
[root@geekyfacts]# ls
file.before_snapshot
geekyfacts-file >#
Snap Delta
[root@geekyfacts]# touch file{1,2,3,4}
geekyfacts-file > snap create testvol testsnap1
creating snapshot...
geekyfacts-file > snap list testvol
Volume testvol
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Dec 19 02:23 testsnap1
19% (19%) 0% ( 0%) Dec 19 02:15 testsnap
geekyfacts-file > snap delta testvol
Volume testvol
working...
From Snapshot To KB changed Time Rate (KB/hour)
--------------- -------------------- ----------- ------------ ---------------
testsnap1 Active File System 56 20s 10080.000
testsnap testsnap1 424 0d 00:08 3173.388
Summary...
From Snapshot To KB changed Time Rate (KB/hour)
--------------- -------------------- ----------- ------------ ---------------
testsnap Active File System 480 0d 00:08 3449.101
geekyfacts-file>
Snap reclaimable
geekyfacts-file > snap reclaimable testvol testsnap
Processing (Press Ctrl-C to exit) .
snap reclaimable: Approximately 424 Kbytes would be freed.
Sunday, May 15, 2011
Saturday, March 26, 2011
Thursday, January 20, 2011
Virtual Provisioning with Solutions Enabler
Virtual Provisioning with Solutions Enabler
source: http://www.emcstorageinfo.comData Devices are devices with datadev attribute. Only Data Devices can be part of Thin Pool. Devices with different protection scheme can be supported for use in Thin Pools. It is depending on specific Enginuity level. All devices with the datadev attribute are used for exclusively for populating Thin Pools.
Create command file (Thin.txt) with following syntax:
create dev count=10, config=2-Way-Mir, attribute=datadev, emulation=FBA, size=4602;
# symconfigure -sid 44 -file thin.txt commit –v –nop
A Configuration Change operation is in progress. Please wait...
Establishing a configuration change session...............Established.
Processing symmetrix 000190101244
{
create dev count=10, size=4602, emulation=FBA,
config=2-Way Mir, mvs_ssid=0000, attribute=datadev;
}
Performing Access checks..................................Allowed.
Checking Device Reservations..............................Allowed.
Submitting configuration changes..........................Submitted
…..
…..
…..
Step 125 of 173 steps.....................................Executing.
Step 130 of 173 steps.....................................Executing.
Local: COMMIT............................................Done.
Terminating the configuration change session..............Done.
The configuration change session has successfully completed.
# symdev list -sid 44 -datadev
Symmetrix ID: 000190101244
Device Name Directors Device
--------------------------- ------------- -------------------------------------
Sym Physical SA :P DA :IT Config Attribute Sts Cap(MB)
--------------------------- ------------- -------------------------------------
10C4 Not Visible ???:? 01A:C4 2-Way Mir N/A (DT) RW 4314
10C5 Not Visible ???:? 16C:D4 2-Way Mir N/A (DT) RW 4314
10C6 Not Visible ???:? 15B:D4 2-Way Mir N/A (DT) RW 4314
10C7 Not Visible ???:? 02D:C4 2-Way Mir N/A (DT) RW 4314
10C8 Not Visible ???:? 16A:D4 2-Way Mir N/A (DT) RW 4314
10C9 Not Visible ???:? 01C:C4 2-Way Mir N/A (DT) RW 4314
10CA Not Visible ???:? 16B:C4 2-Way Mir N/A (DT) RW 4314
Thin Pool can be created using symconfigure command and without adding data devices:
# symconfigure -sid 44 -cmd "create pool Storage type=thin;" commit –nop
Once pool is created, data devices can be added to the pool and enabled
Thursday, January 13, 2011
List all the external locks held in the box & how to release
List all the external locks held in the box & how to release:
# symcfg -sid 15 list -lockn all
Symmetrix ID: 000192601234
S Y M M E T R I X L O C K S
Lock Lock Lock Time SymmID Attachment Status Number Usage Held (Sec)
000192601234 Local Locked 15 Config Change 9311
To Release the lock 15 held on array 1234 .
symcfg -sid 1234 -lockn 15 release -force
# symcfg -sid 15 list -lockn all
Symmetrix ID: 000192601234
S Y M M E T R I X L O C K S
Lock Lock Lock Time SymmID Attachment Status Number Usage Held (Sec)
000192601234 Local Locked 15 Config Change 9311
To Release the lock 15 held on array 1234 .
symcfg -sid 1234 -lockn 15 release -force
Subscribe to:
Posts (Atom)