Monday, December 27, 2010

Solaris Jumpstart - setting up the ISO

Step 1: Download the Solaris OS from Oracle
wget --http-user= --http-password= --no-check-certificate --output-document=sol-10-u9-ga-sparc-dvd-iso.zip http://download.oracle.com/otn/solaris/10/sol-10-u9-ga-sparc-dvd-iso.zip &

a. wget may be installed in /usr/sfw/bin, so check that location as well, before you go hunting for wget.
b. This command will seem like it's hanging, but tail the output file, and you'll see the download status.


Step2:
Unzip the file.

Step 3:
Mount the ISO
a. Create a block device for the ISO:

[root@gpadev-sol-x86:/export/depot]# lofiadm -a /export/depot/sol-10-u9-ga-sparc-dvd.iso
/dev/lofi/1

b. Mount it.
[root@gpadev-sol-x86:/export/depot]# mount -F hsfs /dev/lofi/1 /mnt

Step 3

a. Create a directory where you want the media to reside at.
mkdir -p /export/depot/s10upd9

b. Use the Solaris Tools to copy over the Install media to the directory you want. Dont just to a cp!

[root@gpadev-sol-x86:/export/depot/s10upd9]# cd /mnt/Solaris_10/Tools/
[root@gpadev-sol-x86:/mnt/Solaris_10/Tools]# ls
add_install_client Boot dial Installers rm_install_client setup_install_server

c. Use the "setup_install_server" command
[root@gpadev-sol-x86:/mnt/Solaris_10/Tools]# ./setup_install_server -w /export/depot/s10upd9 /export/depot/s10upd9
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk...
Copying Install Boot Image hierarchy...
Copying /boot netboot hierarchy...
Install Server setup complete


Step 4:
Add to the Jumpstart server the location.

Step 5:
Remove the lofi device.

lofiadm -d /dev/lofi/1

Verify:
lofiadm

Sun Hardware handy tools

I came across ipmitool recently, and it is really handy when you need information about your machine (Serial Number, amount of memory etc)

Eg:
Whats the Serial Number of the Sun Blade?

ipmitool -H blade ILO IP-U root fru | grep "Product Serial"

Whats the Serial Number of the Sun Chassis
ipmitool -H chassis ilo ip -U root fru | grep "Product Serial"

How much memory do I have? (I had just installed some 4Gb dimms)
ipmitool -H blade ilo ip -U root fru | grep 4096MB | wc -l
Password:
24

i.e 24 dimms installed.

Friday, December 10, 2010

Oracle Grid control -- Removing EM Targets cleanly

Update: I found that this works in Enterprise Manager 12c as well.

I was installing Grid Control agents on some of my middleware boxes, and ofcourse, the hostname got messed up when I did the silent install. My number of attempts to remove the entry from Grid control had no use. A quick google search revealed, I had to connect to the EMREP database on the Grid Control Server and remove it.

On the Grid Control Server

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
emrep


Get a list of all the targets...

oragrid@emhost$ sqlplus '/ as sysdba'

SQL> select target_name from mgmt_targets where target_type='oracle_emd';

Remove the offending target:
SQL> exec mgmt_admin.cleanup_agent('offendingTarget:3872');

After a minute or more, voila, "PL/SQL procedure successfully completed."

Refresh my Grid Control screen, and it's all gone.

Got to give credit where due: I found it here

Wednesday, September 22, 2010

Solaris things...

I've been working with Solaris a lot, and we recently started with ZFS as well. Perhaps I'm missing something, but "top" & prstat dont report the correct amount of Memory free (RAM) on the machine when using zfs and neither does vmstat.

After some google searching, I found this helpful blog and thought I'd report. Thanks to "milek.blogspot.com" for this:



#!/bin/bash
#########
# Copied from http://milek.blogspot.com/2006/09/how-much-memory-does-zfs-consume.html
# to get correct reading of Free Memory
#

FREE=$(($(pagesize)*$(kstat -p unix:0:system_pages:freemem|awk '{print $NF}')))
ZIO_BUF=$(kstat -p zfs:0:arcstats:size|awk '{print $NF}')
FREE_MEM=$(((FREE+ZIO_BUF)/1024))
echo "Free Memory: $FREE_MEM MB"
FREE_MEM=$(((FREE+ZIO_BUF)/1024/1024))
echo "Free Memory: $FREE_MEM GB"



Next one was backups. We use Solaris 8 Branded Zones heavily to migrate off from our old Solaris environment. I started using ufsdump for backups, since this was not ZFS.

Well, trying to restore using ufsrestore, caused a ton of problems.

The simple
zoneadm -z s8zone install -a dumpfile

would give me weird errors such as " Sanity Check: Missing etc at /mnt"


Decided to use a ufsrestore, and that didnt help since zoneadm didn't know how to get it up.

Long story short, I did the following

1. Do a ufsrestore on to the disk
2. Used Zonecfg to create the configuration
3. Manually edited the /etc/zones/index file to modify the entry to match the backup version (with new name).

The index file would look like this:

global:installed:/
hostname:installed:/export/zones/app30qa:some id
hostname:installed:/export/zones/s8qa2flar:some id


This made zoneadm think that it was "installed" and I was finally able to boot up.

Thursday, September 09, 2010

11 years....

Whoa! I just realized, that this past August, it's been a full 11 years since I landed in the good ol' US of A in 1999. The twists and turns life has taken is interesting to say nonetheless. However, there is a small part of me that has regrets....

I didn't go back to India as I once thought I would by this time, but more than that, the fact that I'vent been able to be an entrepreneur in this country is hitting me the hardest. I keep thinking of going back, but life keeps taking turns. The worst part however, is the American immigration system that allows illegals to do what they please, but the ones like me who are following the law, be at the end of the line to get a Green Card. Bah!

The positives are definitely there too....better quality of life. A nice townhome, a lovely wife, two wonderful sons now (the second one just born) are all positives....

Now, if I can just get through the sleepless nights and refocus on being back on the entrepreneur path, it would just be so awesome.

Thursday, May 13, 2010

Sucky Airlines

A friend of mine recently commented on how awesome Southwest is, and how sucky the rest of the airlines are on his blog post here

Today, the WSJ had an article regarding Frequent Flyer miles and how easy it is to redeem them. Results are not surprising. Here's the link: "The Road to Redemption"

US Air & Delta were the suckiest of the lot. Southwest came up on top.

I hate almost all US based carriers, but United, Delta & US Air take top spots. For international travel, travelling by a US based carrier is like throwing away money to get tortured (atleast the few trips I've been on)


Thursday, March 11, 2010

What have I been doing?

Well...the past few months have been grueling at work (and still continues to be). My friends keep telling me to take a break, and its high time I do, but unfortunately...I'm addicted to it (for now)...

So...what have I done / learnt this past few months (starting November) with work?

Well...designed, architected (with a colleague) and currently leading the build of a Highly available Geo Clustered Oracle RAC cluster with Weblogic running on Sun Blades.

Whats cool about it....well ..everything is :-)
1. Implementing virtualization with Sun LDOMs & Zones.
2. Implemented a Sun Cluster to provide highly available Network File Storage (I keep thinking this would have been incredibly useful at my previous job, since we used to only NFS mount our shared storage area) instead of spending tons of money on redundant NAS devices (filers as some people like to call them in the Sun world)
3. Created an infrastructure so that any new Solaris or Linux machines can be quickly imaged with Jumpstart.
4. Implemented Sun directory server for LDAP with replication.
5. Java memory troubleshooting....

and many more...but those are some of the highlights.

On the personal front though....
We celebrated our 6 year anniversary...
and ofcourse we announced that we're expecting another child due in September!

Wednesday, February 24, 2010

Sun Cluster 3.2 with LDOM 1.3

I had to get a Sun Cluster 3.2 to create a HA-NFS on LDOM 1.3. LDOM 1.3 and Sun Cluster 3.2 now fully support Sun Clusters on Guest Domains not just the I/O Domain. This makes it incredibly useful.
I faced plenty of issues, and hoping that this post will serve as a guide to those who need to do it.
Setup:
1. 2 Physical T-6340 blades.
2. Control Domain that also serves as our I/O Domain.
3. 1 Guest Domain on each Server for Sun Cluster.
3. EMC Powerpath installed on the Control Domain

Storage:
Managed by EMC Powerpath
The devices will be seen as : emcpowerXa
1 LUN for each Sun Cluster domain
1 Shared LUN between the 2 physical blades

I want to note STRONGLY that you should first try using the powerdevices for the LDOM & Sun Cluster, and only if that doesnt work use the cXtXdX devices. Each configuration may be different and you may have better luck or a patch that I did not have at the time of my trial.

powermt display dev= will give you the underlying cXtXdX number (in the I/O Domain).
Present all devices in MPGroups to the LDOM (even for boot disk since we'll be using SVM with Sun Cluster) as cXtXdX devices.

3 disks to be presented in this example
1. Boot Disk (mpgroup: bdskgroup)
2. Quorum Disk (mpgroup: quroumgroup)
3. Shared Disk for storage (mpgroup: cludskgroup)

(Make sure to give an id to each of the vdisks that are presented to the LDOM so that they always are presented in the same order even on a reboot)

For each Sun Cluster LDOM present the VNETs from the VSWs in the order they're cabled for the private interconnect. This is important.

I used cross over cables.

Jumpstart and boot up the LDOM.
If you've done everything correctly you should see 3 devices when you do "format".

Install the Sun Cluster software with the NFS packages. Patch it appropriately.

I used the below instructions to create the cluster, however, its far easier in 3.2. Just create the metadb by configuring the SVM (instructions in link below) and then run scinstall. Once thats done run clsetup and follow the instructions for the NFS Service.
Copied from the above link:
2 nodes (hostname: node1, node2) with installed Solaris 10 01/06, patches, Sun Cluster, NFS agent for Sun Cluster, VxFS
Both nodes are connected to the FC SAN storage, 8 storage LUNs are mapped to each node.

Configure SVM
On both nodes
Create the 25MB partition on the boot disk (s7)
Create the SVM database replica
metadb -afc 3 c0d0s7 (c0t0d0s7 on sparc)

On one node (node1)
- Create disk sets :
metaset -s nfs1 -a -h node1 node2
metaset -s nfs1 -t -f
metaset -s nfs1 -a /dev/did/rdsk/d2 /dev/did/rdsk/d3 /dev/did/rdsk/d4 /dev/did/rdsk/d5
metainit -s nfs1 d1 4 1 /dev/did/rdsk/d2s0 1 /dev/did/rdsk/d3s0 1 /dev/did/rdsk/d4s0 1 /dev/did/rdsk/d5s0
metastat -s nfs1 -p >> /etc/lvm/md.tab

metaset -s nfs2 -a -h node2 node1
metaset -s nfs2 -t -f
metaset -s nfs2 -a /dev/did/rdsk/d6 /dev/did/rdsk/d7 /dev/did/rdsk/d8 /dev/did/rdsk/d9
metainit -s nfs2 d1 4 1 /dev/did/rdsk/d6s0 1 /dev/did/rdsk/d7s0 1 /dev/did/rdsk/d8s0 1 /dev/did/rdsk/d9s0
metastat -s nfs2 -p >> /etc/lvm/md.tab
scp /etc/lvm/md.tab node2:/tmp/md.tab
ssh node2 'cat /tmp/md.tab >> /etc/lvm/md.tab'

- Create VxFS on shared devices -- I didnt do this.. I just did a newfs.
mkfs -F vxfs /dev/md/nfs1/rdsk/d1
mkfs -F vxfs /dev/md/nfs2/rdsk/d1

On both nodes
- Create the directories
mkdir -p /global/nfs1
mkdir -p /global/nfs2


http://docs.sun.com/app/docs/doc/819-0912/chapter1-1?l=en&a=view is the quick start guide, is some help as well (especially with the metadb setup), but they talk about LOCAL devices as HA-NFS, and that isn't want we're doing. :-)



Thursday, January 28, 2010

iPad

Yaay...the new Tablet. The name sucks, seriously iPAD? Sounds like a feminine hygiene product (thats what everyone else is saying too :P )

Anyways...I read through the specs and I really wanted to think it was cool, but...
1. Wheres the USB port?

Why the hell would I want to connect to my computer for everything? If you're making a revolutionary and magical device, wouldn't you want people to use it even without a bloddy computer to get my files? So, if I am in class and the other guy has his documents on a USB drive, how is he supposed to magically send it to my iPad?

2. No Flash Support? If I want to have a full media web browser, then I certainly want flash! Heck, you can't even log an Oracle support ticket without flash now! LAME.

3. Lame resolution. 1024 x 768 makes it sound like an age old monitor. Bah.

Whats cool is the price point. If it had a USB port, I'd probably pre order it and find a hack to get flash working...but now I'm really thinking if I need the device, even though it would have been an awesome replacement for my dieing laptop.

Travel in the US

I recently had to travel to Toronto (after the Christmas day attempted attack) and boy do I hate the airlines even more. I also travelled to Las Vegas which was mildly better but not by much... Where do I start?

1. Charging for checking in bags? Totally blows. Why would people travel without their f'ing clothes?
2. Airport security -- WTF. Why is America so scared? I think it's more political than actual fact. Seriously....on the way back from Toronto I wasn't allowed to carry my laptop bag, had to check it in (it was a bloddy Swiss Backpack).
2.1 The security check at the gate (no not the first x-ray check, one more before all the gates that lead to ANY US bound flights). They were Canadians, so they atleast smiled. Took out every single thing from my pocket and double signed my boarding pass and then someone else checked the double signature....seriously???
3. I hate hate hate all the bloddy airlines for their lack of professional service. Just hate them. We really need a new airline.

I think the Republicans should shut the f**k up and not create a hysteria. Sure some idiot tried to set off a firecracker, but wtf, seriously. Just really dumb. Makes us appear more scared than brave.