Wednesday, December 15, 2010

Configure Openfiler as DNS server for oracle 11gR2 RAC installation (without GNS)


[root@openfiler ~]# conary update bind:runtime
Including extra troves to resolve dependencies:
info-named:user=1-1-0.1 util-linux-ng:runtime=2.16-0.0.4-1
Applying update job 1 of 2:
Install info-named(:user)=1-1-0.1
Applying update job 2 of 2:
Install bind:runtime=9.4.3_P5-1.1-1
Update util-linux-ng(:runtime) (2.16-0.0.3-1 -> 2.16-0.0.4-1)


[root@openfiler ~]# cat /etc/named.conf
options {
directory "/srv/named/data";
};


# forward zone
zone "lab.dbaglobe.com" IN {
type master;
file "lab.dbaglobe.com.zone";
};


# reverse zone
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.zone";
};


[root@openfiler ~]# cat /srv/named/data/lab.dbaglobe.com.zone
$TTL 86400
@ IN SOA openfiler.lab.dbaglobe.com. root.localhost. (
2010063000 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expiry
86400 ) ; minimum
@ IN NS openfiler.lab.dbaglobe.com.
localhost IN A 127.0.0.1
openfiler IN A 192.168.1.100
vmxdb03 IN A 192.168.1.23
vmxdb04 IN A 192.168.1.24
vmxdb03-vip IN A 192.168.1.123
vmxdb04-vip IN A 192.168.1.124
vmxdb-scan IN A 192.168.1.126
IN A 192.168.1.127
IN A 192.168.1.128


[root@openfiler ~]# cat /srv/named/data/1.168.192.in-addr.arpa.zone
$TTL 86400
@ IN SOA openfiler.lab.dbaglobe.com. root.localhost. (
2010063000 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expiry
86400 ) ; minimum
@ IN NS openfiler.lab.dbaglobe.com.
100 IN PTR openfiler.lab.dbaglobe.com.
23 IN PTR vmxdb03.lab.dbaglobe.com.
24 IN PTR vmxdb04.lab.dbaglobe.com.
123 IN PTR vmxdb03-vip.lab.dbaglobe.com.
124 IN PTR vmxdb04-vip.lab.dbaglobe.com.


[root@openfiler ~]# service named start
Starting named: [ OK ]


[root@openfiler ~]# chkconfig named on


[root@openfiler ~]# chkconfig named --list
named 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Openfiler ISCSI LUN persistent naming using UDEV


SCSI device sda: 90275840 512-byte hdwr sectors (46221 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 90275840 512-byte hdwr sectors (46221 MB)
SCSI device sda: drive cache: write back
Vendor: OPNFILER Model: VIRTUAL-DISK Rev: 0
SCSI device sdb: 4194304 512-byte hdwr sectors (2147 MB)
Vendor: OPNFILER Model: VIRTUAL-DISK Rev: 0
SCSI device sdc: 4194304 512-byte hdwr sectors (2147 MB)
Vendor: OPNFILER Model: VIRTUAL-DISK Rev: 0
SCSI device sdd: 4194304 512-byte hdwr sectors (2147 MB)
Vendor: OPNFILER Model: VIRTUAL-DISK Rev: 0
SCSI device sde: 4194304 512-byte hdwr sectors (2147 MB)
Vendor: OPNFILER Model: VIRTUAL-DISK Rev: 0
SCSI device sdf: 4194304 512-byte hdwr sectors (2147 MB)


[root@vmxdb02 ~]# lsscsi
[0:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sda
[1:0:0:0] disk OPNFILER VIRTUAL-DISK 0 /dev/sdb
[1:0:0:1] disk OPNFILER VIRTUAL-DISK 0 /dev/sdc
[1:0:0:2] disk OPNFILER VIRTUAL-DISK 0 /dev/sdd
[1:0:0:3] disk OPNFILER VIRTUAL-DISK 0 /dev/sde
[1:0:0:4] disk OPNFILER VIRTUAL-DISK 0 /dev/sdf



[root@vmxdb02 ~]# ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Dec 15 09:12 ata-VBOX_CD-ROM_VB2-01700376 -> ../../hdc
lrwxrwxrwx 1 root root 9 Dec 15 09:30 scsi-14f504e46494c45003079486253592d664130732d4d316730 -> ../../sdc
lrwxrwxrwx 1 root root 9 Dec 15 09:30 scsi-14f504e46494c45004e72793839712d444b536c2d7a453543 -> ../../sdf
lrwxrwxrwx 1 root root 9 Dec 15 09:30 scsi-14f504e46494c45005556417744532d757952702d58783772 -> ../../sde
lrwxrwxrwx 1 root root 9 Dec 15 09:30 scsi-14f504e46494c45006531506a52412d625645702d79354674 -> ../../sdd
lrwxrwxrwx 1 root root 9 Dec 15 09:30 scsi-14f504e46494c450074324f794a562d335134562d626f756e -> ../../sdb
lrwxrwxrwx 1 root root 9 Dec 15 09:12 scsi-SATA_VBOX_HARDDISK_VB3b4884d5-bc4c8fd3 -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 15 09:12 scsi-SATA_VBOX_HARDDISK_VB3b4884d5-bc4c8fd3-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 15 09:12 scsi-SATA_VBOX_HARDDISK_VB3b4884d5-bc4c8fd3-part2 -> ../../sda2



[root@vmxdb02 ~]# scsi_id -gus /block/sdc
14f504e46494c45003079486253592d664130732d4d316730



[root@vmxdb02 ~]# vi /etc/udev/rules.d/55-iscsi.rules
[root@vmxdb02 ~]# cat /etc/udev/rules.d/55-iscsi.rules
# /dev/iscsi/asmdisk1
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -gus %p",
RESULT=="14f504e46494c450074324f794a562d335134562d626f756e", SYMLINK+="iscsi/asmdisk1p%n", OWNER="grid", GROUP="oinstall", MODE="0660"

# /dev/iscsi/asmdisk2
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -gus %p",
RESULT=="14f504e46494c45003079486253592d664130732d4d316730", SYMLINK+="iscsi/asmdisk2p%n", OWNER="grid", GROUP="oinstall", MODE="0660"

# /dev/iscsi/asmdisk3
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -gus %p",
RESULT=="14f504e46494c45006531506a52412d625645702d79354674", SYMLINK+="iscsi/asmdisk3p%n", OWNER="grid", GROUP="oinstall", MODE="0660"

# /dev/iscsi/asmdisk4
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -gus %p",
RESULT=="14f504e46494c45005556417744532d757952702d58783772", SYMLINK+="iscsi/asmdisk4p%n", OWNER="grid", GROUP="oinstall", MODE="0660"

# /dev/iscsi/asmdisk5
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -gus %p",
RESULT=="14f504e46494c45004e72793839712d444b536c2d7a453543", SYMLINK+="iscsi/asmdisk5p%n", OWNER="grid", GROUP="oinstall", MODE="0660"



[root@vmxdb02 ~]# udevcontrol reload_rules
[root@vmxdb02 ~]# start_udev
Starting udev:
[ OK ]


[root@vmxdb02 ~]# ls -l /dev/iscsi/asmdisk*
lrwxrwxrwx 1 root root 6 Dec 15 09:57 /dev/iscsi/asmdisk1p -> ../sdb
lrwxrwxrwx 1 root root 6 Dec 15 09:57 /dev/iscsi/asmdisk2p -> ../sdc
lrwxrwxrwx 1 root root 6 Dec 15 09:57 /dev/iscsi/asmdisk3p -> ../sdd
lrwxrwxrwx 1 root root 6 Dec 15 09:57 /dev/iscsi/asmdisk4p -> ../sde
lrwxrwxrwx 1 root root 6 Dec 15 09:57 /dev/iscsi/asmdisk5p -> ../sdf



[root@vmxdb02 ~]# ls -l /dev/sd*
brw-r----- 1 root disk 8, 0 Dec 15 09:12 /dev/sda
brw-r----- 1 root disk 8, 1 Dec 15 09:12 /dev/sda1
brw-r----- 1 root disk 8, 2 Dec 15 09:12 /dev/sda2
brw-rw---- 1 grid oinstall 8, 16 Dec 15 09:57 /dev/sdb
brw-rw---- 1 grid oinstall 8, 32 Dec 15 09:57 /dev/sdc
brw-rw---- 1 grid oinstall 8, 48 Dec 15 09:57 /dev/sdd
brw-rw---- 1 grid oinstall 8, 64 Dec 15 09:57 /dev/sde
brw-rw---- 1 grid oinstall 8, 80 Dec 15 09:57 /dev/sdf

Tuesday, December 14, 2010

Quick install rpms using YUM with local DVD Repo for Oracle database 11gR2


[root@unknown-08-00-27-07-fa-07 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)



[root@unknown-08-00-27-07-fa-07 ~]# mount -r -o loop -t iso9660 /dev/cdrom /mnt



[root@unknown-08-00-27-07-fa-07 ~]# cat /etc/yum.repos.d/dvd.repo
[dvd]
name=OEL5DVD
baseurl=file:///mnt/Server
enabled=1
gpgcheck=1
gpgkey=file:///mnt/RPM-GPG-KEY file:///mnt/RPM-GPG-KEY-oracle



[root@unknown-08-00-27-07-fa-07 ~]# yum clean all
Loaded plugins: security
Cleaning up Everything
[root@unknown-08-00-27-07-fa-07 ~]# yum update
Loaded plugins: security
dvd | 1.1 kB 00:00
dvd/primary | 818 kB 00:00
dvd 2334/2334
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update


[root@unknown-08-00-27-07-fa-07 ~]# yum install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel
Loaded plugins: security
Setting up Install Process
Package binutils-2.17.50.0.6-14.el5.i386 already installed and latest version
Package elfutils-libelf-0.137-3.el5.i386 already installed and latest version
Package glibc-2.5-49.i686 already installed and latest version
Package glibc-common-2.5-49.i386 already installed and latest version
Package ksh-20100202-1.el5.i386 already installed and latest version
Package libaio-0.3.106-5.i386 already installed and latest version
Package libgcc-4.1.2-48.el5.i386 already installed and latest version
Package libstdc++-4.1.2-48.el5.i386 already installed and latest version
Package 1:make-3.81-3.el5.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i386 0:3.2.3-61 set to be updated
---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated
---> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated
---> Package gcc.i386 0:4.1.2-48.el5 set to be updated
---> Package gcc-c++.i386 0:4.1.2-48.el5 set to be updated
---> Package glibc-devel.i386 0:2.5-49 set to be updated
---> Package glibc-headers.i386 0:2.5-49 set to be updated
---> Package kernel-headers.i386 0:2.6.18-194.el5 set to be updated
---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
---> Package libstdc++-devel.i386 0:4.1.2-48.el5 set to be updated
dvd/filelists | 2.4 MB 00:00
---> Package sysstat.i386 0:7.0.2-3.el5 set to be updated
---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-7.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================
Package Arch Version Repository Size
================================================================================================
Installing:
compat-libstdc++-33 i386 3.2.3-61 dvd 232 k
elfutils-libelf-devel i386 0.137-3.el5 dvd 24 k
elfutils-libelf-devel-static i386 0.137-3.el5 dvd 66 k
gcc i386 4.1.2-48.el5 dvd 5.2 M
gcc-c++ i386 4.1.2-48.el5 dvd 3.4 M
glibc-devel i386 2.5-49 dvd 2.0 M
glibc-headers i386 2.5-49 dvd 614 k
kernel-headers i386 2.6.18-194.el5 dvd 1.1 M
libaio-devel i386 0.3.106-5 dvd 12 k
libgomp i386 4.4.0-6.el5 dvd 70 k
libstdc++-devel i386 4.1.2-48.el5 dvd 2.9 M
sysstat i386 7.0.2-3.el5 dvd 170 k
unixODBC i386 2.2.11-7.1 dvd 830 k
unixODBC-devel i386 2.2.11-7.1 dvd 743 k

Transaction Summary
================================================================================================
Install 14 Package(s)
Upgrade 0 Package(s)

Total download size: 17 M
Is this ok [y/N]: y
Downloading Packages:
------------------------------------------------------------------------------------------------
Total 708 MB/s | 17 MB 00:00
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
dvd/gpgkey | 1.4 kB 00:00
Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) " from /mnt/RPM-GPG-KEY
Is this ok [y/N]: y
dvd/gpgkey | 1.4 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libgomp 1/14
Installing : unixODBC 2/14
Installing : compat-libstdc++-33 3/14
Installing : sysstat 4/14
Installing : libstdc++-devel 5/14
Installing : kernel-headers 6/14
Installing : glibc-headers 7/14
Installing : glibc-devel 8/14
Installing : unixODBC-devel 9/14
Installing : libaio-devel 10/14
Installing : gcc 11/14
Installing : gcc-c++ 12/14
Installing : elfutils-libelf-devel 13/14
Installing : elfutils-libelf-devel-static 14/14

Installed:
compat-libstdc++-33.i386 0:3.2.3-61 elfutils-libelf-devel.i386 0:0.137-3.el5
elfutils-libelf-devel-static.i386 0:0.137-3.el5 gcc.i386 0:4.1.2-48.el5
gcc-c++.i386 0:4.1.2-48.el5 glibc-devel.i386 0:2.5-49
glibc-headers.i386 0:2.5-49 kernel-headers.i386 0:2.6.18-194.el5
libaio-devel.i386 0:0.3.106-5 libgomp.i386 0:4.4.0-6.el5
libstdc++-devel.i386 0:4.1.2-48.el5 sysstat.i386 0:7.0.2-3.el5
unixODBC.i386 0:2.2.11-7.1 unixODBC-devel.i386 0:2.2.11-7.1

Complete!

Configure DHCP Server on Linux

Server Part:
=========================
[root@rh5 ~]# rpm -q dhcp-3.0.5-23.el5_5.2
dhcp-3.0.5-23.el5_5.2

[root@rh5 ~]# vi /etc/dhcpd.conf
[root@rh5 ~]# cat /etc/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style interim;
ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
range 192.168.1.200 192.168.1.210;
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;

option nis-domain "lab.dbaglobe.com";
option domain-name "lab.dbaglobe.com";
option domain-name-servers 192.168.1.254;

# option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
}



[root@rh5 ~]# service dhcpd restart
Starting dhcpd: [ OK ]


Client Part:
=========================
[root@unknown-08-00-27-07-fa-07 ~]# cat /etc/dhclient.conf
# 192.168.1.254 is one of the DHCP Server in the local network
# After reject it, the dhcp network can use 192.168.1.100 as DHCP Server
reject 192.168.1.254;
interface "eth0" {
send host-name "vmxdb02.lab.dbaglobe.com";
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
}

[root@unknown-08-00-27-07-fa-07 ~]# dhclient
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/08:00:27:07:fa:07
Sending on LPF/eth0/08:00:27:07:fa:07
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.254 rejected.
DHCPACK from 192.168.1.100
bound to 192.168.1.210 -- renewal in 19873 seconds.

[root@unknown-08-00-27-07-fa-07 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:07:FA:07
inet addr:192.168.1.210 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe07:fa07/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15501 errors:0 dropped:0 overruns:0 frame:0
TX packets:2505 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1015295 (991.4 KiB) TX bytes:326697 (319.0 KiB)

Sunday, December 5, 2010

How to fix "file /dev/zero: mmap anon failed: Resource temporarily unavailable" (Solaris)

- Linking Oracle
rm -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/oracle
/usr/ccs/bin/ld -o /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/oracle -L/u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ -L/u01/app/oracle/product/11.2.0/db_1/lib/ -dy /u01/app/oracle/product/11.2.0/db_1/lib/prod/lib/amd64/crti.o /u01/app/oracle/product/11.2.0/db_1/lib/prod/lib/amd64/crt1x.o /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/opimai.o /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ttcsoi.o -z allextract -lperfsrv11 -z defaultextract /u01/app/oracle/product/11.2.0/db_1/lib/nautab.o /u01/app/oracle/product/11.2.0/db_1/lib/naeet.o /u01/app/oracle/product/11.2.0/db_1/lib/naect.o /u01/app/oracle/product/11.2.0/db_1/lib/naedhs.o /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/config.o -lserver11 -lodm11 -lcell11 -lnnet11 -lskgxp11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 -lclient11 -lvsn11 -lcommon11 -lgeneric11 -lknlopt `if /usr/ccs/bin/ar tv /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap11" ; fi` -lslax11 -lpls11 -lplp11 -lserver11 -lclient11 -lvsn11 -lcommon11 -lgeneric11 `if [ -f /u01/app/oracle/product/11.2.0/db_1/lib/libavserver11.a ] ; then echo "-lavserver11" ; else echo "-lavstub11"; fi` `if [ -f /u01/app/oracle/product/11.2.0/db_1/lib/libavclient11.a ] ; then echo "-lavclient11" ; fi` -lknlopt -lslax11 -lpls11 -lplp11 -ljavavm11 -lserver11 -lwwg `cat /u01/app/oracle/product/11.2.0/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u01/app/oracle/product/11.2.0/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnnz11 -lzt11 -lztkg11 -lmm -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 -lztkg11 `cat /u01/app/oracle/product/11.2.0/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u01/app/oracle/product/11.2.0/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnnz11 -lzt11 -lztkg11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 `if /usr/ccs/bin/ar tv /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo11"; fi` -L/u01/app/oracle/product/11.2.0/db_1/ctx/lib/ -lctxc11 -lctx11 -lzx11 -lgx11 -lctx11 -lzx11 -lgx11 -lordimt11 -lclsra11 -ldbcfg11 -lhasgen11 -lskgxn2 -lnnz11 -lzt11 -lxml11 -locr11 -locrb11 -locrutl11 -lhasgen11 -lskgxn2 -lnnz11 -lzt11 -lxml11 -lasmclnt11 -lcommon11 -lcell11 -lskgxp11 -lgeneric11 -lcommon11 -lgeneric11 -loraz -llzopro -lorabz2 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 -lsnls11 -lunls11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 -lasmclnt11 `cat /u01/app/oracle/product/11.2.0/db_1/lib/sysliblist` -R /opt/SUNWcluster/lib:/u01/app/oracle/product/11.2.0/db_1/lib:/opt/ORCLcluster/lib/ -Y P,:/opt/SUNWcluster/lib:/opt/ORCLcluster/lib/:/usr/ccs/lib/amd64:/usr/lib/amd64 -Qy -lc -lrt -laio -lposix4 -lkstat -lm /u01/app/oracle/product/11.2.0/db_1/lib/prod/lib/amd64/crtn.o -lpthread
ld: fatal: *** Error code 1
file /dev/zero: mmap anon failed: Resource temporarily unavailable
make: Fatal error: Command failed for target `/u01/app/oracle/product/11.2.0/db_1/rdbms/lib/oracle'


###########SetUp###########

###########Method 1###########


bash-3.00$ swap -s
total: 1333976k bytes allocated + 104980k reserved = 1438956k used, 661796k available

bash-3.00$ /usr/sbin/mkfile 2048m /u01/app/oracle_install_swap

bash-3.00$ swap -a /u01/app/oracle_install_swap
"/u01/app/oracle_install_swap" is not valid for swapping.
It must be a block device or a regular file with the
"save user text on execution" bit set.
bash-3.00# /usr/sbin/lofiadm -a /u01/app/oracle_install_swap
/dev/lofi/1
bash-3.00# ls -l /dev/lofi/1
lrwxrwxrwx 1 root root 29 Dec 5 12:27 /dev/lofi/1 -> ../../devices/pseudo/lofi@0:1
bash-3.00# swap -a /dev/lofi/1
bash-3.00# swap -s
total: 1334520k bytes allocated + 105104k reserved = 1439624k used, 2689628k available
bash-3.00#

###########Method 2###########

bash-3.00# /usr/sbin/mkfile 20m /u01/app/oracle_install_swap1
bash-3.00# chmod 1600 /u01/app/oracle_install_swap1
bash-3.00# ls -l /u01/app/oracle_install_swap1
-rw------T 1 root root 20971520 Dec 5 12:39 /u01/app/oracle_install_swap1
bash-3.00# swap -a /u01/app/oracle_install_swap1



bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 30,1 8 2988080 348504
/dev/lofi/1 144,1 8 4194296 3909400
/u01/app/oracle_install_swap1 - 8 40952 15088



PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
22733 oracle 1185M 571M sleep 60 0 0:01:35 6.5% ld/1
1705 oracle 118M 5572K sleep 59 0 0:01:25 1.5% java/15
964 noaccess 126M 6444K sleep 59 0 0:01:14 0.9% java/18


bash-3.00$ while true; do swap -s; sleep 1; done
total: 2021720k bytes allocated + 139628k reserved = 2161348k used, 2032852k available
total: 2021992k bytes allocated + 139356k reserved = 2161348k used, 2032852k available
total: 2022392k bytes allocated + 138956k reserved = 2161348k used, 2032852k available
total: 2022652k bytes allocated + 138696k reserved = 2161348k used, 2032868k available
total: 2023056k bytes allocated + 138292k reserved = 2161348k used, 2032864k available
total: 2023208k bytes allocated + 138140k reserved = 2161348k used, 2032852k available
total: 2023300k bytes allocated + 138048k reserved = 2161348k used, 2032852k available
total: 2023348k bytes allocated + 138000k reserved = 2161348k used, 2032844k available
total: 2023392k bytes allocated + 137956k reserved = 2161348k used, 2032840k available
total: 2023624k bytes allocated + 137724k reserved = 2161348k used, 2032844k available



###########Clean up###########

bash-3.00# lofiadm -d /dev/lofi/1
bash-3.00# ls -l /dev/lofi/1
/dev/lofi/1: No such file or directory
bash-3.00# rm /u01/app/oracle_install_swap

bash-3.00# swap -d /u01/app/oracle_install_swap1
bash-3.00# rm /u01/app/oracle_install_swap1
bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 30,1 8 2988080 1775224
bash-3.00#

Configure Solaris 10 Network (Changing from DHCP to Static IP)

bash-3.00# rm /etc/dhcp.e1000g0
bash-3.00# cat /etc/hostname.e1000g0
10.0.2.15
bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
10.0.2.15 sol10 sol10.lab.dbaglobe.com

# cat /etc/nodename
sol10

bash-3.00# cat /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
10.0.2.0 255.255.255.0

# cat /etc/defaultrouter
10.0.2.2

# cat /etc/resolv.conf
nameserver 202.126.40.5
nameserver 4.2.2.1

bash-3.00# init 6

Connect to VirtualBox Guest through NAT network (Solaris+ssh)

Here the e1000 can be replaced by pcnet, if you are using Windows/Linux guest with PCNet Type of ethernet card emulation.

And Solaris here is the Guest Name

C:\Program Files\Oracle\VirtualBox>VBoxManage getextradata "Solaris" enumerate
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.

Key: GUI/InfoDlgState, Value: 400,450,normal
Key: GUI/LastGuestSizeHint, Value: 720,400
Key: GUI/LastWindowPostion, Value: 265,101,720,442
Key: GUI/MiniToolBarAlignment, Value: bottom
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/ShowMiniToolBar, Value: yes

C:\Program Files\Oracle\VirtualBox>VBoxManage setextradata "Solaris" "VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/HostPort" 2222
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.

C:\Program Files\Oracle\VirtualBox>VBoxManage setextradata "Solaris" "VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/GuestPort" 22
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.


C:\Program Files\Oracle\VirtualBox>VBoxManage setextradata "Solaris" "VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/Protocol" TCP
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.


C:\Program Files\Oracle\VirtualBox>VBoxManage getextradata "Solaris" enumerate
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.

Key: GUI/InfoDlgState, Value: 400,450,normal
Key: GUI/LastGuestSizeHint, Value: 720,400
Key: GUI/LastWindowPostion, Value: 265,101,720,442
Key: GUI/MiniToolBarAlignment, Value: bottom
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/ShowMiniToolBar, Value: yes
Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/HostPort, Value: 2222
Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/Protocol, Value: TCP

C:\Program Files\Oracle\VirtualBox>netstat -na|findstr 22
TCP 120.28.9.137:3305 61.18.190.228:443 ESTABLISHED



C:\Program Files\Oracle\VirtualBox>netstat -na|findstr 22
TCP 0.0.0.0:2222 0.0.0.0:0 LISTENING
TCP 120.28.9.137:3305 61.18.190.228:443 ESTABLISHED