Tag Archives: openindiana

OpenIndiana + PostgreSQL + dCache

This is a test for installing openindiana and set up a working dCache test-vm.

dCache is a storage element of the Grid (scientific computing).

OI == OpenIndiana. Kind of like opensolaris with an Illumos kernel, not the sun/oracle kernel.

With http://www.guldmyr.com/blog/esxi-vmware-workstation/ as a base for how to set up ip settings etc in OI.

oi-dev-151a-text-x86.iso installed

pkg install package/pkg

pkg update

java -version

mkdir /var/postgres

useradd postgres

groupadd postgres

chown postgres:postgres /var/postgres

chmod 755 /var/postgres

The pkg update makes it into 151a2

If you do not create the ones above the install of service/postgres will fail and create a new BE.

pkg install pkg:/database/postgres-84
pkg install pkg:/service/database/postgres-84

vi /etc/passwd

change postgres to 90:90 and homedir to /export/home/postgres

mkdir /export/home/postgres

chown postgres.postgres /export/home/postgres
root@oi:~# vi /export/home/postgres/.profile

you probably also want to add these to the root user’s path

svcadm enable postgresql-84:32_bit

root@oi:/var/log# svcs -a|grep postg
disabled       17:29:37 svc:/application/database/postgresql_84:default_64bit
online         17:31:35 svc:/application/database/postgresql_84:default_32bit

su - postgres



I initially did this in an ESXi VM in VMWare Workstation, but that keept freezing so I went over to a ‘real vm’ instead. The VM is more responsive.

dCache stuff

wget it from www.dcache.org

pkgadd -d dcache-server-1.9.12-16.pkg

follow http://www.dcache.org/manuals/Book-1.9.12/start/in-install.shtml for the instructions of which postgresql-scripts and users and stuff to create

It’s however not enough :

root@oi:~# /opt/d-cache/bin/dcache start
/opt/d-cache/bin/dcache[127]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[128]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[129]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[130]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[131]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[132]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[317]: .[162]: local: not found [No such file or directory]

so, edit /opt/d-cache/bin/dcache and remove the if in the beginning that will make it use /usr/xpg4/bin/sh – so that it uses /bin/bash instead.

Like this:

if [ "$1" = "%" ]; then
elif [ "`uname`" = "SunOS" ]; then
    if [ -x /bin/bash ]; then
        exec /bin/bash $0 % "$@"
        echo "Cannot find POSIX compliant shell. This script will"
        echo "probably break, but we attempt to execute it anyway."

after I changed this, I noticed in the console that it said:

rpcbind: non-local attempt to set


anyway, then start dCache

root@oi:/opt/d-cache/bin# /opt/d-cache/bin/dcache start
Starting dCacheDomain done

in /var/log/dCacheDomain.log you’ll find why it’s not working:

touch /etc/exports

and it appears to be stable, except for some errors about (NFSv3-oi), however, we disregard those for now, we just want to get it running!

vi /opt/d-cache/etc/dcache.conf
mkdir /pool1


vi /opt/d-cache/etc/layouts/single.conf

uncomment the pool1 section, set a maxDiskSize=2G to specify max disk space allowed.
Specifics are in the installation part on dcache.org in the book.

Then point your webbrowser to – see any blue buttons?! yay, it’s up!

Next step is to try it out, this might prove a little bit more difficult (to find dcap/root/srm client for opensolaris/oi).

PostgreSQL problem

so maybe next time you restart the vm it gives some errors and puts the postgresql-server in maintenance mode. Look in /var/adm/messages for some tips, it should point you to

svcs -xv svc:/application/database/postgresql_84:default_32bit


which will tell you more about what’s going on and how to fix it

svcadm restart
svcadm clear

Use dCache with webdav

We’ll start with trying to use Webdav (doesn’t require anything fancy on the client side, except maybe a browser plugin for uploading).

go to the layout file and uncomment the webdav part, add


The script /opt/d-cache/bin/chimera-cli.sh sadly assumes that you need bash or a special version of bash somehow.
So running

bash /opt/d-cache/bin/chimera-cli.sh mkdir /data

works, but

/opt/d-cache/bin/chimera-cli.sh mkdir /data

does not.

See http://www.dcache.org/manuals/Book-1.9.12/start/intouch-client.shtml for the rest.

If you keep the webdav in the same domain you’ll need to restart the whole dcache.

In Windows 7 you can then mount a new network folder and click “Connect to a web site that you can use to store your documents and pictures” and in there type:

Now you get another folder in your computer where you can create folders. These will also show up if you surf to , sadly however, you cannot write files. gridpp.ac.uk says it’s because pool is full. But it’s 2048MiB and all free?


suggests minimum pool size might be 4G, changed pool maxdiskspace to 8G.

tada, now the copy starts, or the file creation starts, but I cannot actually write anything to it. So if I create a .txt file, I can give it a name and save it, unless I try to write anything inside it!

some errors to accompany this:

 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] Your resource factory returned a resource with a different name to that requested!!! Requested: null returned: world-writable - resource factory: class org.dcache.webdav.DcacheResourceFactory
 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] resource is being locked with a null user. This won't really be locked at all...
 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] resource is being locked with a null user. This won't really be locked at all...
 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] Your resource factory returned a resource with a different name to that requested!!! Requested: null returned: world-writable - resource factory: class org.dcache.webdav.DcacheResourceFactory
 (pool1) [00002CBCC971ABC14BDC9E496A0AEAA31FC3] A task was added to queue 'store', however the queue is not configured to execute any tasks.

trying dccp

[root] # cd /etc/yum.repos.d/
[root] # wget http://grid-deployment.web.cern.ch/grid-deployment/glite/repos/3.2/glite-UI.repo
[root] # yum install dcap dccp -d 63 -H /bin/bash dcap://ip.to.server/data/world-writable/2nd/4 creates another empty file, while it adds an entry to the 'store' queue and then not so much happens. stuck on this: Sending control message: 2 0 client open "dcap://IP.to.server/data/world-writable/2nd/4" w -mode=0755 -truncate sl1 40619 -timeout=-1 -onerror=default  -alloc-size=938672  -uid=0 (len=153) 


uncomment the nfsv3 and add nfsv41
then on a system you should be able to ‘apt-get install nfs-common’; modprobe nfs; mkdir /nfsv4 mount -t nfs4 ip.to.server:/ /nfsv4′. But for me this stops working with an “cp: closing `./bash’: Input/output error”. Possibly because I could not specify -o minorversion=1 on this ubuntu install (3.0.0-16).


NFSv41 with dCacheToGo

Download dCache2Go from here:

To convert it into VMware format:

VBoxManage clonehd source.vdi target.vmdk --format VMDK

Then create new vm and set the new vmdk file as the disk.

When this VM is up (and the dCache server of course), hit:

mount -t nfs4 -o minorversion ip.to.dcache.host:/ /mnt


cd /mnt/data/world-writable
mkdir another
cd another
cp /bin/bash .
cp bash /tmp/bash
diff /tmp/bash /bin/bash

SCORE! We have a working dCache setup in a VM running openindiana!

ESXi + VMWare Workstation + OpenIndiana


Register and download ESXi here https://www.vmware.com/tryvmware/

Free license can be found there as well.

Get ESXi and the vSphere Client.

Get an OS to install in a VM (I chose openindiana).

Install ESXi in VMWare Workstation 8.

40G disk, 4GB RAM, 2 cores, enable Virtualization.

Very fast install.

Actually, in VMWare Workstation you can do ‘connect to server’. So for this you do not need the vSphere Client? Looks like through VMWare Workstation there’s a lot less options. Supposedly you can upload stuff to the datastore through the vSphere Client, and possibly more. Basically in VMWare Workstation you can just create a VM and make basically the same settings on it as you would on a normal VM.

Username: root. No password.

In the console, enable ssh and stuff. Then you can scp and ssh to the esxi host.

/vmfs/volumes/datastore is where you want to put isos.

you can also browse to the datastore via http!

Install OpenIndiana in a VMWare Workstation VM running ESXi.

Connect to the ESXi server in VMWare Workstation (connect to server, put in the IP of the ESXi VM, the IP is in the console).

After it’s there just create a new VM and select a ‘remote location’ of the iso when you look under CD. I’m went with openindiana.

8G disk, 1GB RAM, 1 CPU, “VM Network” (I presume this means the same as the one where the VM is). Nothing else special during install.

Feels a bit slow, but that could be because of the 1GB RAM. But I increased this to 2GB and still the Grub menu was slow to load.

Using OpenIndiana

In the console hit: ‘pfexec su -‘ to get to the root shell.

From the start I can ping a DNS-host on the internets. Great success.

Static IP in OI

If you don’t want to use nwam and you want to have a static IP you do this in the console:

  • Find interface name with ‘ifconfig -a’ or ‘dladm showphys’. If it’s not visible with ifconfig, it’s not plumbed, so ifconfig devname plumb. For this example, we’ll use e1000g0
  • Disable NWAM: svcadm disable svc:/network/physical:nwam
  • Set IP address in /etc/hostname.e1000g0: echo > /etc/hostname.e1000g0
  • Set netmask in /etc/netmasks (there’s an example in there)
  • Set default gateway in /etc/defaultrouter: echo > /etc/defaultrouter
  • Set DNS servers in /etc/resolv.conf (example: printf “nameserver\nnameserver\n” > /etc/resolv.conf)
  • Enable default: svcadm enable svc:/network/physical:default
  • Restart networking: svcadm restart svc:/milestone/network:default

After this, restart the system (init 6) and see if the settings stick. (I had to restart the VM twice but the IP setting stuck). The OI VM stuck at boot a few times after this as well. poweroff/restart got it back without any issues though.

Packages in OI

this is how to update your OI (no questions asked, just update everything).

pkg install pkg:/package/pkg
pkg update

You can of course do a lot more, see http://wiki.openindiana.org/oi/3.+Installing+software+and+package+management

Installing stuff

pkg install irssi

easy peasy, no problems at all (and screen is installed by default!).

JAVA is already installed by default (

java -version

Install Open Solaris in VMWare Workstation

Trying out osol-dev-134-x86.iso in vmware workstation.
You can download it from here: (genunix.org doesn’t work anymore – here is another place: http://okcosug.org/. Update 201308 this also broke. You can now use http://virtualboxes.org/images/opensolaris/)
Host OS: Core i7 with Windows x64.

1 core and 1300MB RAM, bridged networking and 16GB disk.

Installation looks initially very similar to openindiana (I guess it is the other way around..). Choose keyboard layout etc.

When you boot on the disc above you get directly into a desktop. If you only want text you can use the textinstall-134-x86.iso on the same page as above, the openindiana text-based installer had some more options than the ones in this graphical one in opensolaris. From there you can click an icon to install it. It only asks you for user/pw, timezone and partitioning stuff. 3.6GB needed. Nothing more, no packet selection or role customization.

I was not expecting the graphical desktop. Networking works straight from the box. Flash does not. However you can just download a .so file and get it working. Just find out where firefox is installed and copy it to the plugins directory. But flash is apparently dying now anyway.

There is an update manager but it doesn’t find any updates. Even though this version is from 2010. ? Why? Do I have to register to get updates? Register page takes me to Oracle. Perl version is 5.8.x and latest Perl now is 5.14.x. Supposedly ‘pkg image-update’ should update but it appears to not work anymore. There is now Solaris Express or whatever Oracle calls it which I presume they want you to update to and pay for. Of course openindiana is still there but it doesn’t install on the bl460c.

Protip: To get root level permissions you type ‘pfexec su -‘ or just ‘pfexec bash’.

The main idea I wanted to do this was to see what ‘touch /reconfigure’ did.
All it did was to add ‘configuring devices’ during the boot.
Also tried this on a bl460c blade where we replaced the system board. Nothing special, it booted up just fine!