Thursday, September 20, 2012

About snapmirror logging


About snapmirror logging:

a. how to check snapmirror log is enable

filerA> options snapmirror.log.enable

snapmirror.log.enable on

b. how to enable snapmirror logging

options snapmirror.log.enable on

c. where the output of snapmirror

/etc/log/snapmirror.0


Examples of log files
The following is an example of a log file from the source side:

log Fri Jul 27 20:00:01 GMT - - Start_Logging
cmd Fri Jul 27 20:00:20 GMT - - Snapmirror_on
src Fri Jul 27 20:41:09 GMT filer1:vol1 filer2:vol1 Request (10.56.17.133)
src Fri Jul 27 20:41:32 GMT filer1:vol1 filer2:vol1 Abort (Destination not allowed)
src Fri Jul 27 20:45:31 GMT filer1:vol0 filer1:vol1 Request (10.56.17.132)
src Fri Jul 27 20:45:35 GMT filer1:vol0 filer1:vol1 Start
src Fri Jul 27 20:51:40 GMT filer1:vol0 filer1:vol1 End (26200 KB)
src Fri Jul 27 22:41:09 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Request
(10.56.17.133)
src Fri Jul 27 22:41:12 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Start
src Fri Jul 27 22:41:13 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Abort (Non
unicode directory found in source qtree.)
src Fri Jul 27 22:45:53 GMT filer1:/vol/vol1/qtb filer2:/vol/vol1/qsmb Request
(10.56.17.133)
src Fri Jul 27 22:45:56 GMT filer1:/vol/vol1/qtb filer2:/vol/vol1/qsmb Start
src Fri Jul 27 22:45:59 GMT filer1:/vol/vol1/qtb filer2:/vol/vol1/qsmb End (3800 KB)
cmd Fri Jul 27 22:50:29 GMT filer1:/vol/vol1/qtb filer2:/vol/vol1/qsmb Release_command

The following is an example of a log file from the destination side.

dst Fri Jul 27 22:50:18 GMT filer1:vol0 filer1:vol1 Request (Initialization)
dst Fri Jul 27 22:50:20 GMT filer1:vol0 filer1:vol1 Abort (Destination is not
restricted)
dst Fri Jul 27 22:57:17 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Request
(Initialize)
dst Fri Jul 27 22:57:24 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Start
dst Fri Jul 27 22:57:36 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB End (55670 KB)
dst Fri Jul 27 23:10:03 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Request
(Scheduled)
dst Fri Jul 27 23:10:07 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Start
dst Fri Jul 27 23:10:18 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB End (12900 KB)
cmd Sat Jul 28 00:05:29 GMT - filer2:/vol/vol1/qtB Quiesce_start
cmd Sat Jul 28 00:05:29 GMT - filer2:/vol/vol1/qtB Quiesce_end
cmd Sat Jul 28 00:05:40 GMT - filer2:/vol/vol1/qtB Break_command
cmd Sat Jul 28 00:41:05 GMT filer1:/vol/vol1/qtA filer2:/vol/vol1/qtB Resync_command
log Sat Jul 28 00:41:10 GMT - - End_Logging

Sunday, May 15, 2011

Netapp Snapshot Management Cheat Sheet

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.

Thursday, January 20, 2011

Virtual Provisioning with Solutions Enabler

Virtual Provisioning with Solutions Enabler

source: http://www.emcstorageinfo.com


Configuring and viewing data devices and pools:

Data 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

Thursday, December 30, 2010

How to revert setting device attributes

The syntax is

set device SymDevName[:SymDevName]
[emulation=EmulationType]
[attribute=[NO] device_attr];

i.e
set dev 0D44 attribute= NO SCSI3_PERSIST_RESERV;

Wednesday, December 15, 2010

Netapp Snapshot: quick guide

Netapp Snapshot: quick guide

Netapp Snapshot technology helps in creating point-in-time copies of file systems, which you can use to protect data—from a single file to a complete disaster recovery solution. You can create a Snapshot copies in less than a second, regardless of volume size or level of activity on your NetApp system. Currently there is a limit of 255 snapshots per volume. Read more at Netapp Tech library.

Here is a quick overview of the netapp snapshot management commands.

To list a snapshots on a netapp storage volume

filer2> snap list vol79
Volume vol79
working...

%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Nov 12 22:00 hourly.0
0% ( 0%) 0% ( 0%) Nov 12 21:00 hourly.1
0% ( 0%) 0% ( 0%) Nov 12 00:00 nightly.0
0% ( 0%) 0% ( 0%) Nov 11 00:00 nightly.1
0% ( 0%) 0% ( 0%) Nov 10 00:00 weekly.0
0% ( 0%) 0% ( 0%) Nov 09 00:00 nightly.2
0% ( 0%) 0% ( 0%) Nov 08 00:00 nightly.3
0% ( 0%) 0% ( 0%) Nov 07 00:00 nightly.4
0% ( 0%) 0% ( 0%) Nov 03 00:00 weekly.1
filer2>


To create a manual snapshot

filer2> snap create vol79 test123

filer2> snap list vol79
Volume vol79
working...

%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Nov 12 22:09 test123
0% ( 0%) 0% ( 0%) Nov 12 22:00 hourly.0
0% ( 0%) 0% ( 0%) Nov 12 21:00 hourly.1
0% ( 0%) 0% ( 0%) Nov 12 00:00 nightly.0
0% ( 0%) 0% ( 0%) Nov 11 00:00 nightly.1
0% ( 0%) 0% ( 0%) Nov 10 00:00 weekly.0
0% ( 0%) 0% ( 0%) Nov 09 00:00 nightly.2
0% ( 0%) 0% ( 0%) Nov 08 00:00 nightly.3
0% ( 0%) 0% ( 0%) Nov 07 00:00 nightly.4
0% ( 0%) 0% ( 0%) Nov 03 00:00 weekly.1
filer2>


Print the snapshot schedules for a volume (hourly, nightly, weekly snapshot)

filer2> snap sched vol79
Volume vol79: 2 5 2
filer2>

Change snapshot schedules

filer2> snap sched vol79 2 4 3
filer2> snap sched vol79
Volume vol79: 2 4 3
filer2>

Show snapshot reserve space ( the space allotted to store snapshot in volume )

filer2> snap reserve vol79
Volume vol79: current snapshot reserve is 0% or 0 k-bytes.
filer2> df -h vol79
Filesystem total used avail capacity Mounted on
/vol/vol79/ 300GB 229GB 70GB 77% /vol/vol79/
/vol/vol79/.snapshot 0MB 65MB 0MB ---% /vol/vol79/.snapshot

Change snaphot reserve space

filer2> snap reserve vol79 5
filer2> df -h vol79
Filesystem total used avail capacity Mounted on
/vol/vol79/ 285GB 229GB 55GB 81% /vol/vol79/
/vol/vol79/.snapshot 15GB 66MB 14GB 0% /vol/vol79/.snapshot
filer2>

To delete a snapshot

filer2> snap delete vol79 test123
filer2>