Category Archives: Solaris

How to set dns-server and search domain in solaris 5.11

root@solaris:~# svccfg

svc:> select dns/client
svc:/network/dns/client> setprop config/nameserver = net_address:
svc:/network/dns/client> setprop config/search = astring: rocworks.local
svc:/network/dns/client> select 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 default
svc:/system/name-service/switch:default> refresh
svc:/system/name-service/switch:default> validate

check the result in /etc/resolv.conf (don’t edit this file, it will be set by svc on (re)boot)

search rocworks.local

Oracle 11gR2 Solaris DBConsole did not start…

On my machine the dbconsole didn’t start.

The problem was the timezone didn’t match the timezone of the machine/host.

$ORACLE_HOME/solaris_DB/sysman/config$ vi



how to recreate DBConsole & repository:


emca -deconfig dbcontrol db -repos drop

emca -repos create

emca -config dbcontrol db

Solaris ZFS snapshot to save machine state…

Very nice feature of solaris is to use a zfs snapshots to protect the current state/configuration of a machine.

And it is very easy to use, all we have to do is:

> beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
solaris NR / 11.23G static 2013-07-04 16:45
solaris-backup-1 - - 155.0K static 2013-07-04 17:28

After the installation of solaris a snapshot was already created automatically.

After installation and configuration of various software we can create a new snapshot:

beadm create -e solaris solaris-backup-2

If something bad will happen afterwards we can just simple select the backup at the boot manager! and then activate our backup as the active snapshot:

beadm activate solaris-backup-2

I think the old/bad snapshot/base can be deleted afterwards, but i didn’t yet tried that, maybe it is a good idea to create a base snapshot and working snapshot, and set the working snapshot as the active one, so in the case of an error we can create a new snapshot based on the base snapshot, and afterwards we can remove the bad working snapshot.

Solaris is very smart 🙂

Setup Solaris 11.1 / 11.2 for Oracle Database with ASM

# allow root ssh
1) Modify PermitRootLogin to yes in /etc/ssh/sshd_config.
2) Comment out the “CONSOLE=/dev/console” line in /etc/default/login.
3) Remove “type=role” from the root entry in /etc/user_attr.

# for ssh X11 forwarding
pkg install xauth
# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

svcadm restart svc:/network/ssh:default

# check network cards
dladm show-phys
dladm show-link
ipadm show-if
ipadm show-addr

# change profile to fixed
netadm enable -p ncp DefaultFixed

# setup network to public network
ipadm create-ip net0
ipadm create-addr -T static -a net0/acme
svccfg -s network/dns/client setprop config/nameserver=net_address: “(”

root@solaris:~# svccfg
svc:> select dns/client

svc:/network/dns/client> select dns/client
svc:/network/dns/client> setprop config/nameserver=net_address: “(”
svc:/network/dns/client> refresh
svc:/network/dns/client> validate

svc:/network/dns/client> select name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: “files dns”
svc:/system/name-service/switch> refresh
svc:/system/name-service/switch> validate

# set defaultrouter/nameserver:
echo “” >> /etc/defaultrouter
echo “” >> /etc/resolv.conf

# setup network to storage network
dladm set-linkprop -p mtu=9000 net1
ipadm create-ip net1
ipadm create-addr -T static -a net1/acme

# user and groups
groupadd -g 1000 oinstall
groupadd -g 1001 dba
useradd -u 1000 -g oinstall -G dba -m oracle
mkdir -p /app/11.2.0/grid
mkdir -p /app/oracle
chown -R oracle:oinstall /app
chmod -R 775 /app/

# set swap to ram=swap size (for below 16g RAM, for more than 16g RAM set swap fix to 16g)
zfs set volsize=4g rpool/swap

# packages
pkg install SUNWarc
pkg install SUNWbtool
pkg install SUNWcsl
pkg install SUNWhea
pkg install SUNWlibC
pkg install SUNWlibm
pkg install SUNWlibms
pkg install SUNWsprot
pkg install SUNWtoo
pkg install SUNWi1cs
pkg install SUNWi15cs
pkg install motif

pkg install x11-info-clients

add a line to /etc/system and reboot:
set rlim_fd_max=1024

# allow oracle user to use more than 25% of system memory (execute as root user!)
projadd -p 100 -c ‘Oracle Database’ -U oracle -G dba -K ‘project.max-shm-memory=(privileged,3G,deny)’ DB
usermod -K project=DB oracle

# iscsi static connect for asm disks
iscsiadm add static-config iqn.2013-06.nas.solarisvm.asm,
iscsiadm modify discovery –static enable


# prepare local disk for ASM
0. c8t0d0 <IET-VIRTUAL-DISK-0001-40.00GB>
1. c8t1d0 <IET-VIRTUAL-DISK-0001 cyl 2046 alt 2 hd 128 sec 32>
2. c8t2d0 <IET-VIRTUAL-DISK-0001 cyl 5219 alt 2 hd 255 sec 63>
3. c8t3d0 <IET-VIRTUAL-DISK-0001 cyl 5219 alt 2 hd 255 sec 63>
4. c8t4d0 <IET-VIRTUAL-DISK-0001 cyl 5219 alt 2 hd 255 sec 63>

format> fdisk
format> label
format> partition
partition> p

Volume: ASM00D1
Current partition table (original):
Total disk cylinders available: 5218 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 – 5217 39.97GB (5218/0/0) 83827170
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> 0

Enter partition id tag[unassigned]: usr
Enter partition permission flags[wm]:
Enter new starting cyl[1]:
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 5217c
partition> label
Ready to label disk, continue? y

# change owner and permission for disks
chown oracle:oinstall /dev/rdsk/c8t1d0s0
chmod 660 /dev/rdsk/c8t1d0s0

# add a new disk to an existing diskgroup:

> sqlplus / as sysasm

SQL> select name, path from v$asm_disk;





SQL> alter diskgroup data add disk ‘/dev/rdsk/c8t6d0s0’;