Archive for the ‘NonGlobal Zone’ Category

Virtualization Options with Solaris

Thursday, July 2nd, 2009

Disclaimer: Some of the graphics on this presentation have been borrowed from presentations by others and the content itself has been compiled from documentation from Sun.

I had presented this piece in a Lunch and Learn session with my team.

Solaris Virtualization


Uploaded on authorSTREAM by dlahiri

Oracle 10G R2 and ASM in a Solaris Non-Global Zone

Friday, August 22nd, 2008

It’s been a while since I’ve made any posts. I am looking to migrate the site shortly (host it privately). But here’s one I thought I’d share with my thousands of anonymous readers.

Really folks…if you like what you read here…post a few lines. If you hate it…post that too!

Global Zone configuration

Add the oracle user and dba group

vistatst-01:$() # grep dba /etc/groupdba::600:vistatst-01:$() # grep oracle /etc/passwdoracle:x:101:600:Oracle DBA:/u01/app/oracle:/usr/bin/ksh

Configure LUNs for Oracle ASM formatting

c4t6006016030C01C00EC2DC1FE8052DD11d0s2 is ASM disk...Let's inspect it's partition table...       2      5    01          0 104852480 104852479       6      0    00       2560 104849920 104852479c4t6006016030C01C009698C4458152DD11d0s2 is ASM disk...Let's inspect it's partition table...       2      5    01          0 104852480 104852479       6      0    00       2560 104849920 104852479c4t6006016030C01C0046A8487A8152DD11d0s2 is ASM disk...Let's inspect it's partition table...       2      5    01          0 104852480 104852479       6      0    00       2560 104849920 104852479c4t6006016030C01C00CEF5BFAA8152DD11d0s2 is ASM disk...Let's inspect it's partition table...       2      5    01          0 104852480 104852479       6      0    00       2560 104849920 104852479vistatst-01:$() #

(!) Here we have chosen to set up slice 6 as the “disk” with cylinder 0 being excluded by manually partitioning it. The starting sector count (as you can observe is 2560 instead of sector 0).

Make oracle:dba the owner of these LUNS.

vistatst-01:$() # for i in `vxdisk list|grep invalid|awk '{print $1}>lrwxrwxrwx   1 oracle   dba           67 Jul 15 16:50 /dev/rdsk/c4t6006016030C01C00EC2DC1FE8052DD11d0s2 -> ../../devices/scsi_vhci/ssd@g6006016030c01c00ec2dc1fe8052dd11:c,rawlrwxrwxrwx   1 oracle   dba           67 Jul 15 16:50 /dev/rdsk/c4t6006016030C01C009698C4458152DD11d0s2 -> ../../devices/scsi_vhci/ssd@g6006016030c01c009698c4458152dd11:c,rawlrwxrwxrwx   1 oracle   dba           67 Jul 15 16:50 /dev/rdsk/c4t6006016030C01C0046A8487A8152DD11d0s2 -> ../../devices/scsi_vhci/ssd@g6006016030c01c0046a8487a8152dd11:c,rawlrwxrwxrwx   1 oracle   dba           67 Jul 15 16:50 /dev/rdsk/c4t6006016030C01C00CEF5BFAA8152DD11d0s2 -> ../../devices/scsi_vhci/ssd@g6006016030c01c00cef5bfaa8152dd11:c,raw

And change the ownerships of the underlying files…

crw-r-----   1 oracle   dba      118, 426 Aug 14 13:41 devices/scsi_vhci/ssd@g6006016030c01c00ec2dc1fe8052dd11:c,rawcrw-r-----   1 oracle   dba      118, 418 Aug 14 13:41 devices/scsi_vhci/ssd@g6006016030c01c009698c4458152dd11:c,rawcrw-r-----   1 oracle   dba      118, 402 Aug 14 13:41 devices/scsi_vhci/ssd@g6006016030c01c0046a8487a8152dd11:c,rawcrw-r-----   1 oracle   dba      118, 434 Aug 14 13:41 devices/scsi_vhci/ssd@g6006016030c01c00cef5bfaa8152dd11:c,raw

Configure Solaris Non-Global Zone (NGZ)

vistatst-01:$() # zonecfg -z vistatst-01-z01 set limitpriv=default,proc_priocntlvistatst-01:$() # zonecfg -z vistatst-01-z01 exportcreate -bset zonepath=/zonefiles/vistatst-01-z01set autoboot=trueset limitpriv=default,proc_priocntlset ip-type=sharedadd netset address=10.10.10.119set physical=ce0endadd deviceset match=/dev/rdsk/c4t6006016030C01C00EC2DC1FE8052DD11d0s6endadd deviceset match=/dev/dsk/c4t6006016030C01C00EC2DC1FE8052DD11d0s6endadd deviceset match=/dev/rdsk/c4t6006016030C01C009698C4458152DD11d0s6endadd deviceset match=/dev/dsk/c4t6006016030C01C009698C4458152DD11d0s6endadd deviceset match=/dev/rdsk/c4t6006016030C01C0046A8487A8152DD11d0s6endadd deviceset match=/dev/dsk/c4t6006016030C01C0046A8487A8152DD11d0s6endadd deviceset match=/dev/rdsk/c4t6006016030C01C00CEF5BFAA8152DD11d0s6endadd deviceset match=/dev/dsk/c4t6006016030C01C00CEF5BFAA8152DD11d0s6endadd datasetset name=vinmarttstpoolendvistatst-01:$() #vistatst-01:$() # zoneadm -z vistatst-01-z01 reboot

(!) Set up CSSD to start up

/!\ If CSSD doesn’t start up at this point — run the following command from $ORACLE_HOME/bin

#./localconfig resetvinmartst-01:$(bin) # ./localconfig resetSuccessfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'root'..Operation successful.Configuration for local CSS has been initializedAdding to inittabAug 14 11:58:36 vinmartst-01 root: Oracle Cluster Synchronization Service starting by user request.Startup will be queued to init within 30 seconds.Checking the status of new Oracle init process...Expecting the CRS daemons to be up within 600 seconds.Aug 14 11:58:36 vinmartst-01 root: Cluster Ready Services completed waiting on dependencies.CSS is active on these nodes.        vinmartst-01CSS is active on all nodes.Oracle CSS service is installed and running under init(1M)

Verify that cssd is running in the process table —

vinmartst-01:$(bin) # ps -ef|grep css  oracle  9120  8207   0 11:58:36 ?           0:00 /u01/app/oracle/product/10.2.0/db_1/bin/ocssd.bin    root  9220  8373   0 11:59:59 console     0:00 grep css

Verify that the LUNs are visible to the NGZ —

vinmartst-01:$(.oracle) # ls -alrt /dev/rdsktotal 4drwxr-xr-x   2 root     root         512 Aug 12 16:34 .drwxr-xr-x  12 root     root        1024 Aug 14 11:57 ..crw-r-----   1 oracle   dba      118, 422 Aug 14 13:46 c4t6006016030C01C009698C4458152DD11d0s6crw-r-----   1 oracle   dba      118, 430 Aug 14 13:55 c4t6006016030C01C00EC2DC1FE8052DD11d0s6crw-r-----   1 oracle   dba      118, 438 Aug 14 14:10 c4t6006016030C01C00CEF5BFAA8152DD11d0s6crw-r-----   1 oracle   dba      118, 406 Aug 14 14:10 c4t6006016030C01C0046A8487A8152DD11d0s6

vinmartst-01:$(.oracle) # ls -lart /dev/dsktotal 4brw-r-----   1 oracle   dba      118, 430 Aug 12 16:34 c4t6006016030C01C00EC2DC1FE8052DD11d0s6brw-r-----   1 oracle   dba      118, 438 Aug 12 16:34 c4t6006016030C01C00CEF5BFAA8152DD11d0s6brw-r-----   1 oracle   dba      118, 422 Aug 12 16:34 c4t6006016030C01C009698C4458152DD11d0s6brw-r-----   1 oracle   dba      118, 406 Aug 12 16:34 c4t6006016030C01C0046A8487A8152DD11d0s6drwxr-xr-x   2 root     root         512 Aug 12 16:34 .drwxr-xr-x  12 root     root        1024 Aug 14 11:57 ..

/!\ Run Oracle Installer and do the rest of the stuff that needs to be done!

References