nsswitch.conf SMF config

# svccfg
svc:> select dns/client
svc:/network/dns/client> setprop config/search = astring: \
(“us.company.com” “eu.company.com” “companya.com” “companyb.com” “company.com” )
svc:/network/dns/client> setprop config/nameserver = net_address: \
( )
svc:/network/dns/client> select dns/client:default
svc:/network/dns/client:default> refresh
svc:/network/dns/client:default> validate
svc:/network/dns/client:default> select name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: “files dns”
svc:/system/name-service/switch> select system/name-service/switch:default
svc:/system/name-service/switch:default> refresh
svc:/system/name-service/switch:default> validate
# svcadm enable dns/client
# svcadm refresh name-service/switch
# grep host /etc/nsswitch.conf
hosts: files dns
# cat /etc/resolv.conf
# opyright (c) 2011, Oracle and/or its affiliates. All rights reserved.

# See resolv.conf(4) for details.

search us.company.com eu.company.com companya.com companyb.com company.com

zfs share for Time machine backups

I’ve tried using a share for time machine before, but due to the nature of how time machine works it eventually consumed all the spare space that is available on that particular share.

bring on zfs quotas… (my drive on my mini mac is 100GB, so 200GB should be enough for a few variations)

zfs set quota=200G unprotected/timemachine

This adds a artificial limit to your zfs filesystem, making sure that time machine does not consume more than 200 gigabytes of space.

NFS is your best bet, i’ve created a NFS share like so…

zfs create unprotected/timemachine

zfs set sharenfs=on unprotected/timemachine

opensolaris – setting up dhcp

You’ll need these two packages installed;

SUNWdhcs, SUNWdhcm

First ensure that the DHCP service is running. Go into the “services” gui and tick the box to enable the DHCP server.

now from commandline run…


  1. From edit menu choose “network wizard”, step through the wizard (defautls are o.k i you have a fixed IP already assigned to your opensolaris box)
  2. From edit menu choose “address wizard”

If you step through the wizard (the following is an example of what i have choosen)

  1. Choose Text files
  2. Leave default path of /var/dhcp
  3. Do not manage hosts records
  4. Default lease of 1 day (clients can renew their leases)
  5. DNS Domain “yourdomainname”, also add your DNS here
  6. Network Address & subnet (should be pre populated if you have fixed IP on your host)
  7. Network Type (LAN), Routing (leave as default)
  8. I have left NIS blank
  9. I have left NIS+ blank

solaris – storage server


Setup iSCSI target using comstar —
pkg install -v storage-server
pkg install pkg:/SUNWiscsit
svcadm enable stmf
svcadm enable svc:/network/iscsi/target:default
itadm create-target

reboot — -r

Create the iSCSI store —
zfs create -V 100G DataPool/TestDatastore1
sbdadm create-lu /dev/zvol/rdsk/DataPool/TestDatastore1
stmfadm create-hg ESX4-group
stmfadm add-hg-member -g ESX4-group wwn.2100001b329711bd wwn.2101001b32b711bd
stmfadm add-view -h ESX4-group -n 0 600144F03EBEC50000004BA86E460001
stmfadm list-lu -v

install crashplan on solaris


Move the downloaded tar.gz file into /var/spool/pkg/

mv CrashPlan_2010-03-08_Solaris.tar.gz /var/spool/pkg/

Unpack the archive.

tar -xzvf CrashPlan_2010-03-08_Solaris.tar.gz

Install the CrashPlan package:

sudo /usr/sbin/pkgadd

Start CrashPlan Engine:

sudo /opt/sfw/crashplan/bin/CrashPlanEngine start

Start CrashPlan Desktop:

sudo /opt/sfw/crashplan/bin/CrashPlanDesktop

To enable CrashPlan PRO as a service (as root):

svccfg import /opt/sfw/crashplan/bin/crashplan.xml

svcadm enable crashplan

check that the service has come online proplery (then load client)

svcs -a | grep crashplan

online         21:18:43 svc:/crashplan:default



zfs : accidentally adding cache drive to raidz zpool


Unfortunately if you have accidentally added a single drive into your raidz pool at the top-level there is no way to just remove the non redundant disk. Your pool is now dependant on this disk.

If you want your pool to be just raidz vdevs, then you will need to backup your data, destroy your pool, create a new pool, and restore your data.

There is no current way to remove a top-level vdev from a pool.

OpenSolaris is Dead


OpenSolaris is Dead.

What follows is an email sent internally to Oracle Solaris Engineers which describes Oracle’s true intentions toward the OpenSolaris project and the future of Oracle Solaris.

This concludes over four years that I (and many other external contributors) have worked on the OpenSolaris project. This is a terrible sendoff for countless hours of work – for quality software which will now ship as an Oracle product that we (the original authors) can no longer obtain on an unrestricted basis.

I can only maintain that the software we worked on was for the betterment of all, not for any one company’s bottom line. This is truly a perversion of the open source spirit.


OpenSolaris users have two choices. They can wait for Oracle to deliver a free Solaris binary called Solaris 11 Express, available with optional support, by the end of the year, ahead of the full release of the next-generation commercial Solaris 11 rev next year or they can hope that Illumos, the new Nextenta-led OpenSolaris fork, turns into something.

opensolaris – increase swap

I found this on opensolaris forums…. A nice way to increase your swap without the need for a reboot.

First check your current swap size and details;

swap -lh


zfs list

Then create a temp swap zfs store and delete and increase swap

zfs create -V <old size> rpool/swp
swap -a /dev/zvol/dsk/rpool/swp
swap -d /dev/zvol/dsk/rpool/swap
zfs destroy rpool/swap
zfs create -V <new size> rpool/swap
swap -a /dev/zvol/dsk/rpool/swap
swap -d /dev/zvol/dsk/rpool/swp
zfs destroy rpool/swp


If you are happy to reboot…

zfs set volsize=8G rpool/swap