Monday, December 31, 2012

2011 -- a (delayed) recap...

I just realized, I didnt write up my recap for 2011.  Tells you how busy my year has been and how fast time has flown that it's April 30th, 2012.

The year was so busy, I dont remember much.

January 2011 rolled around -- we had our little one in Sept 2010, so time was really flying.  I barely noticed it as I was working constantly, and even from the delivery room I should mention.  Our project at work, finally went live in January, delayed, but went live.

Roll forward to March where we did a stability release for the product, which made my life so much saner.  I wasn't being called in the middle of the night to troubleshoot the product anymore!

We went to July / Aug India in 2011, so it was really great to meet all my family and celebrate.  I worked out of the Mumbai office for a week which was interesting to the least.  Definitely a change in culture, and tone compared to working in the US.  Especially true, since I was working UK hours, so that I could talk to my colleagues back home, and still go back to the hotel at a decent hour!  Mumbai has changed significantly, yet  landing in Mumbai, the view from the air gave me a shock of my life.  Not to mention just walking down the road from my hotel, I found a bicycle repair guy living in literally a treehouse, and he had a ladder going up to his "house".  What was unbelievable was, he had 2 kids who were running around!!!  Really -- gives you a pause to think - when we the educated and probably middle class think many times about the future of our children - he doesnt -  he just has his kids as a matter of fact!

August was great, as we celebrated Aarathi's birthday (my niece).  I haven't been around for one her birthdays since 1999 - so this was excellent.  Lots of fun!  She'll probably get married soon, so this was one of the last birthdays we were all able to play pranks on and have a "kiddish" time :)

We also had a couple of ceremonies for Vaibhav ( the new one :) ).  Those occasions brought together all our friends and relatives at one place, and was great to meet all of them.

We came back to the US, and then it's back to the grind.  Pranav started First Grade, Vaibhav turned one in September, and we did his birthday party at our friend Suresh's community hall.  That was fun too.  My Brother-in-law, sister-in-law and my in-laws were all here.  So it was enjoyable and fun.  One of the most memorable moments was when Vaibhav barely a year old was being carried by our friends and he pointed to a photograph of his mom on the camera and pointed his finger out back to the hall -- his intention " take my to my mom!".  That was unbelievable.  The power of kids without even saying a word :)

Ofcourse, we also celebrated my wife's birthday in September.

My birthday was low key again in November.  December rolled around and we're off into 2012.  

2012 is almost over...and boy am I glad....



I try to do this every year...where I think about the year...so here goes this one!

Started out with my wife having surgery for a relatively minor nail issue, turned out into a 3 week saga.  The year then dragged on with work - where Travelex Global Business Payments separated from Travelex, and we were busy integrating with Western Union.

Ofcourse, I can't forget our 8 years anniversary we hit on Jan 24th.  Thats always the pleasant beginning for me, where I think about the wonderful time of the last 8 years with my wife.

This March - unbelievably - we got our green card!

The next memorable event was in April when Pranav turned 7.  A small party at home with his friends - which we all enjoyed.

My parents came to the US in June - since my dad retired in 2011 December, he's been getting used to not having to get up and get to work everyday!  He moved back to India, to set up our house in Chennai. Then in the US on June 8th.  Mom & Dad stayed till 15th October - so thats always fun!  Vaibhav got used to his grandparents, and Pranav had a blast.  Finally Lavanya & I were able to take a weekend and go off to by ourselves.  That was a short and fun weekend we had the weekend of the 15th Sept, 2012!  This was also our way of specially celebrating Lavanya's birthday :).  We had a family Birthday for her after!

We celebrated Vaibhav turning 2 in a small fashion as well - we expect we'll be celebrating his 3rd birthday in a much bigger fashion.

We went to Diya on Oct 12th to celebrate Dad's birthday and then they started getting ready to head back to Chennai!

Ofcourse, right after they came, I had to have surgery for a pinched nerve on the right hand - bummer - and then right after they left Nov 7th - the same thing on the left hand - big bummer.

Then came by Birthday - Lavanya gave me a Mac Book Pro for my birthday - that I enjoy very much!

There is also something that happened in December, that I can write about, but it definitely changed my perspective about how much my work is appreciated!  It was a good feeling!

This year has been one of the most roller coaster years I've ever had!!!  Ever!  Most of it has to do with family health issues....started with my wife, then me twice!!!  Three surgeries this year is enough!  I'm hoping to have a much more pleasant 2013.

If you're reading this - Happy New Year to you too!

PS: Photos hopefully to follow soon....

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.