Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Friday, March 6, 2015

Create user friendly device alias on Solaris for ASM


oracle@solaris:~$ ls -l /dev/rdsk/c2t*d0s6
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t0d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@0,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t1d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@1,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t2d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@2,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t3d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@3,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t4d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@4,0:g,raw


oracle@solaris:~$ ls -l /devices/pci@0,0/pci1000,8000@14/*g,raw |grep oracle
crw-rw----   1 oracle   dba      208, 198 Mar  6 21:37 /devices/pci@0,0/pci1000,8000@14/sd@0,0:g,raw
crw-rw----   1 oracle   dba      208, 262 Mar  6 21:37 /devices/pci@0,0/pci1000,8000@14/sd@1,0:g,raw
crw-rw----   1 oracle   dba      208, 326 Mar  6 21:37 /devices/pci@0,0/pci1000,8000@14/sd@2,0:g,raw
crw-rw----   1 oracle   dba      208, 390 Mar  6 21:37 /devices/pci@0,0/pci1000,8000@14/sd@3,0:g,raw
crw-rw----   1 oracle   dba      208, 454 Mar  6 21:37 /devices/pci@0,0/pci1000,8000@14/sd@4,0:g,raw

root@solaris:/u01/asmdisks# mknod disk1 c 208 198
root@solaris:/u01/asmdisks# mknod disk2 c 208 262
root@solaris:/u01/asmdisks# mknod disk3 c 208 326
root@solaris:/u01/asmdisks# mknod disk4 c 208 390
root@solaris:/u01/asmdisks# mknod disk5 c 208 454
root@solaris:/u01/asmdisks# chmod 660 disk*
root@solaris:/u01/asmdisks# chown oracle:dba disk*
root@solaris:/u01/asmdisks# ls -l disk*
crw-rw----   1 oracle   dba      208, 198 Mar  6 22:55 disk1
crw-rw----   1 oracle   dba      208, 262 Mar  6 23:04 disk2
crw-rw----   1 oracle   dba      208, 326 Mar  6 23:05 disk3
crw-rw----   1 oracle   dba      208, 390 Mar  6 23:05 disk4
crw-rw----   1 oracle   dba      208, 454 Mar  6 23:05 disk5
root@solaris:/u01/asmdisks#

oracle@solaris:/u01/asmdisks$  kfod status=TRUE disks=all dscvgroup=true asm_diskstring=/u01/asmdisks/
--------------------------------------------------------------------------------
Disk          Size Header    Path                                     Disk Group   User     Group
================================================================================
   1:      16331 Mb MEMBER    /u01/asmdisks/disk1                      DATA         oracle   dba
   2:      16331 Mb MEMBER    /u01/asmdisks/disk2                      DATA         oracle   dba
   3:      16331 Mb MEMBER    /u01/asmdisks/disk3                      DATA         oracle   dba
   4:      16331 Mb CANDIDATE /u01/asmdisks/disk4                      #            oracle   dba
   5:      16331 Mb CANDIDATE /u01/asmdisks/disk5                      #            oracle   dba
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
      +ASM /u01/app/oracle/product/12.1.0/grid
oracle@solaris:/u01/asmdisks$  kfod status=TRUE disks=all dscvgroup=true
--------------------------------------------------------------------------------
Disk          Size Header    Path                                     Disk Group   User     Group
================================================================================
   1:      16331 Mb MEMBER    /dev/rdsk/c2t0d0s6                       DATA         oracle   dba
   2:      16331 Mb MEMBER    /dev/rdsk/c2t1d0s6                       DATA         oracle   dba
   3:      16331 Mb MEMBER    /dev/rdsk/c2t2d0s6                       DATA         oracle   dba
   4:      16331 Mb CANDIDATE /dev/rdsk/c2t3d0s6                       #            oracle   dba
   5:      16331 Mb CANDIDATE /dev/rdsk/c2t4d0s6                       #            oracle   dba
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
      +ASM /u01/app/oracle/product/12.1.0/grid

Command line references for kfod:


_asm_a/llow_only_raw_disks              KFOD allow only raw devices [_asm_allow_only_raw_disks=(TRUE)/FALSE]
_asm_l/ibraries         ASM Libraries[_asm_libraries=lib1,lib2,...]
_asms/id                ASM Instance[_asmsid=sid]
_b/oot          Running in pre-install env (boot=TRUE/FALSE)
_f/lexinfo              Provide flexinfo      (_flexinfo=TRUE/FALSE)
_p/atch_lib             Patchlib [_patch_lib=<asmclntsh_path>]
_u/ser          OS Username
asm_/diskstring         ASM Diskstring [asm_diskstring=discoverystring, discoverystring ...]
asmc/ompatibility               Include diskgroup ASM compatibility [asmcompatibility=TRUE/(FALSE)]
cli/ent_cluster         client cluster name
clus_/version           cluster version
clust/er                KFOD cluster [cluster=TRUE/(FALSE)]
db_/unique_name         db_unique_name for ASM instance[db_unique_name=dbname]
dbc/ompatibility                Include diskgroup DB compatibility [dbcompatibility=TRUE/(FALSE)]
disk_/access            Disk access method [disk_access=DIRECT/(INDIRECT)]
disks           Disks to discover [disks=raw,asm,badsize,all]
ds/cvgroup              Include group name [dscvgroup=TRUE/(FALSE)]
f/orce          Force option to delete files (force=TRUE/FALSE)
g/roup          Disks in diskgroup [group=diskgroup]
h/ostlist               hostlist[hostlist=host1,host2,...]
metadata_a/usize                AU Size for Metadata Size Calculation
metadata_c/lients               Client Count for Metadata Size Calculation
metadata_d/isks         Disk Count for Metadata Size Calculation
metadata_n/odes         Node Count for Metadata Size Calculation
metadata_r/edundancy            Redundancy for Metadata Size Calculation
na/me           Include disk name [name=TRUE/(FALSE)]
no/hdr          KFOD header suppression [nohdr=TRUE/(FALSE)]
ol/r            Import credentials to OLR [olr=TRUE/(FALSE)]
op              KFOD options type [OP=DISKS/CANDIDATES/MISSING/GROUPS/INSTS/VERSION/PATCHES/PATCHLVL/CLIENTS/RM/RMVERS/DFLTDSTR/GPNPDSTR/METADATA/CREDCRECLUS/GETCLSTYPE/CREDEXPORT/GETASMGUID/CREDDELCLUS/CREDVERIFY/UPGRADEVERIFY/ALL]
p/file          ASM parameter file [pfile=parameterfile]
r/im_disk_access                Rim disk access method [rim_disk_access=DIRECT/(INDIRECT)]
s/tatus         Include disk header status [status=TRUE/(FALSE)]
v/erbose                KFOD verbose errors [verbose=TRUE/(FALSE)]
w/rap           wrap file for credentials
oracle@solaris:/u01/asmdisks$ kfod asm_diskstring=/u01/asmdisk/*  status=TRUE disk=all
KFOD-00101: LRM error [107] while parsing command line arguments
_asm_a/llow_only_raw_disks              KFOD allow only raw devices [_asm_allow_only_raw_disks=(TRUE)/FALSE]
_asm_l/ibraries         ASM Libraries[_asm_libraries=lib1,lib2,...]
_asms/id                ASM Instance[_asmsid=sid]
_b/oot          Running in pre-install env (boot=TRUE/FALSE)
_f/lexinfo              Provide flexinfo      (_flexinfo=TRUE/FALSE)
_p/atch_lib             Patchlib [_patch_lib=<asmclntsh_path>]
_u/ser          OS Username
asm_/diskstring         ASM Diskstring [asm_diskstring=discoverystring, discoverystring ...]
asmc/ompatibility               Include diskgroup ASM compatibility [asmcompatibility=TRUE/(FALSE)]
cli/ent_cluster         client cluster name
clus_/version           cluster version
clust/er                KFOD cluster [cluster=TRUE/(FALSE)]
db_/unique_name         db_unique_name for ASM instance[db_unique_name=dbname]
dbc/ompatibility                Include diskgroup DB compatibility [dbcompatibility=TRUE/(FALSE)]
disk_/access            Disk access method [disk_access=DIRECT/(INDIRECT)]
disks           Disks to discover [disks=raw,asm,badsize,all]
ds/cvgroup              Include group name [dscvgroup=TRUE/(FALSE)]
f/orce          Force option to delete files (force=TRUE/FALSE)
g/roup          Disks in diskgroup [group=diskgroup]
h/ostlist               hostlist[hostlist=host1,host2,...]
metadata_a/usize                AU Size for Metadata Size Calculation
metadata_c/lients               Client Count for Metadata Size Calculation
metadata_d/isks         Disk Count for Metadata Size Calculation
metadata_n/odes         Node Count for Metadata Size Calculation
metadata_r/edundancy            Redundancy for Metadata Size Calculation
na/me           Include disk name [name=TRUE/(FALSE)]
no/hdr          KFOD header suppression [nohdr=TRUE/(FALSE)]
ol/r            Import credentials to OLR [olr=TRUE/(FALSE)]
op              KFOD options type [OP=DISKS/CANDIDATES/MISSING/GROUPS/INSTS/VERSION/PATCHES/PATCHLVL/CLIENTS/RM/RMVERS/DFLTDSTR/GPNPDSTR/METADATA/CREDCRECLUS/GETCLSTYPE/CREDEXPORT/GETASMGUID/CREDDELCLUS/CREDVERIFY/UPGRADEVERIFY/ALL]
p/file          ASM parameter file [pfile=parameterfile]
r/im_disk_access                Rim disk access method [rim_disk_access=DIRECT/(INDIRECT)]
s/tatus         Include disk header status [status=TRUE/(FALSE)]
v/erbose                KFOD verbose errors [verbose=TRUE/(FALSE)]
w/rap           wrap file for credentials

Labeling disks on Oracle Solaris for ASM diskgroup candidate disks (using format)

format> disk


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <ATA-VBOX HARDDISK-1.0-62.76GB>
          /pci@0,0/pci8086,2829@d/disk@0,0
       1. c1t2d0 <ATA-VBOX HARDDISK-1.0-30.00GB>
          /pci@0,0/pci8086,2829@d/disk@2,0
       2. c2t0d0 <DEFAULT cyl 2085 alt 2 hd 255 sec 63 cyl 2085 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@0,0
       3. c2t1d0 <VBOX-HARDDISK-1.0 cyl 2086 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@1,0
       4. c2t2d0 <VBOX-HARDDISK-1.0 cyl 2086 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@2,0
       5. c2t3d0 <VBOX-HARDDISK-1.0 cyl 2086 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@3,0
       6. c2t4d0 <VBOX-HARDDISK-1.0 cyl 2086 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@4,0
Specify disk (enter its number)[2]: 3
selecting c2t1d0
[disk formatted]
No Solaris fdisk partition found.

format> partition
WARNING - This disk may be in use by an application that has
          modified the fdisk table. Ensure that this disk is
          not currently in use before proceeding to use fdisk.
format> fdisk
No fdisk table exists. The default partition for the disk is:

  a 100% "SOLARIS System" partition

Type "y" to accept the default partition,  otherwise type "n" to edit the
partition table.
y

format> partition


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit

partition> print
Current partition table (default):
Total disk cylinders available: 2085 + 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 - 2084       15.97GB    (2085/0/0) 33495525
  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> 6
Part      Tag    Flag     Cylinders        Size            Blocks
  6 unassigned    wm       0               0         (0/0/0)           0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 2 <--- can be 3 as well, just to skip cyl 0 to avoid VTOC
Enter partition size[0b, 0c, 2e, 0.00mb, 0.00gb]: 2082c
partition> print
Current partition table (unnamed):
Total disk cylinders available: 2085 + 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 - 2084       15.97GB    (2085/0/0) 33495525
  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       2 - 2083       15.95GB    (2082/0/0) 33447330
  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> label
Ready to label disk, continue? y

root@solaris:~# /usr/sbin/prtvtoc /dev/rdsk/c2t0d0s2
* /dev/rdsk/c2t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*    2087 cylinders
*    2085 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*       16065     16065     32129
*    33479460     16065  33495524
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01          0  33495525  33495524
       6      0    00      32130  33447330  33479459
       8      1    01          0     16065     16064

root@solaris:~# ls -l /dev/rdsk/c2t*d0s6
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t0d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@0,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t1d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@1,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t2d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@2,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t3d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@3,0:g,raw
lrwxrwxrwx   1 root     root          50 Mar  2 17:10 /dev/rdsk/c2t4d0s6 -> ../../devices/pci@0,0/pci1000,8000@14/sd@4,0:g,raw
root@solaris:~# chown oracle:dba /dev/rdsk/c2t*d0s6
root@solaris:~# chmod 660 /dev/rdsk/c2t*d0s6

image

Thursday, December 11, 2014

Cloning an Oracle Home in Oracle 12c

1. Create a TAR file with the Oracle home (but not the Oracle base) directory (ZIP has problems to preserve permission and ownerships) ("-p" option in tar is default if run with super user)

root@solaris:/u01/stage# tar cvf - /u01/app/oracle/product/12.1.0/dbhome_1 | gzip -c > dbhome_1.tar.gz

2. Copy the TAR file to the root directory of the target computer. If you use File Transfer Protocol (FTP), then transfer the TAR file in binary mode only.

root@solaris:/u01/stage# scp dbhome_1.tar.gz   oracle@192.168.6.101:/u01/
dbhome_1.tar.gz      100% |*************************************|  2648 MB    14:31


3. Extract the TAR file content using the following command:

root@solaris112:/# gunzip -c dbhome_1.tar.gz | tar xf -


root@solaris112:/u01# chown oracle:oinstall app
root@solaris112:/u01# chown oracle:oinstall app/oracle/
root@solaris112:/u01# chown oracle:oinstall app/oracle/product/
root@solaris112:/u01# chown oracle:oinstall app/oracle/product/12.1.0/

4. On the target computer, change the directory to the unzipped Oracle home directory, and remove all the .ora (*.ora) files present in the unzipped $ORACLE_HOME/network/admin directory.

oracle@solaris112:~$ rm /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/*.ora

5. From the $ORACLE_HOME/clone/bin directory, run the clone.pl file for the unzipped Oracle home.

oracle@solaris112:~$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1

oracle@solaris112:~$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/u01/app/oracle/" ORACLE_HOME="/u01/app/oracle/product/12.1.0/dbhome_1" OSDBA_GROUP=dba -defaultHomeName

./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01/app/oracle/" "ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1" "oracle_install_OSDBA=dba" -defaultHomeName  -silent -paramFile /u01/app/oracle/product/12.1.0/dbhome_1/clone/clone_oraparam.ini
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 1371 MB    Passed
Checking swap space: must be greater than 500 MB.   Actual 1570 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-12-11_03-29-21PM. Please wait ...You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2014-12-11_03-29-21PM.log
..................................................   5% Done.
..................................................   10% Done.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   35% Done.
..................................................   40% Done.
..................................................   45% Done.
..................................................   50% Done.
..................................................   55% Done.
..................................................   60% Done.
..................................................   65% Done.
..................................................   70% Done.
..................................................   75% Done.
..................................................   80% Done.
..................................................   85% Done.
..........
Copy files in progress.

Copy files successful.

Link binaries in progress.

Link binaries successful.

Setup files in progress.

Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.

Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2014-12-11_03-29-21PM.log' for more details.

Setup Oracle Base in progress.

Setup Oracle Base successful.
..................................................   95% Done.

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

..................................................   100% Done.


root@solaris112:/u01# /u01/app/oraInventory/orainstRoot.sh
root@solaris112:/u01# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

6. To configure the connection information for the new database, run Net Configuration Assistant:

$ cd $ORACLE_HOME/bin
$ ./netca

7. To create a new database for the newly cloned Oracle home, run Database Configuration Assistant:

$ cd $ORACLE_HOME/bin
$ ./dbca


Error 1:

..........SEVERE:Unable to create directory /u01/app/oracle. You may not have the proper permission to create the directory, or there is no space left in the volume.
Unable to create the Oracle Base you have specified.
The cloning of OraHome1 was unsuccessful.
Please check '/export/home/oracle/oraInventory/logs/cloneActions2014-12-11_03-25-50PM.log' for more details.

Fix: Change folder permission (Refer to step 3)

Tuesday, September 30, 2014

Install Oracle prerequisite package for Oracle Database 12.1 in Solaris 11.2

For Oracle Solaris 11.2, Oracle supplies an installation package group that installs all of the software needed to support Oracle Database implementations. The package group is called:
group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall
Installing this package group creates an Oracle Database configuration on the Oracle Solaris 11.2 operating system, reducing the risk of installation errors and accelerating time-to-deployment. This package group makes sure that that all necessary packages required for a graphical interface installation of Oracle Database 12c are present on the system, regardless of the server package group (solaris-minimal-server, solaris-small-server, etc.) that was used to install Oracle Solaris.

root@solaris:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F
http://pkg.oracle.com/solaris/release/

root@solaris:~# pkg search -r oracle-rdbms-server*
INDEX      ACTION VALUE                                                                  PACKAGE
pkg.fmri   set    solaris/group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall  pkg:/group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall@0.5.11-0.175.2.0.0.42.0
pkg.fmri   set    solaris/group/prerequisite/oracle/oracle-rdbms-server-12cR1-preinstall pkg:/group/prerequisite/oracle/oracle-rdbms-server-12cR1-preinstall@0.5.11-0.175.2.0.0.39.0


root@solaris:~# pkg info -r group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall
          Name: group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall
       Summary: Prerequisite package for Oracle Database 12.1
   Description: Provides the set of Oracle Solaris packages required for
                installation and operation of Oracle Database 12.
      Category: Meta Packages/Group Packages
         State: Not installed
     Publisher: solaris
       Version: 0.5.11
Build Release: 5.11
        Branch: 0.175.2.0.0.42.0
Packaging Date: June 23, 2014 09:49:34 PM
          Size: 5.46 kB
          FMRI: pkg://solaris/group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall@0.5.11,5.11-0.175.2.0.0.42.0:20140623T214934Z

root@solaris:~# pkg info -r group/prerequisite/oracle/oracle-rdbms-server-12cR1-preinstall
          Name: group/prerequisite/oracle/oracle-rdbms-server-12cR1-preinstall
       Summary:
         State: Not installed (Renamed)
    Renamed to: group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall@0.5.11-0.175.2.0.0.39.0
     Publisher: solaris
       Version: 0.5.11
Build Release: 5.11
        Branch: 0.175.2.0.0.39.0
Packaging Date: May 12, 2014 04:04:32 PM
          Size: 5.46 kB
          FMRI: pkg://solaris/group/prerequisite/oracle/oracle-rdbms-server-12cR1-preinstall@0.5.11,5.11-0.175.2.0.0.39.0:20140512T160432Z


         
root@solaris:~# pkg install pkg:/group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall
           Packages to install: 11
            Services to change:  2
       Create boot environment: No
Create backup boot environment: No
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                              11/11       254/254      5.0/5.0  169k/s

PHASE                                          ITEMS
Installing new actions                       644/644
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1


root@solaris:~# pkg info /group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall
          Name: group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall
       Summary: Prerequisite package for Oracle Database 12.1
   Description: Provides the set of Oracle Solaris packages required for
                installation and operation of Oracle Database 12.
      Category: Meta Packages/Group Packages
         State: Installed
     Publisher: solaris
       Version: 0.5.11
Build Release: 5.11
        Branch: 0.175.2.0.0.42.0
Packaging Date: June 23, 2014 09:49:34 PM
          Size: 5.46 kB
          FMRI: pkg://solaris/group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall@0.5.11,5.11-0.175.2.0.0.42.0:20140623T214934Z

Install Solaris 11.2 on Virtual Box

Solaris 11-1Solaris 11-2Solaris 11-3Solaris 11-4Solaris 11-5Solaris 11-6Solaris 11-7Solaris 11-8Solaris 11-9Solaris 11-10Solaris 11-11Solaris 11-12Solaris 11-13Solaris 11-14Solaris 11-15Solaris 11-16Solaris 11-17Solaris 11-18Solaris 11-19Solaris 11-20Solaris 11-21Solaris 11-22

Saturday, August 23, 2014

Reduce ZFS File Data to free up memory used for Oracle or MySQL Database

root@solaris:~# echo "::memstat"|mdb -k
Page Summary                 Pages             Bytes  %Tot
----------------- ----------------  ----------------  ----
Kernel                      137139            535.6M   21%
Guest                            0                 0    0%
ZFS Metadata                 10569             41.2M    2%
ZFS File Data               216961            847.5M   33%
Anon                         36668            143.2M    6%
Exec and libs                 1135              4.4M    0%
Page cache                    5639             22.0M    1%
Free (cachelist)             30191            117.9M    5%
Free (freelist)             210289            821.4M   32%
Total                       648591              2.4G


root@solaris:~# echo "set zfs:zfs_arc_max = 104857600" >> /etc/system
root@solaris:~# init 6

root@solaris:~# echo "::memstat"|mdb -k
Page Summary                 Pages             Bytes  %Tot
----------------- ----------------  ----------------  ----
Kernel                      137401            536.7M   21%
Guest                            0                 0    0%
ZFS Metadata                  8837             34.5M    1%
ZFS File Data                20755             81.0M    3%
Anon                         36965            144.3M    6%
Exec and libs                 1706              6.6M    0%
Page cache                    9972             38.9M    2%
Free (cachelist)             36747            143.5M    6%
Free (freelist)             396208              1.5G   61%
Total                       648591              2.4G

Monday, August 4, 2014

Upgrade Solaris from 11.1 to 11.2 using pkg update

root@solaris:~# pkg info entire
          Name: entire
       Summary: Incorporation to lock all system packages to the same build
   Description: This package constrains system package versions to the same
                build.  WARNING: Proper system update and correct package
                selection depend on the presence of this incorporation.
                Removing this package will result in an unsupported system.
      Category: Meta Packages/Incorporations
         State: Installed
     Publisher: solaris
       Version: 0.5.11
Build Release: 5.11
        Branch: 0.175.1.0.0.24.2
Packaging Date: September 19, 2012 07:01:35 PM
          Size: 5.46 kB
          FMRI: pkg://solaris/entire@0.5.11,5.11-0.175.1.0.0.24.2:20120919T190135Z

root@solaris:~#   pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F
http://pkg.oracle.com/solaris/release/


root@solaris:~# pkg update --accept
------------------------------------------------------------
Package: pkg://solaris/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.175.2.0.0.42.2:20140624T183842Z
License: lic_OTN

<<<<<<<<<<<<<<<<<<< Ommited length license agreement >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Entire Agreement

You agree that this agreement is the complete agreement for the
Programs and licenses, and this agreement supersedes all prior or
contemporaneous agreements or representations. Any other license terms
that may be included in or with the Program shall not apply.  If any
term of this agreement is found to be invalid or unenforceable, the
remaining provisions will remain effective.

Last updated:  12 May 2014
Should you have any questions concerning this License Agreement, or if
you desire to contact Oracle for any reason, please write:

Oracle America, Inc.
500 Oracle Parkway,
Redwood City, CA 94065

Oracle may contact you to ask if you had a satisfactory experience
installing and using this OTN software download.

            Packages to remove:   6
           Packages to install:  85
            Packages to update: 515
           Mediators to change:   2
       Create boot environment: Yes
Create backup boot environment:  No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            606/606   39003/39003  633.4/633.4  161k/s

PHASE                                          ITEMS
Removing old actions                       7730/7730
Installing new actions                   27495/27495
Updating modified actions                28698/28934
driver (cmdk) upgrade (addition of policy 'tpd_member=true') failed with return code 1
command run was: /usr/sbin/update_drv -b /tmp/tmptiazWh -a -p tpd_member=true cmdk
command output was:
------------------------------------------------------------
Bad policy token: ``tpd_member''.
------------------------------------------------------------
Updating modified actions                28701/28934
driver (fp) upgrade (addition of policy 'tpd_member=true') failed with return code 1
command run was: /usr/sbin/update_drv -b /tmp/tmptiazWh -a -p tpd_member=true fp
command output was:
------------------------------------------------------------
Bad policy token: ``tpd_member''.
------------------------------------------------------------
Updating modified actions                28710/28934
driver (sd) upgrade (addition of policy 'tpd_member=true') failed with return code 1
command run was: /usr/sbin/update_drv -b /tmp/tmptiazWh -a -p tpd_member=true sd
command output was:
------------------------------------------------------------
Bad policy token: ``tpd_member''.
------------------------------------------------------------
Updating modified actions                28712/28934
driver (sgen) upgrade (addition of policy 'tpd_member=true') failed with return code 1
command run was: /usr/sbin/update_drv -b /tmp/tmptiazWh -a -p tpd_member=true sgen
command output was:
------------------------------------------------------------
Bad policy token: ``tpd_member''.
------------------------------------------------------------
Updating modified actions                28934/28934
Updating package state database                 Done
Updating package cache                       521/521
Updating image state                            Done
Creating fast lookup database                   Done

A clone of solaris exists and has been updated and activated.
On the next boot the Boot Environment solaris-1 will be
mounted on '/'.  Reboot when ready to switch to this updated BE.


The following unexpected or editable files and directories were
salvaged while executing the requested package operation; they
have been moved to the displayed location in the image:

  usr/lib/python2.6/vendor-packages/solaris_install/auto_install -> /tmp/tmptiazWh/var/pkg/lost+found/usr/lib/python2.6/vendor-packages/solaris_install/auto_install-20140804T091641Z

---------------------------------------------------------------------------
NOTE: Please review release notes posted at:

http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SERNS
---------------------------------------------------------------------------

root@solaris:~# init 6

image

root@solaris:~# uname -a
SunOS solaris 5.11 11.2 i86pc i386 i86pc

root@solaris:~# uname -X
System = SunOS
Node = solaris
Release = 5.11
KernelID = 11.2
Machine = i86pc
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 2

root@solaris:~# beadm list
BE        Active Mountpoint Space  Policy Created
--        ------ ---------- -----  ------ -------
solaris   -      -          9.61M  static 2012-11-19 19:56
solaris-1 NR     /          21.94G static 2014-08-04 09:16

root@solaris:~# pkg info entire
          Name: entire
       Summary: Incorporation to lock all system packages to the same build
   Description: This package constrains system package versions to the same
                build.  WARNING: Proper system update and correct package
                selection depend on the presence of this incorporation.
                Removing this package will result in an unsupported system.
      Category: Meta Packages/Incorporations
         State: Installed
     Publisher: solaris
       Version: 0.5.11
Build Release: 5.11
        Branch: 0.175.2.0.0.42.0
Packaging Date: June 24, 2014 07:38:32 PM
          Size: 5.46 kB
          FMRI: pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.42.0:20140624T193832Z

Sunday, February 2, 2014

Install JDK in Solaris 11 using PKG command

root@solaris:/opt/jdk7# pkg search -p jdk
PACKAGE                                                          PUBLISHER
pkg:/developer/java/jdk-6@1.6.0.35-0.175.1.0.0.24.1              solaris
pkg:/developer/java/jdk-7@1.7.0.7-0.175.1.0.0.24.0               solaris
pkg:/developer/java/jdk64@0.5.11-0.151.0.1                       solaris
pkg:/developer/java/jdk@0.5.11-0.151.0.1                         solaris
pkg:/developer/java/jdk@0.5.11-0.173                             solaris
pkg:/developer/java/jdk@1.6.0.35-0.175.1.0.0.24.1                solaris
pkg:/developer/java/jdk@1.7.0.21-0.175.1.7.0.4.0                 solaris
pkg:/developer/java/jdk@1.7.0.25-0.175.1.9.0.3.0                 solaris
pkg:/developer/java/jdk@1.7.0.45-0.175.1.12.0.5.0                solaris
pkg:/developer/java/jdk@1.7.0.5-0.175.0.10.1.0.0                 solaris
pkg:/developer/java/jdk@1.7.0.51.13                              solaris
pkg:/developer/java/jdk@1.7.0.7-0.175.1.0.0.24.0                 solaris
pkg:/gnome/accessibility/gnome-a11y-libs@2.30.0-0.175.1.0.0.21.0 solaris
pkg:/library/java/commons-collections@3.2.1-0.175.0.0.0.0.0      solaris
pkg:/library/java/demo64@0.5.11-0.151.0.1                        solaris
pkg:/library/java/demo@0.5.11-0.151.0.1                          solaris
pkg:/library/java/host-config@0.5.11-0.151.0.1                   solaris
pkg:/library/java/java-demo-6@1.6.0.35-0.175.1.0.0.24.1          solaris
pkg:/library/java/java-demo-7@1.7.0.7-0.175.1.0.0.24.0           solaris
pkg:/library/java/java-demo@1.6.0.35-0.175.1.0.0.24.1            solaris
pkg:/library/java/java-demo@1.7.0.21-0.175.1.7.0.4.0             solaris
pkg:/library/java/java-demo@1.7.0.25-0.175.1.9.0.3.0             solaris
pkg:/library/java/java-demo@1.7.0.45-0.175.1.12.0.5.0            solaris
pkg:/library/java/java-demo@1.7.0.5-0.175.0.10.1.0.0             solaris
pkg:/library/java/java-demo@1.7.0.51.13                          solaris
pkg:/library/java/java-demo@1.7.0.7-0.175.1.0.0.24.0             solaris
pkg:/library/java/javahelp@0.5.11-0.151.0.1                      solaris
pkg:/library/java/javahelp@0.5.11-0.175.0.0.0.2.0                solaris
pkg:/library/java/javahelp@0.5.11-0.175.1.0.0.11.0               solaris
pkg:/library/java/manual/locale/ja@0.5.11-0.151.0.1              solaris
pkg:/library/java/manual@0.5.11-0.151.0.1                        solaris
pkg:/runtime/java/jre-6@1.6.0.35-0.175.1.0.0.24.1                solaris
pkg:/runtime/java/jre-7@1.7.0.7-0.175.1.0.0.24.0                 solaris
pkg:/runtime/java/runtime64@0.5.11-0.151.0.1                     solaris

root@solaris:/opt/jdk7# pkg install  --accept pkg:/developer/java/jdk-7
           Packages to install:  3
       Create boot environment: No
Create backup boot environment: No

Planning linked: 0/1 done; 1 working: zone:testzone
Planning linked: 1/1 done
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                3/3       699/699    42.8/42.8  172k/s

Downloading linked: 0/1 done; 1 working: zone:testzone
Downloading linked: 1/1 done
PHASE                                          ITEMS
Installing new actions                       856/856
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done
Executing linked: 0/1 done; 1 working: zone:testzone
Executing linked: 1/1 done

Quick way to configure Statis IP in Virtual-box Solaris 11 Guest

root@solaris:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --

root@solaris:~# ipadm delete-ip net0

root@solaris:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --


root@solaris:~# ipadm create-ip net0

root@solaris:~# ipadm create-addr -T static -a 192.168.6.101/24 net0

root@solaris:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --

root@solaris:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           static   ok           192.168.6.101/24
lo0/v6            static   ok           ::1/128



Configure default gateway

root@solaris112:~# route -p show
No persistent routes are defined
root@solaris112:~# route -p add default 192.168.6.2
add net default: gateway 192.168.6.2: entry exists
add persistent net default: gateway 192.168.6.2
root@solaris112:~# route -p add -net 192.168.6.0 -gateway 192.168.6.2
add net 192.168.6.0: gateway 192.168.6.2: entry exists
add persistent net 192.168.6.0: gateway 192.168.6.2
root@solaris112:~# route -p show
persistent: route add default 192.168.6.2
persistent: route add -net 192.168.6.0 -gateway 192.168.6.2

Configure DNS Client

root@solaris112:~# svccfg  -s "dns/client" setprop 'config/nameserver = net_address: ( 192.168.6.2 )'
root@solaris112:~# svccfg  -s "dns/client" setprop 'config/domain = astring: ("dbaglobe.com")'
root@solaris112:~# svccfg -s "name-service/switch" setprop 'config/host = astring: "files dns"'
root@solaris112:~# svccfg  -s "dns/client" listprop 'config/nameserver'
config/nameserver net_address 192.168.6.2
root@solaris112:~# svccfg  -s "dns/client" listprop 'config/domain'
config/domain astring     dbaglobe.com
root@solaris112:~# svccfg  -s "name-service/switch" listprop 'config/nameserver'
root@solaris112:~# svccfg  -s "name-service/switch" listprop 'config/host'
config/host astring     "files dns"
root@solaris112:~# svcadm refresh name-service/switch
root@solaris112:~# svcadm enable dns/client