User Tools

Site Tools


computing:unix:oi

This is an old revision of the document!


OpenIndiana

See also Shared Storage System.

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

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

Managing Dump and Swap

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

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

zfs get volsize rpool/dump

zfs set volsize=4G rpool/dump

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, you can list using the command:

beadm list

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:

  • dladm
  • ipadm
  • Changes persist after reboot

Solaris 11 also supports network configuration profiles:

  • The Automatic NCP uses DHCP
  • The DefaultFixed NCP requires the network interfaces to be manually configured
  • New tools:

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.10.10.5 netmask 255.255.255.0
vi /etc/hostname.ixgbe1
10.10.10.6 netmask 255.255.255.0
vi /etc/inet/hosts
10.10.10.5       10g-eth-1 
10.10.10.6       10g-eth-2

Configure Jumbo Frames

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

  • For optimal network speed, use high quality NICs such as Intel server NICs
  • Jumbo frames helps for large data transfers, but it is slower for small data
    • For example a database that read/writes less than 8k chunks
  • All devices using jumbo frames should run in their own VLAN
  • Set the MTU to 9000
  • Test traffic
    • ping -s 9000
    • iperf

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:

  • c5t2d0 is the initial installation drive
  • c5t3d0 is the new disk we want to become the mirror
  • p0 is entire disk

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
computing/unix/oi.1360711978.txt.gz · Last modified: 2013/02/12 16:32 by gcooper