Showing posts with label solaris 11. Show all posts
Showing posts with label solaris 11. Show all posts

Thursday, July 10, 2014

Oracle Database Appliance - My case for Solaris


I just got to try out the Oracle database appliance (ODA).  It's supposed to be quick and easy to setup and get it running.  We've run into some intial hiccups, but this is a POC box and I'm not going to give Oracle grief here.

Here are my quick thoughts

Pros:
1.  Extremely easy to setup (hardware perspective)
2.  Very cost effective.
3.  Comes with lots of Storage and now allows expansion into another Storage Shelf.

Cons:

1.  Only Oracle Linux.  No Solaris.
2.  Only one ASM across all the databases.
3.  Patching has to be done in a particular order.  You can't simply patch Db, you need to patch hardware, OS and such, before you get to the Db patching (There is a hierarchy)
4.  When you start patching, depending upon what you're patching, ALL Databases need to be shutdown.  This is very hard to do, especially when you have multiple applications using Dbs hosted on the ODA.

So - where is Solaris and why you ask.

1.  Solaris 10 / 11 allows you to run Oracle RAC clusters in Zones.
2.  With Solaris, you can have Zones running your Oracle RAC, and multiple Oracle RAC instances can be spun up, especially with MULTIPLE ASMs running.  This will immediately allow you to patch your infrastructure one node at a time.
3.  The bonded connections with Solaris 11 makes it incredibly simple to work with.  This link specifically: Network Virtualization High Availability made me think of ODA on Solaris a lot more.
4.  Solaris 11 allows you to add disks to zones without a reboot (a big Solaris 10 limitation).
5.  Zones allow you to CPU cage.
6.  The Hardware is all based off the Sun systems.
7.  You can use ZFS for all OS disks.
8.  You can get away from the clunky OVM DOM0 world that the ODA appliance uses now.
9.  You can effortlessly do virtualization and use the VM Templates.
10.  CloudFS partition would be effortless too - just make a new ZPOOL and you're done!
11.  All this can be tied into Oracle Enterprise Manager & Oracle Ops Center for the hardware.
12.  All the patching can be made so much more effortless.


Tuesday, November 06, 2012

Network Interfaces with Vlan Tags in Solaris 11

If you're trying to plumb a NIC with a VLAN tag in Solaris 11, its not straight forward anymore!

First, Look for the interfaces that you have.


root@solaris:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net1              Ethernet             unknown    0      unknown   igb1
net3              Ethernet             unknown    10000  half      qlge3
net5              Ethernet             unknown    10000  half      qlge2
net0              Ethernet             unknown    0      unknown   igb0
net2              Ethernet             unknown    10000  full      qlge0
net9              Ethernet             unknown    10000  half      qlge1



This is a brand new install and T4 blade with the QLogic 10Gb CNA cards.  I had to figure out manually which one of these were connected to what.  

However, first things first.  To use a Tagged VLAN for the network interface, first use dladm create-vlan to create a new network interface.


root@solaris:~#  dladm create-vlan -l net2 -v 11
root@solaris:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net1                phys      1500   unknown  --
net3                phys      1500   unknown  --
net5                phys      1500   unknown  --
net0                phys      1500   up       --
net2                phys      1500   up       --
net9                phys      1500   up       --
net11002            vlan      1500   up       net2

 Next plumb the interface


root@solaris:~#  ifconfig net11002 plumb  netmask 255.255.255.0 broadcast + up

You should now be able to SSH to the IP (if the default gateway is set right).  Run netstat -rn to see the default gateway.  If it's not set - "route add default " will do the trick.

If it is the wrong port, then you can just as easily run


root@solaris:~# dladm delete-vlan net11002

This will remove the new interface.





Monday, January 30, 2012

Solaris 11, Oracle 11g & EM12C

I've just started using Solaris 11, this is my first ever install of it.

Solaris 11

Downloaded the text installer, mounted it as lofi, and then created an LDOM by booting off the ISO. I've not tried the Automated Installer (AI) yet.

I realize that there isn't much information here, but really, there wasn't much to do.

Add ISO to LDOM:

ldm add-vdsdev /sol11/sol-11-1111-text-sparc.iso sol11iso@primary-vds0
ldm add-vdisk id=1 sol11iso sol11iso@primary-vds0 orcem12c


Show Disks on LDOM Ok prompt:
{0} ok show-disks
a) /virtual-devices@100/channel-devices@200/disk@1
b) /virtual-devices@100/channel-devices@200/disk@0
c) /iscsi-hba/disk
q) NO SELECTION
Enter Selection, q to quit: a
/virtual-devices@100/channel-devices@200/disk@1 has been selected.


Boot from Disk 1 (as thats what the ID is for the ISO). Also choose slice "f"

{0} ok boot /virtual-devices@100/channel-devices@200/disk@1:f

Follow the installer along and give appropriate credentials. A user will need to be created, as root login is disabled by default.

To allow root login:

1. Change "PermitRootLogin" to "yes" in the /etc/ssh/sshd_config file.
2. Comment out "#CONSOLE=/dev/console" in the /etc/default/login file to allow non-console root login.
3. Switch the role of the root user "rolemod -K type=normal root"


Oracle 11g (11.2.0.3 Install)

Prerequisite

Before you start the install of EM 12c, update the Solaris 11 packages, or the OEM 12c installer will probably throw an error.

If this is a fresh install of Solaris 11, make sure to update the Publisher.  The directions are at the Oracle Solaris 11 Certificate Site.

Once you download the certificates then do the following (from Oracle's site)
  1. Download the provided key and certificate files, called Oracle_Solaris_11_Support.key.pem andOracle_Solaris_11_Support.certificate.pem using the buttons above. Don't worry if you get logged out, or lose the files. You can come back to this site later and re-download them. We'll assume that you downloaded these files into your Desktop folder,~/Desktop/.
  2. Use the following comands to make a directory inside of /var/pkg to store the key and certificate, and copy the key and certificate into this directory. The key files are kept by reference, so if the files become inaccessible to the packaging system, you will encounter errors. Here is how to do it:
     $ sudo mkdir -m 0755 -p /var/pkg/ssl
     $ sudo cp -i ~/Desktop/Oracle_Solaris_11_Support.key.pem /var/pkg/ssl
    
     $ sudo cp -i ~/Desktop/Oracle_Solaris_11_Support.certificate.pem /var/pkg/ssl
     
  3. Add the publisher:
     $ sudo pkg set-publisher \
                -k /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
                -c /var/pkg/ssl/Oracle_Solaris_11_Support.certificate.pem \
                -G '*' -g https://pkg.oracle.com/solaris/support/ solaris
     
  4. Check your publisher settings, there should be no unrelated mirrors set up. To check for any set up mirrors invoke the following command:
     $ pkg publisher solaris | grep Mirror
     
     
    If the output is empty you are all set. If not remove unrelated mirrors by running:
     $ sudo pkg set-publisher -M http://mirror1.x.com -M http://mirror2.y.com ... solaris
     
     
  5. To see the packages supplied by this publisher, try:
     $ pkg list -a 'pkg://solaris/*'

Next update packages. Oracle site lists the directions : here.

Steps are as follows:
  1. First, we use pkg update with the --accept option to update a small set of system packages and then we reboot:

    # pkg update --accept
    # reboot
    
  2. (SPARC only) If you are running on a SPARC system and have any Oracle Solaris Zones installed, you will need to perform an additional step at this stage. For each zone installed on the system, you will need to remove thepkg:/system/ldoms/ldomsmanager package as follows:

    # for z in `zoneadm list`; do zlogin $z pkg uninstall ldomsmanager; done
    
  3. Next, update the IPS package itself:

    # pkg update pkg:/package/pkg
    
  4. Last, update the rest of the system packages and reboot the system.

    To update, we use the --accept flag to pkg update to agree to and accept the terms of the licenses that are being updated. We also use the --be-name flag to provide a new name to the boot environment that will be created.
    # pkg update --be-name s11.1ga --accept
    # reboot


First things first, rebuild the Package index and then get the X packages installed:

pkg rebuild-index

Test to make sure you have all the required packages
pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWpool SUNWpoolr SUNWsprot SUNWtoo SUNWuiu8 SUNWfont-xorg-core SUNWfont-xorg-iso8859-1 SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs SUNWxwfsw SUNWxwplt

Install packages that are needed.

pkg install compatibility/packages/SUNWxwplt SUNWmfrun SUNWarc SUNWhea SUNWlibm

pkg install x11/xclock

Add Swap if you dont have enough (You'll need about 16Gb depending upon the RAM you've allocated to the LDOM).

zfs create -V 14G swpool/swap14G
swap -a /dev/zvol/dsk/swpool/swap14G

Edit the /etc/vfstab to add the new swapfile.

/dev/zvol/dsk/swpool/swap14G - - swap - no -

I found that Timezone wasn't set. In Solaris 11, all the properties have moved to SMF.
root@orcem12c:~# svcs -a | grep environ
online 17:45:30 svc:/system/environment:init
root@orcem12c:~# svccfg -s system/environment:init
svc:/system/environment:init> listprop environment/TZ astring
svc:/system/environment:init> setprop environment/TZ=US/Eastern
svc:/system/environment:init> validate
svc:/system/environment:init> end

Install Oracle 11g. I choose to use the file storage instead of ASM for the Db disks.

Create new Pool for /opt/app/Oracle & /opt/app/oradata (to hold all the Software & Db files respectively)
zpool create -f -m /opt/app/Oracle swpool c2d1s0
zpool create -f -m /opt/app/oradata dbpool c2d2s0

Requirements for the Db:

1. 2G SGA.
2. Redo log files must atleast be 300Mb with 3 Redo logs.

SQL> alter database
2 add logfile ('/opt/app/oradata/dbfiles/EM12C/em12redo01.log') Size 300M;

Database altered.

SQL> alter database
2 add logfile ('/opt/app/oradata/dbfiles/EM12C/em12redo02.log') Size 300M;

Database altered.

SQL> alter database
2 add logfile ('/opt/app/oradata/dbfiles/EM12C/em12redo03.log') Size 300M;

SQL> alter system switch logfile;

If adding logfiles, you can drop the old ones. If the Db complains that it cant drop a logfile (if you need to), run "alter system checkpoint". You cannot drop a logfile in "Current" status.

SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC
---------- ---------- ---------- ---------- ---------- ---------- ---
STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------------- ------------- --------- ------------ ---------
4 1 13 314572800 512 1 NO
INACTIVE 1089635 29-JAN-12 1089642 29-JAN-12

5 1 14 314572800 512 1 NO
CURRENT 1089642 29-JAN-12 2.8147E+14

6 1 0 314572800 512 1 YES
UNUSED 0 0


I had to make the following changes:

SQL> alter system set session_cached_cursors=300 scope=spfile;

System altered.

SQL> alter system set job_queue_processes=20;

System altered.

SQL> alter system set shared_pool_size=600M scope=spfile;

System altered.



EM12C (Cloud control) Install

Once I made all the above Db changes, I was able to get through the installer using the "Simple" option.

The only error message after all this, was that there wasn't an EM tablespace with an autoextend datafile. Since I didnt create a tablespace, so I proceeded.


Once the install finishes, I logged in with https://:port/em. Login with the user sysman.