Saturday, 26 September 2009

Howto install OpenSolaris 2009.06 on SUN V40Z

I had to install OpenSolaris 2009.06 somewhere in a DataCenter, the only one free server was pretty old machine but still powerful - SUN V40Z. It looks like an easy job but I spent few days to finish the installation. This post explains problems and solutions.

OpenSolaris is distributed on LIVE-CD (not very useful in DataCenter) or as an Automated Installer image but Sun requires to run installation server on at least OpenSolaris 2009.06 (no support for regular Solaris). I decided to split configuration into two parts:

Step 1 - Boot Server (DHCP + PXE)

It is very straightforward - there are many docs about DHCP server with PXE on Solaris. In this step let's leave /tftpboot files. All boot images and configuration will be copied from installation server.

Step 2 - Automated Installer service

SUN decided to replace commonly known Jumpstart with new technology that offers:

1). Integration with DHCP - to hand out an address and the PXE boot parameters to a client
2). PXE and TFTP - to serve the PXE boot image
3). Install server - an Apache instance that serves XML configuration and mini root, by default running on port 5555
4). Package repository - by default the internet connection is required during installation but it is also possible to manage local mirror or use a http proxy server.

Note that NFS server is no longer required which simplifies network configuration and can avoid firewall problems. It is worth to read Automated Installer docs and project caiman forum.

Here is a step by step procedure to create an installation service for SUN V40Z.

1). Let's install the correct utility:

tsucharz@katmandu:~$ pfexec pkg install SUNWinstalladm-tools

2). Some space for AI service is necessary

tsucharz@katmandu:~$ pfexec zfs create rpool/jumpstart
tsucharz@katmandu:~$ pfexec zfs set mountpoint=/jumpstart rpool/jumpstart
tsucharz@katmandu:~$ df -kh /jumpstart

Filesystem            Size  Used Avail Use% Mounted on
rpool/jumpstart        57G  163M   57G   1% /jumpstart

3). We need Automated Installer image, let's download it from and store to /mnt/install/OpenSolaris.

4. Create an install environment under /jumpstart with the name osol2009. As it also configures DHCP server we need to provide the network, starting at certain ip address $NET_IP and using 1 address in this case.

tsucharz@katmandu:~$ pfexec installadm  create-service -n osol2009 -i $NET_IP -c 1 -s /mnt/install/OpenSolaris/osol-0906-ai-x86.iso /jumpstart
Setting up the target image at /jumpstart ...
Registering the service osol2009._OSInstall._tcp.local
Creating DHCP Server
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - katmandu.
DHCP server started.
Added network macro to dhcptab - $NETP_IP.
Created network table.
adding tftp to /etc/inetd.conf
Converting /etc/inetd.conf
copying boot file to /tftpboot/pxegrub.I86PC.OpenSolaris-1
Service discovery fallback mechanism set up

5). Register a client with MAC address (-e option) and console parameters (!!!) for SUN V40Z (-b option)

tsucharz@katmandu:~$ pfexec installadm create-client -b "input-device=ttya" -b "output-device=ttya" -e 00:09:3D:11:2D:2A -t /jumpstart -n osol2009
Setting up X86 client...
Service discovery fallback mechanism set up
Enabled network boot by adding a macro named 0100093D112D2A
to DHCP server with:
  Boot server IP     (BootSrvA) :
  Boot file          (BootFile) : 0100093D112D2A

6). Customize installation

AI sevice uses manifest XML files for defining an install job. It is located in auto_install subdirectory of image_path property:

tsucharz@katmandu:~$ pfexec svccfg -s svc:/system/install/server:default listprop AIosol2009/image_path
AIosol2009/image_path  astring  /jumpstart
tsucharz@katmandu:~$ ls -l /jumpstart/auto_install/
total 24
-r--r--r-- 1 root sys  3082 May 17 22:39 ai_manifest.defval.xml
-r--r--r-- 1 root sys 11126 May 17 22:39 ai_manifest.rng
-r--r--r-- 1 root sys  3469 May 17 22:39 ai_manifest.xml
-r--r--r-- 1 root sys  3201 May 17 22:39 default.xml

Let's copy default.xml to custom script:

tsucharz@katmandu:~$ cd /jumpstart/auto_install/
tsucharz@katmandu:/jumpstart/auto_install$ pfexec cp default.xml ai_custom.xml
tsucharz@katmandu:/jumpstart/auto_install$ pfexec vi ai_custom.xml

and customize (marked in red):
- create Solaris partition
- add 1 slice
- setup proxy

tsucharz@katmandu:/jumpstart/auto_install$ cat ai_custom.xml 
      <ai_manifest name="default">
       <ai_device_partitioning>               <!-- Create solaris partition -->
      <ai_device_vtoc_slices>                <!-- Create VTOC slice 4 -->
                <main url="" authname=""/>
                <mirror url=""/>
            <ai_http_proxy url="http://proxy_ip:3128"/>
                <pkg name="entire"/>
                <pkg name="SUNWcsd"/>
                <pkg name="SUNWcs"/>
                <pkg name="babel_install"/>
                    <pkg name="babel_install"/>
                    <pkg name="slim_install"/>
    <sc_embedded_manifest name = "AI">
        <!-- <?xml version='1.0'?>
        <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
        <service_bundle type="profile" name="name">
            <service name="ai_properties" version="1" type="service">
                <instance name="default" enabled="true">
                    <property_group name="ai" type="application">
                        <propval name="username" type="astring" value="jack"/>
                        <propval name="userpass" type="astring" value="9Nd/cwBcNWFZg"/>
                        <propval name="description" type="astring" value="default_user"/>
                        <propval name="rootpass" type="astring" value="$5$VgppCOxA$ycFmYW4ObRRHhtsGEygDdexk5bugqgSiaSR9niNCouC"/>
                        <propval name="timezone" type="astring" value="US/Pacific"/>

In default manifest there are two users available (jack/jack, root/opensolaris). During an installation it is possible to login with both users and check progress in /tmp/install_log file.

Finally the new manifest should be installed:

tsucharz@katmandu:/jumpstart/auto_install$ pfexec installadm add -m ai_custom.xml -n osol2009

Well done, installation server is ready. Because I used another boot server it is necessary to copy content of /tftpboot directory:

tsucharz@katmandu:/jumpstart/auto_install$ pfexec scp /tftpboot/* root@yoda:/tftpboot/

A boot loader (grub) configuration for my SUN V40Z should look like this:

[root@yoda /tftpboot]# cat menu.lst.0100093D14BA8D

title OpenSolaris 2009.06
kernel$ /I86PC.OpenSolaris-1/platform/i86pc/kernel/$ISADIR/unix -B output-device=ttya,input-device=ttya,install_media=,install_service=osol2009,install_svc_address=,livemode=text
        module /I86PC.OpenSolaris-1/x86.microroot

During an installation process an internet connection (direct or via proxy) is required, but it is also possible to create a local mirror see docs.

In the next few days I would like to test iSCSI/FC target that is available thanks to COMSTAR project.

Thursday, 24 September 2009

Thursday, 17 September 2009

2009.Q3 storage configuration

Sun announced new firmware for Unified Storage products Q3 Release notes .
The main features are triple raid parity and mirroring and shadow migration. I am still waiting for deduplication and FC target, which I talked to
Adam Leventhal about.