Change Hostname in Oracle Solaris 11.3

In this post i will share how to change hostname in Solaris 11.3 , i never test this way on other version but regarding to Oracle it will be working without any issue.

  • as root user, list the current hostname using the below command :-

# svccfg -s system/identity:node listprop config

config                                                         application
config/enable_mapping            boolean     true
config/ignore_dhcp_hostname boolean     false
config/loopback                        astring
config/nodename                      astring       solarisdb1

  • change hostname to new one

# svccfg -s system/identity:node setprop config/nodename=”solarisdbnew1″

  • Refresh and restart

# svcadm refresh system/identity:node

# svcadm restart system/identity:node

  •  Check the configuration

# svccfg -s system/identity:node listprop config

 Thank you

Osama

ORA-27102: out of memory

Operating system : Solaris Sparc 11.2
Database Version : 11.2.0.3.0

When Trying to startup the database the following error appeared :-

SQL> startup nomount ;
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument

Even when trying to know which instance process do this :-

SQL> oradebug setmypid
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory 

SQL> oradebug ipc
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory 

After investigation i found the cause for this error, the solaris SHMMAX was not set correctly on OS level which mean the database was configured more than permitted memory on OS.

to solve the above error

Find which project oracle user run using the below command :-

id -p
uid=59008(oracle) gid=10001(dba) projid=3(default)  

Then

prctl -n project.max-shm-memory -i project 3 

project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      35GB      –   deny                                 –
        system          24EB    max   deny                                 –

So i have to increase it

prctl -n project.max-shm-memory -r -v 40G -i project 3

Note the above changes will be temporary till the next restart.

Cheers
Osama  

Oracle Solaris 11.2 Launch On 29/04

Today 29/04/2014 Oracle Launched new version of operating system Solaris 11.2, This Version will contain significant Features and it’s fully supported for Cloud

Some of the new features :-

  • Reduce management effort via OpenStack integration
  • Further increase the flexibility of Solaris system virtualization
  • Add unique software-defined networking (SDN) capabilities
  • Simplify the creation of private and public clouds

The Link for the Event Here.

Thank you 
Osama mustafa

Mount NFS Device Is Busy

This Error Appear On Solaris when you try to mount filesystem :

mount -F nfs IP:/export/home/oracle/test /export/home/oracle/test

Output :

nfs mount: mount: /export/home/oracle/test : Device busy

Check why it’s Busy using :

fuser -u /export/home/oracle/test

/export/home/oracle/test :     1432c(oracle)

Kill the process :

kill – 9 1432 

Thank you
Osama mustafa 

Share Folder On Solaris For Window Purpose

In this article i will show how to share folder in Solaris and use this folder for Copy/Paste in windows , I will use NFS so you need to make sure it’s already enable in Windows

  • Select Control Panel.
  • Select Programs.
  • Select Programs and Features.
  • Select Turn Windows Features on or off.
  • Select Services for NFS.
  • Select the check box Client for NFS and click OK.
Now On Solaris Side , Using Share command 

share [-F fstype] [ -o options] [-d “”] [resource]

Create Folder and use the below command to share 

share -F nfs -o rw -d “codereview dirs” /u01/Shared –> my Shared Folder



root@Host:/u01# cat /etc/dfs/sharetab 

/u01/hmmdb u01_hmmdb nfs sec=sys,rw codereview
/u01/Shared u01_Shared nfs sec=sys,rw

Now back to windows open Command Prompt “cmd”
and run the below command :
showmount -e Server-IP 

Exports list on :
/u01/Shared                        All Machines
/u01/hmmdb                         All Machines

Command to share on windows :
mount -o mtype=hard Server-IP:Path_for_share_folder name drive letter or *
mount -o mtype=hard server-ip:/u01/Shared Z:
Done
Thank you 
Osama mustafa

Extend File system On Solaris Using ZFS Command

The below is demostration for extend File system On Solaris 11 :  

root@TEST:~# zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
oracle                    107G  10.6G  1.11M  /oracle
oracle/u01                105G  13.0G   105G  /u01
rpool                    32.2G  46.0G    39K  /rpool
rpool/ROOT               5.40G  46.0G    31K  legacy
rpool/ROOT/solaris       5.40G  46.0G  5.03G  /
rpool/ROOT/solaris/var    318M  46.0G   314M  /var
rpool/dump               1.03G  46.1G  1.00G  –
rpool/export              854K  46.0G    32K  /export
rpool/export/home         822K  46.0G    32K  /export/home
rpool/export/home/omnix   790K  46.0G   790K  /export/home/omnix
rpool/swap               25.8G  46.8G  25.0G  –

 root@TEST:~# zpool list

NAME     SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
oracle   140G   105G  34.9G  75%  1.00x  ONLINE  –
rpool   79.5G  31.4G  48.1G  39%  1.00x  ONLINE  –

root@TEST:~# zpool set autoexpand=on oracle

root@TEST:~# zpool list
NAME     SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
oracle   140G   105G  34.9G  75%  1.00x  ONLINE  –
rpool   79.5G  31.4G  48.1G  39%  1.00x  ONLINE  –

now you have to do the below :

root@TEST:~# zfs get volsize,reservation oracle

         NAME    PROPERTY     VALUE    SOURCE

oracle  volsize      –        –
oracle  reservation  107G     local

root@TEST:~# zfs set reservation=140G oracle/u01

          root@TEST:~# zfs get reservation oracle/u01

NAME        PROPERTY     VALUE   SOURCE
oracle/u01  reservation  140     local

–> zfs set quota=140G oracle

Finally Check df -h and size are increased 🙂

Thank you
Osama mustafa 

cannot unmount ‘/export/home/oracle’: Device busy

Operating System : Solaris 11

When run the below command :

zfs destroy rpool/export/home/grid

 cannot unmount ‘/export/home/oracle’: Device busy

Solution :

zfs unmount rpool/export/home/grid
zfs destroy rpool/export/home/grid

Thank you
Osama mustafa

cannot mount ‘rpool/u01’ on ‘/u01’: mountpoint or dataset is busy

When you try to use the below command :

zfs create -o mountpoint=/u01 rpool/u01

Error :
cannot mount ‘rpool/u01’ on ‘/u01’: mountpoint or dataset is busy
The Solution :
  • First destroy rpool/u01
  • zfs create rpool/u01
  • zfs set mountpoint=/u01 rpool/u01
  • mkdir /u01
  • zfs mount /u01
Thank you 
Osama Mustafa

Increase /tmp Using Zfs Solaris 11

zfs create -V 1gb rpool/newtmp
swap -a /dev/zvol/dsk/rpool/newtmp

 Old Size :

swap                   159M   212K       159M     1%    /tmp
rpool/export            78G    32K        67G     1%    /export
rpool/export/home       78G    32K        67G     1%    /export/home
rpool/export/home/omnix
                        78G   790K        67G     1%    /export/home/omnix
oracle                 118G   1.1M        11G     1%    /oracle
rpool                   78G    39K        67G     1%    /rpool
oracle/u01             118G    93G        25G    79%    /u01
/oracle                 11G   1.1M        11G     1%    /home/oracle

New Size :

root@HMMDB:/# zfs create -V 1gb rpool/extraswap
root@HMMDB:/# zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
oracle                    107G  10.6G  1.11M  /oracle
oracle/u01               92.6G  25.0G  92.6G  /u01
rpool                    12.6G  65.6G    39K  /rpool
rpool/ROOT               5.39G  65.6G    31K  legacy
rpool/ROOT/solaris       5.39G  65.6G  5.03G  /
rpool/ROOT/solaris/var    316M  65.6G   312M  /var
rpool/dump               1.03G  65.7G  1.00G  –
rpool/export              854K  65.6G    32K  /export
rpool/export/home         822K  65.6G    32K  /export/home
rpool/export/home/omnix   790K  65.6G   790K  /export/home/omnix
rpool/extraswap          1.03G  66.7G    16K  –
rpool/swap               5.16G  65.8G  5.00G  –

root@HMMDB:/# swap -a /dev/zvol/dsk/rpool/extraswap

Now Check New Size for /tmp

swap                   1.2G   212K       1.2G     1%    /tmp
rpool/export            78G    32K        66G     1%    /export
rpool/export/home       78G    32K        66G     1%    /export/hom

Thank you
Osama Mustafa