Solved

EMC CX700 snapview automation script

Posted on 2006-11-26
7
3,460 Views
Last Modified: 2012-05-05
Hi,

We have EMC CX700. Two LUNs from this storage are assigned to RedHat Linux AS4 server. We are using these two LUNs for Oracle 10g database. This is transactional database, constantly changing, once a transaction is complete it is deleted from this database.

As a backup solution for this database we are planning to setup to create snapshot on these two LUNs every one hour and keep upto 6 snapshots.

I am looking for script to create a snapshot from the host and delete old one. Also I believe it is possible to create this snapshot in consistency mode as these LUNs are used for database, we need snapshot of these two LUNs in consistency mode.

Or if you can provide any other method to automate this process that will be helpful.

Flarecode is version 19.x

We are using Brocade switch in this SAN configuration. All ports are open, we did not configure zoning on these switch.
 
Thanks,

Sreeram
0
Comment
Question by:shreeram44
  • 3
7 Comments
 
LVL 30

Expert Comment

by:Duncan Meyers
ID: 18016412
>We are using Brocade switch in this SAN configuration. All ports are open, we did not configure zoning on these switch.
You need to fix that. You are running an unsupported configuration and you will be expected to zone the switches by EMC support if you have host connectivity issues - and you *will* have connectivity issues. Note that EMC supports only soft zoning - that is; WWN based zoning.

I'd strongly recommend EMC Replication Manager - it automates all this. You can do it by scripting, but RM is the better way to go.
0
 
LVL 30

Accepted Solution

by:
Duncan Meyers earned 250 total points
ID: 18016491
Having said that, here's the basics of what you need to do:

Download and read the SnapView Admin guide from http://powerlink.emc.com
Download and read the SnapView CLI Reference guide from http://powerlink.emc.com

Create some snapshot cache LUNs and assign them to the snapshot cache pool. You'll need one cache LUN per snapshot that you want to create, and as a rule-of-thumb, you'll need around 10% of the space of the LUN you'll snapshot. Since you're planning on 6 snapshots, you'll need at least 12 LUNs (6 per SP).

For the script:

Test for the existence of the snapshot (easiest is to grep the output of mount)

If the snapshot exists, unmount it, then stop and deactivate it:

/usr/admsnap/admsnap deactivate -s snapshot-name
/opt/Navisphere/bin/navicli -h x.x.x.x snapview -stopsession snapshot-name -o

If you don't do this, your snapshot will contain stale data.

Start a SnapView session on the LUNs in Navisphere:

/opt/Navisphere/bin/navicli -h 10.3.49.24 snapview -startsession snapshot-name -lun <lun number> -persistence
/usr/admsnap/admsnap activate -s snapshot-name
/mount /dev/emcpowerf1 /mnt/mount-point

Repeat as necessary.

Note that you MUST NOT mount a snapshot on the server that owns the source LUN.
0
 

Author Comment

by:shreeram44
ID: 18021267
Right now we are using snap shots by manually creating them from the Navisphere manager. What I am looking for is automation of this process. let me try commands you provided.

Thanks,

Sreeram
0
 
LVL 30

Expert Comment

by:Duncan Meyers
ID: 18022639
I pulled those commands from a Linux script I wrote a while back. They'll need customization for your environment - I strongly recommend that you download and review the manuals listed above.

If you want to automate the process completely, use Replication Manager - there's a flavour of RM specifically for management of Oracle and snapshots and clones.
0
 
LVL 1

Assisted Solution

by:SHOPCSLA
SHOPCSLA earned 250 total points
ID: 18023643
Expanding just a bit on meyersd's comment...

Prior to activating the snapshot be sure you have quiesed the database and flushed the server's I/O buffers to disk.  I can't address the database commands but flushing the disk cache can be accomplished by using "sync" or "admsnap flush".

The navicli startsession and stopsession commands are usually issued from the database server but could be done from any server with IP connectivity to the CLARiiON.  The buffer flush command (either version) must be run from the database server.

Once the startsession command has been issued you will have a valid point-in-time snapshot.  The mount, admsnap activate and admsnap deactivate commands are only useful if you intend to give a different server access to the snapshot such as a tape backup server.  The tape backup server would issue the mount, admsnap activate, admsnap deactivate commands and, potentially, the navicli stopsession command.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
Lets start to have a small explanation what is VAAI(vStorage API for Array Integration ) and what are the benefits using it. VAAI is an API framework in VMware that enable some Storage tasks. It first presented in ESXi 4.1, but only after 5.x sup…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now