Prepare a zfs pool to boot from it

My jumpstart install uncompresses the flar but leaves the server without bootblock or zfs bootpool, to fix this i install the bootblock and set the zpool’s bootfs property

# zpool status
  pool: rpool
 state: ONLINE
 scan: none requested
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c0t0d0s0  ONLINE       0     0     0
            c0t1d0s0  ONLINE       0     0     0

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t0d0s0
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t1d0s0

# zpool set bootfs=rpool/ROOT/sol10u11sparc rpool

Then just… reboot

 

 

Reborn

This time, kraftek.com is running in a webserver inside an appletv :) appletv_hero

During its lifetime it has run in various x86 and x86_64 slackware linux boxes+laptops, a couple of ubuntu laptops, a rikomagic ARM cpu device running picuntu linux, and now, an appletv running a jailbroken iOS. Next, i’d like it to run in a dd-wrt router, which i already own…. :)

CDOM and LDOM config

If your server doesn’t have a CDOM, you could create one by running something like this (create_config.ksh):

ldm add-vdiskserver primary-vds0 primary
 ldm add-vconscon port-range=5000-5100  primary-vcc0 primary
 ldm add-vswitch net-dev=igb0 primary-vsw0 primary
 ldm add-vswitch net-dev=nxge0 primary-vsw1 primary
 ldm set-vcpu 4 primary
 ldm set-memory 1g primary
 ldm add-config initial
 ldm list-config

 

Reboot the server.

Now let’s say you want to create an LDOM in that server, login to the cdom and do something like this (create_myldom.ksh):

ldm add-domain myldom
ldm set-vcpu 16 myldom
ldm set-memory 13G myldom
ldm add-vnet vnet1 primary-vsw0 myldom
ldm add-vnet vnet2 primary-vsw1 myldom
 ldm add-vdsdev /dev/dsk/
c0t600601605A203100A44CDC74C082E211d0s2 vol2@primary-vds0
ldm add-vdisk vdisk0 vol2@primary-vds0 myldom
ldm bind myldom
ldm set-var auto-boot?=true myldom
 ldm start-domain myldom