Posts Tagged ‘solaris’

Open High Availability Cluster

Saturday, May 31st, 2008

A year ago Sun announced that it was going to be open sourcing its high availability cluster software. According to this blog, they are now delivering on that promise six months ahead of schedule by releasing two million lines of code. TWO MILLION!!!! thats loads! OHAC isn’t quite the same as Solaris Cluster. Its basically most of the code base, but not all packaged up and is not currently supported by Sun. However, Sun is intending on moving the development work away from the official product and onto the OHAC in the future. This is great news for anyone thinking of developing there own custom agents for their own software, or for anyone who just wants to poke around some enterprise-class cluster software!

project indiana is born!

Monday, May 5th, 2008

The latest version of Opensolaris can be found at opensolaris.com . This was known as project indiana whilst in development and is now yours absolutely free! (support does cost). Its basically Sun’s home rolled distro of opensolaris.org , and now contains IPS (Image Packaging System) . Essentially IPS is like apt for ubuntu and debian:

you want netbeans?

pkg install netbeans

Theres also a graphical installer too! Theres a screencast you might want to watch which explains a little about how to use it, and what its about!

You should also note that its made it onto distrowatch.com, to rank 69!!!!Hopefully enough people will blog about the release to push that figure up!!!Surely it should make it to the top ten, for all the features it has?

Abusing Solaris with style

Saturday, April 19th, 2008

Turning Solaris to goo with destructive commands is something I’ve been enjoying for a while now, so its great to see someone add cash to the equation and take the next step in “squashing” bugs.. and hard drives.

:)

cd into, or make a directory beginning with a leading “-”

Saturday, April 12th, 2008

Having ZFS and SAMBA on the home machine is great. It was simple to set up a share and offer it out to my house mates for them to backup their dissertation work on. With ZFS compressing the files, some of my file systems are getting a 1.6x ratio (60% disk space for free compared with a non-compressing file system)

The interesting bit comes with file permissions and Windows file attributes which aren’t quite the same, in fact, not at all. The attributes get mapped onto the unix file permissions in an interesting way, and you’ll need to keep that in mind when ls -l ing around a shared directory.

Meanwhile, there was a directory named “—-FILES—-” on the share. Trying to use

cd "----FILES----"

doesn’t quite work! Despite quoting the directory name, cd still tries to take some of those dashes as a switch. I’m not sure if theres a way around this using the relative path, but there is a different workaround: simply use the absolute path, instead of a relative one to get you there, eg:

cd /mydir/----FILES..../

To make a directory with leading dashes, you’ll need to specify the full pathname, or use something like this to make the process less painful:

mkdir `pwd`/--mydir--

Abusing Solaris attempt #2: stressing out ZFS, PART1

Tuesday, March 11th, 2008

So last time we pulled out an IDE hard disk, and Solaris lived. It got me thinking…What else can we do to a hard disk that Solaris might not like? What about making a really big file? What about a 9TB file on an 80GB hard disk?:

anton@solaris-devx ~ $ time mkfile 9000G deleteThis

real 120m42.953s
user 0m16.448s
sys 46m55.092s

anton@solaris-devx ~ $ ls -l deleteThis
-rw------- 1 anton staff 9663676416000 Mar 9 02:22 deleteThis

And the machine didn’t die! But what about the compression ratio?

anton@solaris-devx ~ $ zfs get compressratio tank/home
NAME PROPERTY VALUE SOURCE
tank/home compressratio 1.22x

Looks like the ratio is an average for all the files on that file system. So lets try to artificially inflate this value. We can run a little script like this:

#/bin/sh
#A little script to make ten million files each 1 megabyte in size
i="0"
while [ $i -lt 10000000 ]
do
mkfile 10M la$i
i=$[$i+1]
done

The result (after about an hour of making files) wasn’t good:

bash: fork: Not enough space

This looks more like an issue bash had rather than ZFS. So did we push up that compression ratio?:

anton@solaris-devx mess $ zfs get compressratio tank/home
NAME PROPERTY VALUE SOURCE
tank/home compressratio 1.22x -

Seemingly not. To compensate, we’ll do something more crazy for PART2

VirtualBox, virtualisation for your Solaris Desktop!

Thursday, February 14th, 2008

So you’ve just installed Solaris because of the well-deserved praise regarding ZFS, SMF, predictive self healing, Zones and Dtrace. And then you said, “It runs vmware, right?”. Well, to my knowledge, no. Not quite. It does run xVM (a breed of “bare metal” type 1 hypervisor, which is very similar to xen.

But more interestingly, it also runs VirtualBox, a type 2 hypervisor which works pretty much like vmware server. This really is a great step to bringing virtualisation to the desktop for Solaris users

All you need to do is download the package, extract and and install it. From there on in, you can use the GUI to create a GuestOS and be running those apps you need! Crucially, it supports the following as Guest OS:

  • Windows XP
  • Linux (Ubuntu 7.10 works a treat)
  • Solaris!
  • …and many other OS, a list can he found here

A little tip to install XP in less than 10 mins:

Make a copy of the disc image as a .ISO file. Then copy that disc image to

/tmp

Be prepared for a hit on the RAM, as thats where /tmp is mounted! Then, before you start the Guest OS for the first time, configure it to mount the disc image from /tmp

Using your main memory as the install medium only leaves the processor and disc writes as your bottlenecks, making installs go really quick!!!

Of course, once your Guest OS is installed, be sure to delete the disc image you copied into /tmp

Happy hypervising! (its probably not a real word, but its great for telling people who aren’t into computing….”yeah, I’ve been hypervising for a few days now now….”.

your friend “…..hmmm, is that bad for your health?”

Installing MySQL on SXDE (build 70)

Saturday, January 26th, 2008

There are a few different ways you could get mysql on your solaris machine:

  • blastwave.org where you can get mysql and many other packages using an apt style package installation mechanism
  • sunsource.net where the packages have been optimised for solaris (and now that Sun are in the process of aquiring mysql we can hope that multitheaded developement will increase in line with Suns processor designs)

For this installation we’ll be using the packages from sunsource.net

So heres what you need to do:

Download the CSKruntime, CSKmysql and the CoolStack Documentation packages from sunsource.net and extract the archives using bzip2.

You should have something like:

# ls
CSKmysql_1.2_x86.pkg        CSKruntime_1.2_x86.pkg

Mysql depends on CSKruntime so install the runtime first:

# pkgadd -d /directory_where_your_file_is/CSKruntime_1.2_sparc.pkg

Once its installed make sure you install mysql having used pkgtrans - otherwise the install won’t work 100% (this has been the case for me, your millage may vary)

# pkgtrans CSKamp_1.2_x86.pkg /var/tmp
# pkgadd -d /var/tmp

Now initialise the database tables:

# /opt/coolstack/mysql/bin/mysql_install_db --datadir=/tank/mysql_data

Note that this is not the usual mysql data directory. In my case, this directory happens to be on a ZFS filesystem in a RAID 1 configuration.

To quote the README that comes with the install in /opt/coolstack/mysql/README

” mysql_install_db creates two directories “mysql” and “test” in data directory.
mysql directory has the MySQL privilege tables. test has the “test” database
These two directories are needed for mysql to start. If you are using a
different data directory later, you need to copy these two directories over. ”

Next create the mysql user and mysql group for the mysql service to use:

# groupadd mysql
# useradd -g mysql mysql
# chown -R mysql:mysql /tank/mysql_data

If you didn’t use the standard mysql data dir you will need to edit the SVC manifest file so that it knows where your data dir is:

/opt/coolstack/lib/svc/method/svc-cskmysql
<snip>
MYSQL_DIR=/opt/coolstack/mysql
DB_DIR=/tank/mysql_data/data/
PIDFILE=${DB_DIR}/`/usr/bin/uname -n`.pid
<snip>

Once this is done you should be able to start the mysql service with a simple:

svcadm enable  csk-mysql

After this you’ll need to log in as root and change the root password to something suitable

#/opt/coolstack/mysql/bin/mysql –user=root mysql

You will also want to add regular users to mysql also

Bullet proof Solaris!

Saturday, December 29th, 2007

One thing I found out about the Solaris OS is that regardless of system load or runlevel, you could always ping the box. Even when you rm -rf / Ok, so that wasn’t always true, somtimes it was powered off, but its pretty close. Solaris appears to have gained another ability……Despite a “failed” install of build 78 of OpenSolaris which collapsed at 85% completion, the machine still appears to have installed well. It boots, JDS works fine, ZFS is happy, and nothing has crashed (yet). :) This is another shining example why those guys down in the Sun labs deserve a pay rise!!! Now, if only they could fix a gigabit ethenet bug thats affecting me…… :)