June 26, 2009

UDEV Rules to enable device name persistence

Hi All,

This is neto from Brazil

How are you?

Linux doesn't guarantee a persistence device name for SCSI devices. This can cause all kinds of fun with your LUNS because the device name associated with LUNS presented from the NetApp can get shuffled around.

A solution is: Setup UDEV Rules to enable device name persistence.

Note: NOT Needed for Data Disks when ASMLib is used. In this case only setup device persistence for the OCR and VOTE disks.

1. White List the NetApp LUNS (devices)

  • add a line to /etc/scsi_id.config
vendor="NETAPP", model=LUN, options=-g
- This allows UDEV to obtain the UUID from LUNS
- Without this entry the "-g" option will always be needed on the scsi_id command to get any results
- The Vendor and Model information can be obtained by this:
scsi_id -gxs /block/sdg
ID_VENDOR=NETAPP <--Here
ID_MODEL=LUN <--And Here
ID_REVISION=0.2
ID_SERIAL=360a980004334616e52344746596b2d67
ID_TYPE=disk
ID_BUS=scsi


Obtain list of LUNS from the NetApp Controllers

  • sanlun lun show all
sanlun lun show all
filer: lun-pathname device filename adapter protocol lun size lun state
tng1: /vol/css1/ocr1 /dev/sdg host9 iSCSI 280m (293601280) GOOD
tng2: /vol/css2/ocr2 /dev/sdb host8 iSCSI 280m (293601280) GOOD
tng1: /vol/css1/vote1 /dev/sdh host9 iSCSI 280m (293601280) GOOD
tng2: /vol/css2/vote2 /dev/sdc host8 iSCSI 280m (293601280) GOOD
tng1: /vol/css1/vote3 /dev/sdi host9 iSCSI 280m (293601280) GOOD
.
.
.

3. Get the Serial number for each SCSI Device (LUN)

  • scsi_id -p 0x83 -s /block/sdg
  • scsi_id -p 0x83 -s /block/sdb
  • scsi_id -p 0x83 -s /block/sdh
  • scsi_id -p 0x83 -s /block/sdc
  • scsi_id -p 0x83 -s /block/sdi
Sample Output:
scsi_id -s /block/sdi
360a9800043346161613447454776694c

4. Create a New UDEV rules file to statically name the SCSI Devices

  • cd /etc/udev/rules.d
  • vi 99-static-scsi-names.rules
NOTE: This example includes setting ownership and permissions for Oracle RAC Clusterware Disks
#----------------------------
#BEGIN: OCR DISKS
#----------------------------
#css1/ocr
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="360a98000433461616134474541327154", NAME="sdOCR1%n", OWNER="root", GROUP="oinstall", MODE="0640"
#css2/ocr
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="360a980004334616e5234474541572f32", NAME="sdOCR2%n", OWNER="root", GROUP="oinstall", MODE="0640"
#----------------------------
#BEGIN: VOTE DISKS
#----------------------------
#css1/vote
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="360a980004334616161344745416b6542", NAME="sdVOTE1%n", OWNER="oracle", GROUP="oinstall", MODE="0640"
#css2/vote
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="360a980004334616e52344745416e4332", NAME="sdVOTE2%n", OWNER="oracle", GROUP="oinstall", MODE="0640"
#fra1/vote
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="360a9800043346161613447454776694c", NAME="sdVOTE3%n", OWNER="oracle", GROUP="oinstall", MODE="0640"

5. Execute the new rules file

  • udevcontrol reload_rules
  • start_udev
OR
  • reboot


Thank you very much my friend Allan Wilson and Lou Lydiksen.

All the best

neto
NetApp - My reason to live!

May 25, 2009

Oracle does not support iSCSI on Linux for production environments. mistake? typo?

Hi All,

This is neto from Brazil

How are you?

Last weekend, I was doing some studies and I was a little bit confused with a note.

I read the document about "Optimizing EMC Celerra IP Storage on Oracle 11g Direct NFS"

The document is very good, but I believe there is a mistake or typo on the documentation:

Note

The note is: "Oracle does not support iSCSI on Linux for production environments".

Based on the Oracle documents and Metalink documents, Oracle DOES support iSCSI (as a block protocol) for production environments.

RAC Technologies Matrix for Linux Platforms

http://www.oracle.com/technology/products/database/clustering/certify/tech_generic_linux_new.html

RAC: Frequently Asked Questions

Metalink Document: Doc ID: 220970.1

Can I use iSCSI storage with my RAC cluster?

For iSCSI, Oracle has made the statement that, as a block protocol, this technology does not require validation for single instance database. There are many early adopter customers of iSCSI running Oracle9i and Oracle Database 10g. As for RAC, Oracle has chosen to validate the iSCSI technology (not each vendor's targets) for the 10g platforms - this has been completed for Linux and Windows. For Windows we have tested up to 4 nodes - Any Windows iSCSI products that are supported by the host and storage device are supported by Oracle. We don't support NAS devices for Windows, however some NAS devices (eg NetApp) can also present themselves as iSCSI devices. If this is the case then a customer can use this iSCSI device with Windows as long as the iSCSI device vendor supports Windows as an initiator OS. No vendor-specific information will be posted on Certify.

Raw Devices and Cluster Filesystems With Real Application Clusters

Metalink Document: Doc ID: 183408.1

SCSI:
Disk drives are connected individually to the host machine by small computer system interfaces (SCSI) through one of a number of disk controllers.

SAN:
Storage Area Network is a shared dedicated high-speed network connecting
storage elements and the backend of the servers.

NAS:
Network Attached Storage is a special purpose server with its own embedded
software that offers crossplatform file sharing across the network. 

iSCSI: 
Another form of network attached storage that communicates in block mode over Ethernet (Gigabit Ethernet) to special storage subsystems.  Like NFS attached storage, iSCSI uses standard hardware and software to communicate - although a private network is recommended.  Because it operates in block mode, use of iSCSI with RAC requires either a cluster filesystem or use of raw volumes.

So, I hope to be contributing with EMC to clarify the document for the readers, because Oracle does support iSCSI on Linux for production environments.

All the best

neto

NetApp - I love this company!

May 06, 2009

Oracle Data Masking and Regulatory Compliance Using SnapManager 3.0 for Oracle

Hi All,

This is neto from Brazil

How are you?

Oracle Data Masking and Regulatory Compliance Using SnapManager 3.0 for Oracle has been published.

http://media.netapp.com/documents/tr-3762.pdf

Abstract

This document describes how to create a master clone that has sensitive data masked using the Oracle® data masking pack and SnapManager® 3.0 for Oracle postclone option. It also describes how to create multiple clones from the master clone.

  • Generate production database schema using the Swingbench oewizard tool
  • Create a production database clone using SMO 3.0
  • Use postclone scripts to call Oracle Data Masking to mask Oracle data within the clone
  • Masking columns (foreign keys) to demonstrate integrity of the masking process


Enjoy the reading!

All the best

neto
NetApp - My LIFE

SnapManager 3.0 for Oracle Best Practices Guide

Hi All,

This is neto from Brazil

How are you?

SMO 2.2 BPG (TR-3665) was updated to include the best practices for version 3.0 – this has been now been published as a new document:

http://media.netapp.com/documents/tr-3761.pdf

Some of the changes and new topics in the 3.0 BPG include:

Updated Architecture diagram that illustrates the integration with Protection Manager

2.3 ARCHITECTURE

  • Added a new workflow diagram for data protection


2.4 POLICY-DRIVEN DATA PROTECTION WORKFLOW

New table for licenses

4.1 LICENSES

Added a new section titled “Changes in version 3.0 that impact relevant topic for each topic (like backups, profiles etc)

Added the following new appendices:

APPENDIX B: CONFIGURING AND ENABLING POLICY-DRIVEN DATA PROTECTION IN SNAPMANAGER 3.0 FOR ORACLE

  • CONFIGURING OPERATIONS MANAGER AND SNAPDRIVE FOR UNIX
  • ENABLING DATA PROTECTION IN A SNAPMANAGER PROFILE
  • ASSIGNING A RESOURCE POOL IN PROTECTION MANAGER


APPENDIX C: ENABLING RBAC IN SNAPMANAGER 3.0 FOR ORACLE

APPENDIX L: SAMPLE DATABASE VOLUME LAYOUTS


Enjoy the reading!

All the best

neto
NetApp - I love this company

April 17, 2009

SMO Wizard on NetApp Communities

Hi All,

This is neto from Brazil

How are you?

The SnapManager® for Oracle® (SMO) Wizard automates the process of assigning role based access control (RBAC) to users and creating SMO profiles integrated with Protection Manager.

http://communities.netapp.com/docs/DOC-2829

The Userguide describes how to use the SMO Wizard to perform tasks like installing, uninstalling, configuring, downgrading, and upgrading the following products:
• SnapManager for Oracle
• SnapDrive® for Unix® (SDU)
• Host Utilities (HU)
• NetApp® Storage Systems configuration (via SSH)
• Operations Manager (DFM)
• Protection Manager (PM)

If you need any help, please send comments on the link above or contact Karthikeyan Nagalingam and neto from Brazil.

All the best

neto
NetApp - MY LIFE

April 01, 2009

Some useful scripts - Part I

Hi All,

This is neto from Brazil

How are you?

Some useful scripts:

1) Profile to change ORACLE_SID

.bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

function sid {
export ORACLE_SID=$1
}

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export ORACLE_BASE=/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/11g
export ORACLE_SID=db
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
PS1='[\u@\h][${ORACLE_SID}][\w]\$ '
unset USERNAME


As we can see above, the function sid can be used as:

[oracle@mickey][db][~]$ echo $ORACLE_SID
db
[oracle@mickey][db][~]$ sid prod
[oracle@mickey][prod][~]$ echo $ORACLE_SID
prod

All the best,

neto
NetApp - I love this company!

March 04, 2009

Cloning Databases (from cloned databases)

Hi All,

This is neto from Brazil

How are you?

To clone a database

Nowadays, to clone databases in seconds and without requiring additional storage space is a simple task for DBA's (of course with NetApp technology)

Creating a BACKUP from Production Database (SPANKY3)

Creating a CLONE from Production Database (SPANKY3)

The purpose of cloning databases is for QA, dev, testing patches... all testing purposes. But, why not to make backups and clones from the cloned database? where a clone of the clone database can help DBA's to have backups and clones of their testing environments. Again, with NetApp this is very easy.

Creating a PROFILE from cloned database (GOLDEN) - 1st clone























Creating a BACKUP from cloned database (GOLDEN) - 1st clone













Creating another CLONE from cloned database (GOLDEN) - 2nd clone













Summary:

spanky3 - Production Database

    golden - cloned database from spanky3

      dev - cloned database from golden

        QA - cloned database from dev

Etc, etc, etc


All the best

neto

NetApp - I love this company!

SMO - I love this product!

March 03, 2009

Snow White and the Seven Dwarfs

Hi All,

This is neto from Brazil

How are you?

Last week, I was reading SnapManager for Oracle code (as usual) and my daughters Anna Julia (7) and Maria Clara (1 year and 10 months) asked to tell them a story.

I was afraid because I'm not good with stories.

I have started with:

Once upon a time . . . in a great castle, a Princes grew up happy and content. She was very pretty, with blue eyes and long black hair (even I don't have hair). Her name is (ops ... I forgot the name ... Ah.. "NetApp"). Everyone was quite sure that "NetApp" is very beautiful, smart with a fantastic technology. 

An older witch called "Your Excellency, Mr. Complexity", was also very beautiful many years ago. A magic mirror told her how beautiful she still is every day, whenever she asked it.

"Mirror, mirror on the wall, who is the loveliest lady in the land?" The reply was always: "You are, your Majesty - Your Excellency, Mr. Complexity," until the dreadful day when magic mirror knew of NetApp and  the older witch heard it say, "NetApp is the loveliest in the land and you, Majesty are only one more in the land. NetApp is special!" 

The witch was furious and wild with jealousy. She began plotting to get rid of her rival. Calling one of her trusty servants, she bribed him with a reward to take all NetApp in the forest, far away from the Castle. The greedy servant, attracted to the reward, agreed to do this deed, and he led the NetApp away. However, when they came to the fatal spot, seven dwarfs were there to help NetApp. Their names are:

  • Data ONTAP
  • WAFL
  • Snapshot
  • FlexClone
  • SnapRestore
  • Deduplication
  • SMO

All seven dwarfs helped NetApp thwart the old witch, with the newest technology innovating the storage world, NetApp has been receiving by magic, the number #1 of customer choices.

From that day on, NetApp has been lived happily in a great castle.   

When I realized, my daughters were sleeping like angels. 

All the best 

neto 

NetApp - I love this company!

January 22, 2009

NetApp - I love this company!

Hi All,

This is neto from Brazil

How are you?

I am thrilled to announce that NetApp is ranked #1 on FORTUNE Magazine’s 2009 list of “100 Best Companies to Work for”.

http://money.cnn.com/magazines/fortune/bestcompanies/2009/index.html

Video: http://money.cnn.com/video/ft/#/video/fortune/2009/01/21/fortune-bctwf-netapp.fortune

Thank you NetApp for giving me the opportunity, pleasure and honor to be part of this family. Also, thanks for trust on my job.

On January, 29th, will be my NetApp Birthday, I will complete 8 years in a wonderful place; the best place to live!

On my prayers, I already said one thing to “Papai do Céu”:

“Papai do Céu", Thank You for all good things that you gave to me. I am grateful for what I have. “Papai do Céu”, you already gave to me one the best things that I have received… be part of NetApp Family. Thank You. I wish to be at NetApp for all my life.

I am humbled.

All the best

neto

NetApp - #1 Place to Work - I love this company!

January 17, 2009

Remote Connection using SnapDrive for Windows (SMO 2.2 Snapshots) to be used for TAPE Backups

Hi All,

This is neto from Brazil

How are you?

Here you go an example about remote connection using SnapDrive for Windows installed on Backup Server to connect consistent snapshots from SnapManager for Oracle 2.2 to be used for TAPE Backups.

Thank you very much my friends Ederson and Kleber for the pleasure and all support on this work.

Script to Connect

REM ##############################################################

@echo off

REM
REM CREATED BY Ederson Crippa (BSH CONTINENTAL), neto from Brazil (NetApp) and Kleber Silva (Columbia Storage)
REM

echo *** Setting Global Variables ***
echo ********************************
SET FILER=HORNA002
SET BACKUPSERVER=HORWNW01
SET CLUSTER=HORWDBCL01
SET VIRTUALSERVER=HORWDBCL01VS01

echo.
echo *** Mapping DATAFILES for Backup ***
echo ************************************
SET VOL=/vol/gfadata/.snapshot
SET LUN=GFADATA.lun
SET DEST_MAP=G:\HORPGFA\HORPGFA
SET DEST_SNAP=G:\HORPGFA
SET FILE=GF_RECENT_DATA.TXT

sdcli snap list -m %VIRTUALSERVER% -d %DEST_SNAP% | GREP "Consistent snapshot copy" | head -1 | awk "{ print $1}" > %FILE%

FOR /F " tokens=*" %%A IN ('type %FILE%') DO SET label=%%A
sdcli disk connect -p %FILER%:%VOL%/%LABEL%/%LUN% -d %DEST_MAP% -IG %BACKUPSERVER% %BACKUPSERVER% -dtype dedicated -c %CLUSTER%

echo.
echo *** Mapping LOGS for Backup  ***
echo ********************************
SET VOL=/vol/gfalogs/.snapshot
SET LUN=GFALOGS.lun
SET DEST_MAP=G:\HORPGFA\ORALOGS
SET DEST_SNAP=G:\HORPGFA\ORALOGS
SET FILE=GF_RECENT_LOGS.TXT

sdcli snap list -m %VIRTUALSERVER% -d %DEST_SNAP% | GREP "Consistent snapshot copy" | head -1 | awk "{ print $1}" > %FILE%

FOR /F " tokens=*" %%A IN ('type %FILE%') DO SET label=%%A
sdcli disk connect -p %FILER%:%VOL%/%LABEL%/%LUN% -d %DEST_MAP% -IG %BACKUPSERVER% %BACKUPSERVER% -dtype dedicated -c %CLUSTER%

echo.
echo *** Mapping ARCHIVES for Backup  ***
echo ************************************
SET VOL=/vol/gfaarch/.snapshot
SET LUN=GFAARCH.lun
SET DEST_MAP=G:\HORPGFA\ORAARCH
SET DEST_SNAP=G:\HORPGFA\ORAARCH
SET FILE=GF_RECENT_ARCH.TXT

sdcli snap list -m %VIRTUALSERVER% -d %DEST_SNAP% | GREP "Consistent snapshot copy" | head -1 | awk "{ print $1}" > %FILE%

FOR /F " tokens=*" %%A IN ('type %FILE%') DO SET label=%%A
sdcli disk connect -p %FILER%:%VOL%/%LABEL%/%LUN% -d %DEST_MAP% -IG %BACKUPSERVER% %BACKUPSERVER% -dtype dedicated -c %CLUSTER%

REM ##############################################################

 

Script to Disconnect

REM ##############################################################

@echo off

REM
REM CREATED BY Ederson Crippa (BSH CONTINENTAL), neto from Brazil (NetApp) and Kleber Silva (Columbia Storage)
REM

echo *** Disconnecting DATAFILES ***
echo *******************************

sdcli disk disconnect -m %BACKUPSERVER% -d G:\HORPGFA\HORPGFA\

echo.
echo *** Disconnecting LOGS ***
echo **************************
sdcli disk disconnect -m %BACKUPSERVER% -d G:\HORPGFA\ORALOGS\

echo.
echo *** Disconnecting ARCHIVES ***
echo ******************************
sdcli disk disconnect -m %BACKUPSERVER% -d G:\HORPGFA\ORAARCH\

REM ##############################################################

All the best

neto

NetApp - I love this company!

© NetApp, Inc.  |  "Safe Harbor" Statement