Table of Contents

OpenIndiana

See also Shared Storage System Notes.

See also napp-it.

See also ZFS.

:!: For large-memory systems, choose a larger boot drive because the swap and dump devices take up a lot of space by default.

Documentation

http://technodrone.blogspot.com/2012/05/openindiana-installation-walkthrough.html

http://wiki.openindiana.org/oi/Using+OpenIndiana

Solaris 11 Cheat Sheets

Solaris 11 Administrator Cheat Sheet: http://www.oracle.com/technetwork/server-storage/solaris11/documentation/solaris-11-cheat-sheet-1556378.pdf

Solaris 11 Package Manager Cheat Sheet: http://www.oracle.com/technetwork/server-storage/solaris11/documentation/ips-one-liners-032011-337775.pdf

Full Reboot

A normal 'reboot' command does a fast reboot. This does a full reboot:

reboot -p

Installing

Download the CD image and burn it to a disc, or download the USB image and the 1G.header files, then:

cat /path/to/1G.header /path/to/oi-dev-151a7-text-x86.usb | dd bs=1024k of=/dev/sdx

Permit Root Login

http://blog.allanglesit.com/2012/07/solaris-11-permit-root-logins-locally-and-via-ssh/

Managing Dump and Swap

Planning for Swap Space: http://docs.oracle.com/cd/E19963-01/html/821-1459/fsswap-31050.html

Adjusting the Sizes of Your ZFS Swap and Dump Devices: http://docs.oracle.com/cd/E19963-01/html/821-1448/ggrln.html

Dump

:!: You only need a dump device if you need (and usually buy) help from OS devs, example from OmniTi. If so, you may need a larger rpool commensurate with your server's RAM size.

Estimate needed dump space (128GB RAM):

root@stor-01:/root# dumpadm -e
Estimated dump size: 61.5G

Query the current dump device size:

root@stor-01:/root# zfs get volsize rpool/dump
NAME        PROPERTY  VALUE    SOURCE
rpool/dump  volsize   17.7G    local

Change the dump volume size:

zfs get volsize rpool/dump

zfs set volsize=4G rpool/dump

Disable dump and delete the dump volume:

dumpadm -d none
zfs destroy rpool/dump

Swap

:!: You can probably skip this section if you are configuring a storage server as the swap space is not pre-allocated.

Note the change in blocks allocated to swap:

swap -lh
swap -d /dev/zvol/dsk/rpool/swap
zfs volsize=4G rpool/swap
swap -a /dev/zvol/dsk/rpool/swap
swap -lh

Package Management

http://docs.oracle.com/cd/E19963-01/html/820-6572/managepkgs.html

pkg publisher

pkg unset-publisher opensolaris.org

In addition to the base Operating System repositories, we also add some extra repos:

pkg set-publisher -p http://pkg.openindiana.org/sfe
pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered

Upgrading OpenIndiana

http://wiki.openindiana.org/oi/Upgrading+OpenIndiana

Update the 'pkg' package manager:

pkg install package/pkg

You can then do a trial run image update:

pkg image-update -nv

Run it again without the 'n' flag to actually do the update. This will create a new boot environment.

Manage Boot Environments

http://docs.oracle.com/cd/E23824_01/html/E21801/administer.html

beadm list                                    # list BE's
beadm rename <be-name> <new-be-name>          # rename a BE - can't rename active BE
beadm destroy <be-name>                       # delete a BE
beadm activate <be-name>                      # make another BE active on reboot

Update OpenIndiana

The 'n' switch is for trial runs. Omit the 'n' to update.

pkg install package/pkg

pkg update -vn

User Management

:!: By default, you must log into OI as a regular user before using 'su' to gain 'root' access.

Add User

useradd -g staff -d /home/newuser -m -s /bin/bash -c "Full Name" newuser

Make 'newuser' an administrator (sudo privileges):

visudo

Check for errors:

pwck

User Roles (RBAC)

https://blogs.oracle.com/observatory/en_US/entry/understading_rbac

Allow 'newuser' to 'su' to 'root':

usermod -R root newuser

Networking

:!: Solaris 11 networking is significantly different from previous versions.

New tools supersede the older ipconfig and ndd tools:

Solaris 11 also supports network configuration profiles:

Getting Started Guide for Solaris 11:

http://www.oracle.com/technetwork/articles/servers-storage-admin/s11-network-config-1632927.html

http://wiki.openindiana.org/oi/Static+IP

http://www.rainingpackets.com/configuring-static-ip-openindiana/

http://docs.oracle.com/cd/E19963-01/html/821-1458/gjwiq.html#gjgob%23scrolltoc

http://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-configure-network-with-solaris-221164/

dladm show-phys

dladm show-link

ipadm show-if [interface]

ipadm show-addr [addrobj]

ipadm create-addr -T address-type -a address/prefixlen addrobj

ipadm show-addrprop [-p property] [addrobj]

Intel x540 10GbE NIC

:!: It seems the latest OI now has this driver and these steps are no longer necessary.

Determine the 'vendor' and 'device' id's that aren't being recognized by the 'ixgbe' driver, then add them to the list:

scanpci

grep ixgbe /etc/driver_aliases

update_drv -a -i "pci8086,1528" ixgbe

ifconfig -a plumb
ifconfig -a

modinfo|grep ixgbe

more /etc/path_to_inst | grep ixgbe

Add New Persistent NIC

:!: If you are using Napp-IT, use it for assigning IP addresses.

vi /etc/hostname.ixgbe0
10.1.10.5 netmask 255.255.255.0
vi /etc/hostname.ixgbe1
10.1.10.6 netmask 255.255.255.0
vi /etc/inet/hosts
10.1.10.5       10g-eth-1 
10.1.10.6       10g-eth-2

Configure Jumbo Frames

Intel X540 10GbE NIC

http://docs.oracle.com/cd/E19254-01/820-7895-11/cggfhffg.html

nano /kernel/drv/ixgbe.conf

default_mtu             = 9000;

reboot

General Jumbo Frames Info

http://docs.oracle.com/cd/E19862-01/820-1606-12/jumbo_fms.html

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2012445

https://blogs.oracle.com/taylor22/entry/nfs_streaming_over_10_gbe

http://docs.oracle.com/cd/E19254-01/820-7895-11/cggfhffg.html

http://hardforum.com/showthread.php?t=1601960

Configure Jumbo Frames on OpenIndiana

Your NIC may be identified as ixgbe0. If your identifier differs, substitute it appropriately in these commands.

Enable Jumbo Frames using this command:

ndd -set /dev/ixgbe0 accept-jumbo 1

Set the MTU on the adapter to 9000 using this command:

ifconfig ixgbe0 mtu 9000
ipadm set-ifprop mtu 9000

Test Jumbo Frames

You can test the settings by pinging to and from the machine with 9000 byte packets.

To test from a remote client, run this command:

ping -s 9000 IP_of_Solaris_machine

To test from the Solaris machine, run this command:

ping -s IP_of_another_machine 9000 4

Services (Daemons)

List services:

svcs

After making configuration file changes:

svcadm refresh <servicename>

:!: If services show as 'maintenance' rather than 'online', there is probably a configuration error.

NTP

Configure NTP:

cp /etc/inet/ntp.client /etc/inet/ntp.conf

vi /etc/inet/ntp.conf
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org

Set the time and enable the NTP daemon:

ntpdate pool.ntp.org

svcadm enable ntp

NTP takes a while to get synchronized. Check the status (on localhost) like this:

ntpq -p

Mirror the Boot Drive (on x86 System)

http://wiki.openindiana.org/oi/2.1+Post-installation

http://darkstar-solaris.blogspot.co.uk/2008/09/zfs-root-mirror.html

List all disks and ZFS pools:

format
<ctrl-C>

cfgadm -s "select=type(disk)"

zpool status rpool

In the following example:

Create one large partition:

pfexec fdisk -B c5t3d0p0

Set up SMI label with same partitioning as original boot disk:

pfexec prtvtoc /dev/rdsk/c5t2d0s2 | pfexec fmthard -s - /dev/rdsk/c5t3d0s2

Add the second drive to the rpool:

pfexec zpool attach -f rpool c5t2d0s0 c5t3d0s0

:!: Do not continue until the resilver is finished.

Check resilver progress:

zpool status -v rpool

Make the mirror drive bootable:

pfexec installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c5t3d0s0

:!: To boot to the second drive, select it in the BIOS as the first boot device.

reboot -p

Notes from Others

Shutdown / Reboot Commands

Allow Root SSH

  1. vi /etc/ssh/sshd_config
    1. change permitrootlogin to yes
  2. vi /etc/default/login
    1. change line: CONSOLE =/dev/login|console (Comment it out may be better)
  3. usermod -K type=normal root
  4. reboot

Steps for Solaris Raid1

  1. Create Solaris parition with format/fdisk on second disk (c3t10d0)
  2. copy volumes from disk 0 to disk 1
    1. prtvtoc /dev/rdsk/c3t0d0s0 | fmthard -s - /dev/rdsk/c3t1d0s0
  3. Add second drive to rpool by attaching drive 0 and 1
    1. Zpool attach -f rpool c3t0d0s0 c3t1d0s0
  4. Check status: zpool status rpool

Steps for IP Address Configuration

  1. If no ip addresses exist in ifconfig -a edit /etc/hosts and make sure you have an entry for static ip and hostname.
  2. svcadm disable svc:/network/physical:nwam
  3. svcadm enable svc:/network/physical:default
  4. dladm show-phys
  1. dladm rename-link oldname Net.1
  2. ipadm create-addr -T static -a 192.168.10.7/24 Net.1/v4
    1. route -p add default 192.168.10.254
  3. check for dns server info:
    1. cat /etc/resolv.conf
    2. add our dns with vi if its missing: nameserver 192.168.10.10
  4. Check that we are configured to use files and dns for resolution:
    1. cat /etc/nsswitch.conf
    2. vi /etc/nsswitch.conf
      1. put files dns for hosts, ipnodes, and networks.

Enable Jumbo Frames

dladm set-linkprop -p mtu=9000 InterfaceName

Similar terms: NIC Bonding, NIC Teaming

dladm show-link
dladm create-aggr -l Net.LACP.1 -l Net.LACP.2 Net.Team.1
ipadm create-addr -T static -a 192.168.100.7/24 Net.Team.1
dladm modify-aggr -L active -T short Net.Team.1
dladm modify-aggr -P L2 Net.Team.1

:!: Configure cisco to use mode “active”

Steps for Solaris Raid 10

zpool create tank mirror disk1 disk2
zpool add tank mirror disk3 disk4
zpool add tank mirror disk5 disk6 #etc...

Steps for Adding Cache Drives

zpool add tank cache disk1
zpool add tank cache disk2

Disable ZIL

zfs set sync=disabled tank
zfs get sync

Steps for Setting Up Comstar

svcadm enable svc:/system/stmf:default
zpool list #will tell you capacity, substitute capacity in next line, its currently 20G
zfs create -V 20G tank/ISCSI.tank
sbdadm create-lu /dev/zvol/rdsk/tank/ISCSI.tank
sbdadm list-lu
stmfadm add-view #LUN Name/Number
pkg install -v SUNWiscsit
svcadm enable -r svc:/network/iscsi/target:default
itadm create-target

Install GUI (For Management/Reporting if you care)

wget -O - www.napp-it.org/nappit | perl

Update Solaris

  1. Check what updates are available:
    pfexec pkg image-update -nv
  2. apply updates if any are available:
    pfexec pkg image-update -v