Monday, November 16, 2009

Checking a Package

You can use the pkgchk command to check the accuracy of installed files, including the integrity of directory structures and files in a package. You can also use this command to display the information about the package files. The detected discrepancies are written to the standard error device along with a detailed explanation of the problem. The syntax for the pkhchk command is as follows:
pkgchk [-a|-c] -1] [-p [-v]
The options are described here:
•-a|c. The -a option means check the file attributes only and not the file contents, whereas the -c option means check the file contents only and not the file attributes. The default is to check both the file attributes and the file contents.
•-l. This option specifies to list the information about the files contained in the package.
•-p . This option specifies to limit the check to the files whose path names are given in a comma or white space-delimited list specified by .
•-v. This option specifies the verbose mode.
. This option specifies the space-delimited list of packages. By default, all the installed packages on the system are checked.
You can also use the pkgchk command with the -d option to check the content of the packages that have not yet been installed but were spooled on the device specified by , which could be a directory, tape, or floppy disk.
Now that you know how the pkgchk command works, here are some practical scenarios and their solutions.

backup and restore in solaris

This article reviews some of the common backup and restore tools available on the Solaris Operating System. The examples provided here allow you to start using a utility immediately, without having to understand all of its features. Having some knowledge of these tools is crucial to general system administration. The examples shown here were tested on the Solaris 5.8 OS. They function on other versions as well.
In this article, I only list basic uses of each of these commands. If you need more information I suggest you reference the man pages, which go into much more detail for each utility.
More specifically, this article covers the following backup and recovery utilities:
•tar
•dd
•cpio
•pax

PERFORM MOUNT AND UNMOUNT

In order to access any file system, it is first necessary to mount it.we can determine which file system are currently mounted by using mount or df command.
How Mounting file system automatically?
#cat /etc/vfstab file lists all the file systems to be automatically mounted at system boot time,with the exception of the /etc/mnttab and /var/run file systems.

File format,seven field per line entry.
1) device to mount :->/dev/dsk/c0t1d0s0 or /home
2) device to fsck :--> raw or character device checked by the fsck.
3) mount point :--> mount point
4) Fs type :--> type of file system to be mounted.
5) fsck pass :--> when the field contain a value greater than zero (0),the file system alwayz check.
6) mount at boot :--> yes to enable the, mountall command to mount the file system at boot time. No to prevent a file system mount at boot time.
7) mount option :--> A comma-separated list of option passed to the mount command. - dash indicate the use of default mount option.
# /etc/mnttab File
mntfs file system that provides read-only information directly from the kernal about mounted file systems on the local host.each time a file system is mounted,the mount command adds an entry to this file.whenever a file system is unmounted,its entry is removed form /etc/mnttab.
Mount File system manually.
#mount /dev/dsk/c0t1d0s1 /home
the default option of mount command. RW,setuid,intr/nointr,logging,largfile,xattr
using mount command with option....eg.
#mount -o ro,nosuid,nolargefile,notime /dev/dsk/c0t1d0s1 /home

Mount All file system manually.
The /etc/vfstab file is read by the /usr/sbin/mountall command during the system boot sequence and mount all file systems that have a yes in the mount at boot field.
#mountall
To mount only local file system listed in /etc/vfstab
#mountall -l
Perform Unmount
#umonut /home or /umonut /dev/dsk/c0t1d0s1
Perform unmount all file systems.
#umountall -l (-l for only local file system)

Unmount Busy file system. use following command to identify which process need to be terminated.
#fuser -cu mountpoint
Kill all process
#fuser -ck mountpoint
verify there are no process accessing the file system
#fuser -c mountpoint
unmount file systems.
#umount mountpoint
if you dont want to chek and forcfully unmount then use this option
#umount -f mountpoint
For mount cdrom specfiy hsfs file system.
#mount -F hsfs -o ro /dev/dsk/c0t6d0s0 /cdrom
To restrict access cd-rom #/etc/init.d/volmgt stop

Performing Package Administration

The application software for Solaris OS is delivered in units called packages. A package is a set of files and directories in a defined format. The package format conforms to the application binary interface (ABI), which is a supplement to the System V Interface Definition. An ABI describes the low-level interface between an application program and the operating system, between an application and its libraries, or between different parts of the application. An ABI is like an Application Programming Interface (API): an API defines the interface between the application source code and libraries, thereby enabling the same source code to compile on any system supporting that API. Similarly, an ABI allows compiled object code to function without changes or the need to recompile on all systems using compatible ABIs.
Building a software product in units of one or more packages makes it easier to transfer it to a medium, to mass produce it, and to install and manage it. To build a package, an application developer must provide the following package components:
•Required components;
oPackage objects. These are the files and directories of the application software.
oControl files. These are the information files and installation scripts. Only two control files, which are the information files, are required: the pkginfo and prototype files.
•Optional components:
oOptional information files
oInstallation scripts

RAC IN ORACLE 10g

Introduction to RAC and Grid Computing
Implement One from Many
Manage Many as One
Oracle Enterprise Manager 10g Grid Control
Oracle Database 10g: The Database for the Grid
What Is Oracle Real Application Clusters?
Clusters and Scalability
Typical Cluster Stack with RAC
Speedup/Scaleup and Workloads

RAC Architecture
The Necessity of Global Resources
Global Dynamic Performance Views
Additional Memory Requirement for RAC
Parallel Execution with RAC
RAC Software Storage Principles & Database Storage Principles
Global Resources Coordination
Object Affinity and Dynamic Remastering
RAC and Instance/Crash Recovery

RAC and Shared Storage
Oracle Cluster File System
Automatic Storage Management: General Architecture, Disk Group, Key Features, Benefits and New Concepts
Disk Group: Mirroring & Dynamic Rebalancing
Database Storage Consolidation
ASM Instance and Crash Recovery in RAC
ASM: Administration Page
ASM Scalability
Demos: Install ASM in its own home directory in a RAC

Installation and Administration Basics
Oracle RAC 10g Installation: Outline
Pre-installation Tasks
Verifying Cluster Setup With cluvfy
Installing Oracle Clusterware & Automatic Storage Management
Verifying the Oracle Clusterware Installation
Create a RAC Database
Cloning
Conversion from single-instance to RAC
RAC Performance Tuning
RAC-Specific Tuning
Most Common RAC Tuning Tips
Cluster Database Performance Page
Cluster Cache Coherency Page
Cluster Interconnects Page
RAC-Specific ADDM Findings
ADDM Analysis Results
Demos: Use ADDM to identify issues with free list segments and sequences

Services
Traditional Workload Dispatching
Grid Workload Dispatching
Data Warehouse Example
RAC and Data Warehouse: An Optimal Solution
High Availability of Services in RAC
Possible Service Configuration with RAC
Service Aggregation and Tracing
Connection Load Balancing in RAC

Oracle Clusterware
Oracle Clusterware Runtime View
Virtual IP Addresses and RAC
OCR Architecture
OCR Contents and Organization
Automatic OCR Backups
OCR Considerations
The One Golden Rule in RAC Debugging
Diagnostics Collection Script

Design for High Availability
Causes of Planned & Unplanned Down Time
Oracle’s Solution to Down Time
RAC and Data Guard Complementarity
Maximum Availability Architecture
RAC and Data Guard: Topologies & Architecture
Data Guard Broker (DGB) and Oracle Clusterware (OC) Integration
Hardware Assisted Resilient Data
Which RAID Configuration for Best Availability?

VERITAS OBJECT CREATION

In VERITAS there are two ways to create objects. There's the "vxmake" way and the "vxassist" way. Here's the difference...
VxMake is an object creation tool that allows you to specifically build objects, one at a time, by your specific specs. The methods we mentioned before (add a disk, make a VM disk, create a subdisk, then...) would be an example of how we use vxmake. Piece by piece, we'd build out components, and assemble them. This is kool because there is no "guess work", meaning we are explicitly saying "build this!" and it's built. We'll learn more about vxmake, in detail, in the next course.
VxAssist is the other way. As you've been reading this course, have you said "this sure looks like a lot of work!"? Well, here's your answer: vxassist. When we want to build a volume, but we don't want to specify every little detail, we could add disks to make VM disks and then use vxassist to do the rest. So instead of using the "build this, and only this!" philosophy of vxmake, we turn to the vxassist mind set that sounds something like "OK, here are some disks, build me a RAID5 that can house 10G of data... I don't care how you do it, just hurry up." Vxassist is handy for a jam, or when you really just don't care exactly how things are set up. Again, in our following course we'll discuss object creation at length using vxassist.
Don't get any ideas yet about which one is better. When we get to the courses applicable to these tools and you see how they work with your own eyes (yup, you'll see lots of examples) then you can get defensive about your favorite. But also remember, you can use them both interchangeably in some cases, and often with use both. Keep your eyes open for these guys though, because they are very different ways of doing things.

VERITAS VOLUME MANAGER

VERITAS Volume Manager software is an advanced, system-level disk and storage array solution that alleviates downtime during system maintenance by enabling easy, online disk administration and configuration. The product also helps ensure data integrity and high availability by offering fast failure recovery and fault tolerant features. VERITAS Volume Manager software provides easy-to-use, online storage management for enterprise computing and emerging Storage Area Network (SAN) environments. Through the support of RAID redundancy techniques, VERITAS Volume Manager software helps protect against disk and hardware failures, while providing the flexibility to extend the capabilities of existing hardware. By providing a logical volume management layer, VERITAS Volume Manager overcomes the physical restriction imposed by hardware disk devices.
So, there you have it. But let me briefly list some of the things they totally missed.
•Support for: Simple, RAID0, RAID1, RAID0+1, RAID1+0, RAID5
•Dynamic Multipathing (DMP): Load balancing and redundant I/O paths to disk arrays supporting multi-controller attachment.
•Online Relayout: VERITAS allows you to change the layout of a VERITAS volume while it is live and mounted. Change a RAID0 to a RAID5 without a second of downtime!
•Snapshoting: Take a snapshot of your data, creating a "shadow" of it which you can use for online backups.
•Hot Relocation: Designate "spares" which will take the place of failed disks on-the-fly.
•Dirty Region Logging (DRL): Volume transaction logs which provide fast recoveries after system crashes.
•More...... more than I can list!

ORACLE 10G ON SUN SPARK

#/usr/sbin/prtconf | grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
# cat /etc/nsswitch.conf | grep hosts
# hostname
# domainname
RUN INSTALL:
—————-
A. create group name “dba”, oracle inventory group “oinstall” and “oracle” user
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
{Determine oracle user exist or not
# id -a oracle
{if exist, should be look like this=
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
{create oracle user=
# useradd -d /export/home/oracle -g dba -G oinstall -m -s /bin/ksh oracle
#mkdir /export/home/oracle
#chown oracle:dba /export/home/oracle
{set password=
# passwd -r files oracle
{to determine nobody user=
# id nobody
# /usr/sbin/useradd nobody >>run if does not exist
B. EDIT FILE /export/home/oracle/.profile
————————————–
umask 022
TMP=/tmp
TMPDIR=$TMP
DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/u01/app/oracle [replace with ur Oracle base Directory]
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 [replace with ur Oracle home Directory]
ORACLE_SID=jktdb [replace with your database]
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
C. Configure Kernel Parameter
—————————–
Note: Do not follow the official installation instruction, they contain misleading and out errors of fact!
#projadd oracle [This command will create a new 'resource project']
edit the /etc/user_attr file:
adm::::profiles=Log Management
lp::::profiles=Printer Management
root::::auths=solaris.*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no
oracle::::project=oracle [add this line]
then:
#su – oracle
$ id -p
$ prctl -n project.max-shm-memory -i project oracle
The display look like this:
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 126MB – deny -
system 16.0EB max deny -
leaving the oracle user still connected in the original one Then, as root in the new terminal, you can issue this command:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [create max memory to 4GB]
As soon as you’ve issued that command, switch back to the oracle user’s session and re-issue the earlier command:
$ prctl -n project.max-shm-memory -i project oracle
Note:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [this setting will lost after reboot]
to set permanently, run this: #projmod -s -K “project.max-shm-memory=(priv,4gb,deny)” oracle
D. Performing the Oracle Installation
————————————-
#su – oracle
$xhost +
$export DISPLAY=localhost;0.0
$ xhost + >>run this if you install from remote PC
$ cd /export/home/database/ [the source unzipped here]
./runInstaller
FOR SOLARIS SPARC:
====================
$ gunzip ship_rel10_sol64_db.cpio.gz
$ cpio -idm < ship_rel10_sol64_db.cpio $./runInstaller If you found unsufficient SWAP disk space on your disk, create folder under / then run this command: ————————————————— $ TMP=/directory $ TMPDIR=/directory $ export TMP TMPDIR Follow the screen>>NEXT>>NEXT
last, run this as root user:
—————————-
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
Create db:
———-
orc1
jktdb
E. 6.0 On-going Administration
——————————–
Finally, it’s time to get the web-based Enterprise Manager database administration tool up and running.
Since we’re using 10g Release 2, you should be able to launch a browser (Launch -> Web Browser) and simply navigate to : http://localhost:1158/em
If you do not know the correct port number to use, look for the following line in the $ORACLE_HOME/install/portlist.ini file.
in order to be able to log on as SYS with a password of whatever you supplied to the first screen of the Oracle installation wizard. In fact, getting a meaningful result at this point relies on three things having been performed successfully:
1. starting a listener (lsnrctl start)
2. opening the database (sqlplus / as sysdba then startup)
3. starting the Enterprise Manager agent (emctl start dbconsole)
F. Automating Database Startup
———————————————–
edit file “/var/opt/oracle/oratab” script to find lines with ‘Y’ at their ends
Create file “/etc/init.d/dbora”
——-
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo “Oracle startup: cannot start”
exit
fi
case “$1″ in
’start’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart”
;;
’stop’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut”
;;
esac
———
#chmod 777 /etc/init.d/dbora
#/etc/init.d/dbora stop
To integrate dbora file to standart Solaris startup and shutdown process:
————————————————————————
#ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
#ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
IF u found error this:
———————–
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
edit file “dbstart” & “dbshut”, find line $ORACLE_HOME_LISTNER=$1
and change to = $ORACLE_HOME_LISTNER=/u01/app/oracle/product/10.2.0/db_1
RECOMMENDED DIRECTORY STRUCTURE:
———————————————-
[Oracle Base Directory:]
/u01/app/oracle
/u01/app/orauser
/opt/oracle/app/oracle
[Oracle Inventory Directory:]
ORACLE_BASE/oraInventory
[Oracle Home Directory:]
ORACLE_BASE/product/10.2.0/db_1
[Identify an existing oracle base directory:]
#more /var/opt/oracle/oraInst.loc
[the output should be:]
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
# more /var/opt/oracle/oratab
*:/u03/app/oracle/product/10.2.0/db_1:N
*:/opt/orauser/infra_904:N
*:/oracle/9.2.0:N
COMMON INSTALLATION ERROR:
===========================
Unable to convert from “UTF-8″ to “646″ for NLS!
Solution: Install SUNWuiu8 package.
error adduser:
———————
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M)
This is because the /etc/passwd and /etc/shadow files are out of synchronization on your machine. [CSCdi74894]
To fix this, run the pwconv command, and then rerun cwconfigure.
try to run:
wc -l /etc/passwd /etc/shadow
————–
ERROR Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for
display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with theinstallation, at which time they will be rechecked. Solution(s): 1. Install SUNWxwplt package 2. Set DISPLAY variable 3. Execute xhost + on target (set in DISPLAY) computer ———————————————————- Exception in thread “main” java.lang.UnsatisfiedLinkError: … libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory Solution: Install the SUNWmfrun package. —————————————————————————————————- Can’t load ‘/usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so’ for module Sun::Solaris::Project: ld.so.1: perl: fatal: libpool.so.1: open failed: No such file or directory at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at /usr/sbin/projadd line 19 Compilation failed in require at /usr/sbin/projadd line 19. BEGIN failed–compilation aborted at /usr/sbin/projadd line 19. Solution: Install the SUNWpool SUNWpoolr packages. ———————————————————————– bash-3.00$ /u01/app/oracle/product/10.2.0/db_1/bin/./emctl start dbconsole Exception in getting local host java.net.UnknownHostException: -a: -a at java.net.InetAddress.getLocalHost(InetAddress.java:1191) at oracle.sysman.emSDK.conf.TargetInstaller.getLocalHost(TargetInstaller.java:4977) at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3758) Exception in getting local host Solution : check server hostname and /etc/hosts ————————————————————————- UNINSTALL ORACLE 10G: ——————— 1. remove all database, by running $dbca 2. stop any oracle process running: Database Control : $ORACLE_HOME/bin/emctl stop dbconsole Oracle Net listener : $ORACLE_HOME/bin/lsnrctl stop iSQL*Plus : $ORACLE_HOME/bin/isqlplusctl stop Ultra Search : $ORACLE_HOME/bin/searchctl stop 3. Start Oracle Universal installer: $ORACLE_HOME/oui/bin/runInstaller 4. In the Welcome window, click Deinstall Products. 5. In the Inventory screen, select the Oracle home and the products that you want to remove, then click Remove. Installation of Oracle 10g Release 2 on Solaris 10 x86 #/usr/sbin/prtconf | grep “Memory size” [Check RAM size] # /usr/sbin/swap -s [check swap] # df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
# cat /etc/nsswitch.conf | grep hosts
# hostname
# domainname
RUN INSTALL:

ASSIGN IP IN SUN MEACHINE

Add ip in sun machine.
1st chk ip... with
#ifconfig -a
Set hostname in
#vi /etc/nodename
sunsolaris
After that put hostname entry in
#vi /etc/hostname.pcn0 (pcn0 lan card name it depends upon ur hardware conf)
sunsolaris
Then in
#vi /etc/hosts (entry like this)
ip address hostname
save the file nad restart network service.
#svcadm disable /network/physical:default
#svcadm enable /network/physical:default

For temp add ip use following cmd...
#ifconfig hme0 192.168.1.100 netmask 255.255.255.0 up
for interface up and down..
#ifconfig hme0 up
#ifconfig hme0 down

For multipal IP
#vi /etc/hostname.hme0:1
add host name and put entry in /etc/hosts

# vi /etc/defaultrouter :--- your default gateway.
#vi /etc/resolve.conf :- DNS entry

route add, delete, display
for routing enable
#routeadm -e ipv4-forwarding (-d for disable)
(netstat -rn) netstat -rn # show current routes
netstat -rnv # show current routes and their masks
route add destIP gatewayIP
route add destIP -netmask 255.255.0.0 gatewayIP
route delete destIP gatewayIP
route delete destIP -netmask 255.255.0.0 gatewayIP
eg:- #route add -net 30.0.0.0 -netmask 255.0.0.0 -gateway 192.168.1.100

You want to add a static route to network 192.168.16.0 to your default gateway of 10.236.74.1
#route add –net 192.168.16.0 10.236.74.1
then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute
Add the following line
route add –net 192.168.16.0 10.236.74.1
You want to add a static route to host 192.168.64.4 to your default gateway of 10.236.74.1
#route add 192.168.64.4 10.236.74.1
then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute
Add the following line
route add 192.168.64.4 10.236.74.1
You want to delete the static route to network 192.168.16.0 to your default gateway of 10.236.74.1
#route delete –net 192.168.16.0 10.236.74.1
You want to delete the static route to host 192.168.64.4 to your default gateway of 10.236.74.1
#route delete 192.168.64.4 10.236.74.1
command to restore a system configuration to an unconfigured state,ready to be reconfigured again.when md finished,it perform a syatem shutdown.
#sys-unconfig
POSTED BY RAMAN KUMAR AT 11:04 AM 0 COMMENTS LINKS TO THIS POST
MONDAY, APRIL 14, 2008
NFS (Network Filw System)
Solaris 10 use NFSv4 by default.
NFSv4 features:-- 1) Stateful connection
2) Single protocol,reducing the number of service-side daemons.
3) Improved Firewall support. NFSv4 uses the well-know port 2049.
4)Strong security.
5)Extended attribute.

NFS server files:-
/etc/dfs/dfstab :- list the local resources to share at boot time.
/etc/dfs/sharetab :- rutime read file..(dont edit this file)
/etc/dfs/fstype :- list the default file system type for remote file system.
/etc/rmtab :- list file system remotely mounted by nfs client.
/etc/nfs/nfslog.conf :- list information defining the location of conf logs used for nfs server logging.
/etc/default/nfslogd :- lists conf infomation describing the behaviour of the nfslogd daemon for nfsv2/3
/etc/default/nfs :-- contain parameter value for NFS protocols and NFS daemons.

For e.g #vi /etc/dfs/dfstab
share -F nfs -o rw-192.168.0.203,ro -d "homedir" /share
save file
#mkdir /share
#shareall
#dfshares
service stop,start
NFS server daemons.
#svcadm -v enable nfs/server
#svcs -a grep nfs

NFS server daemons
mountd:- chk /etc/dfs/sharetab file to determine a particular file or dir is being shared and whether the requesting client has permission to access the shared resources.
statd,lockd
nfslogd:- provides operational logging for an NFs server.
nfsd:- handle client file system request.
nfsmapid:- nfs user and group ID mapping daemon, implemented in NFSv4. there is no user interface to this daemon,but parameters can be set in /etc/default/nfs
daemons started by #svc:/network nfs/mapid service

NFS server command.
share,shareall,unshare,unshareall
dfshares:- list available shared resource from a remote or local NFS server.
dfmounts:- Display a list of NFS server dir that are currently mounted.

FRom client side access:-
#mount serverip :/share /test

Enabling NFS server logging.
/etc/default/nfslogd files defines default parameter used for NFS server logging.
server side
#vi /etc/dfs/dfstab
share -F nfs -o rw,log=global /test
save file
#mkdir /test
#vi /etc/nfs/nfslog.conf
add in last logformat=extended
then service stop and start
client side
#mkdir /test1
#mount serverip:/test /test1
cd test1

To see log in server side
#cat /var/nfs/nfslog
How add SWAP Space in sun solaris
How add swap space in solaris.
# swap -l (swap partition)
#swap -s (summary)
#df -h
Two ways are available to add swap space in solaris.
1) swap slices
2) swap files
swap slicesAdd a disk partition as a swap slice to ur existing swap space.
#swap -a /dev/dsk/c0t0d0s1
for delete
#swap -d /dev/dsk/c0t0d0s1
swap files
#df -h
find path where u want create the swap file...after that
#mkdir -p /raman/swap
#mkfile 20m /raman/swap/swapfile
#swap -a /raman/swap/swapfile
verify with
#swap -s or swap -l command
For delete swap space
#swap -d /raman/swap/swapfile
#rm /raman/swap/swapfile

In above both cases,to make the partition permanent do entry in /etc/vfstab
#vi /etc/vfstab
/swapfile - - swap - no -
save file and reboot system to check the effect.

ZONE CONFIGURATION

Solaris zones provide virtual operating systems that look like different solaris instance to users and application.
zone allow the root user of the global zone to dedicate system resources to individual zones.each zone maintains their own root password and user information,separate from other zones and the global systems.Each zone exists with separate process and file system space and only can monitor and interact with local processes.
ZONE FEATURES:--
1) Security
2) Isolation
3) Virtualization
4) Granularity
5) Transparency

ZONE TYPE
Two types of zones
1) Global zone (Default zone) ZONE ID 0
2) Non-global zone

ZONE DAEMONS
1) zoneadmd:- primary process for managing the zone virtual platform. this deamons responsible for zone booting & shutting down. allocate zone ID and start zsched system process. setting zone-wide resource controls. plumbing virtual network interface & mounting loopback and conventional file systems.
2) zsched :- this process enables the zone subsystem to keep track of per-zone kernel threads.

Zone Configuration

1 global# zonecfg -z work-zone
2 zonecfg:work-zone> create
3 zonecfg:work-zone> set zonepath=/export/work-zone
4 zonecfg:work-zone> set autoboot=true
5 zonecfg:work-zone> add fs
6 zonecfg:work-zone:fs> set dir=/mnt
7 zonecfg:work-zone:fs> set special=/dev/dsk/c0t0d0s7
8 zonecfg:work-zone:fs> set raw=/dev/rdsk/c0t0d0s2
9 zonecfg:work-zone:fs> set type=ufs
10 zonecfg:work-zone:fs> add options [logging]
11 zonecfg:work-zone:fs> end
12 zonecfg:work-zone> add inherit-pkg-dir
13 zonecfg:work-zone:inherit-pkg-dir> set dir=/usr/sfw
14 zonecfg:work-zone:inherit-pkg-dir> end
15 zonecfg:work-zone> add net
16 zonecfg:work-zone:net> set physical=ce0
17 zonecfg:work-zone:net> set address=192.168.0.1
18 zonecfg:work-zone:net> end
19 zonecfg:work-zone> add device
20 zonecfg:work-zone:device> set match=/dev/sound/*
21 zonecfg:work-zone:device> end
22 zonecfg:work-zone> add attr
23 zonecfg:work-zone:attr> set name=comment
24 zonecfg:work-zone:attr> set type=string
25 zonecfg:work-zone:attr> set value="The work zone."
26 zonecfg:work-zone:attr> end
27 zonecfg:work-zone> verify
28 zonecfg:work-zone> commit
29 zonecfg:work-zone> exit

VIEW THE ZONE CONF FILE
#more /etc/zones/work-zone.xml

FOR VIEW ZONE
#zoneadm list -iv
FOR VERIFY
#zoneadm -z work-zone verify
INSTALLING CONFIGURED ZONE
#zoneadm-z wok-zone install
BOOTING A ZONE
#zoneadm -z work-zone ready
#zoneadm -z work-zone boot
#zoneadm list -iv
HALTING A ZONE
#zoneadm -z work-zone halt
REBOOTING A ZONE
#zoneadm -z work-zone reboot
LOGGING INTO AND WORKING WITH ZONE
#zlogin -C work-zone
DELETING A ZONE
#zoneadm list -cp
#zoneadm -z work-zone halt
#zoneadm list -cp
#zoneadm -z work-zone uninstall
#zonecfg -z work-zone delete
#zoneadm list –cp

ZONES IN SUN SOLARIS

Zone Introduction
Zones are containers to segregate services so that they do not interfere with each other. One zone, the global zone, is the locus for system-wide administrative functions. Non-global zones are not able to interact with each other except through network interfaces. When using management commands that reference PIDs, only processes in the same zone will be visible from any non-global zone.

Zones requiring network connectivity have at least one dedicated IP address. Non-global zones cannot observe each other's network traffic. Users in the global zone, however, are able to observe the functioning of processes in non-global zones. It is usually good practice to limit user access to the global zone to system administrators. Other processes and users should be assigned to a non-global zone.

Each zone is assigned a zone name and a unique numeric zone ID. The global zone always has the name "global" and ID "0." A node name is also assigned to each zone, including global. The node names are independent of the zone names.

Each zone has a path to its root directory relative to the global zone's root directory.

A non-global zone's scheduling class is set to be the same as the system's scheduling class. If a zone is assigned to a resource pool, its scheduling class can be controlled by controlling the pool's scheduling class.

Non-global zones can have their own zone administrators. Their authority is limited to their home zone.

The separation of the environments allows for better security, since the security for each zone is independent. Separation also allows for the installation of environments with distinct profiles on the same hardware.

The virtualization of the environment makes it easier to duplicate an environment on different physical servers.

ZFS is supported in Solaris 10 zones from the 6/2006 release and after.

Zone Installation
The system administrator configures new non-global zones via the zonecfg command, administers them via zoneadm and logs into them via zlogin.

Zone States
Zone state information can be viewed with zoneadm list -iv from the global zone. Non-global zones have one of the following states:

configured: Configuration complete and in stable storage.
incomplete: Installation or uninstallation underway
installed: Configuration instantiated on system. Zone has no associated virtual platform.
ready: Virtual platform established, zsched started, IPs plumbed, filesystems mounted, zone ID assigned. No zone processes started yet.
running: This state entered when zone init process starts.
shutting down: Zone being halted.
down: Transitional state during zone shutdown.

Zone Control Commands
The following control commands can be used to manage and monitor transitions between states:

zlogin options zone-name
zoneadm -z zone-name boot
zoneadm -z zone-name halt
zoneadm -z zone-name install
zoneadm -z zone-name ready
zoneadm -z zone-name reboot
zoneadm -z zone-name uninstall
zoneadm -z zone-name verify
zonecfg -z zone-name: Interactive mode; can be used to remove properties of the following types: fs, device, rctl, net, attr
zonecfg -z zone-name commit
zonecfg -z zone-name create
zonecfg -z zone-name delete
zonecfg -z zone-name verify

Resource Management
Zones can be used to dynamically control resource allocations on a zone basis. This means that an application on a zone can be isolated and prevented from throttling other processes in other zones on the same server.

Zone Components
The following components may be included in a zone:

Zone name
zonepath: Path to the zone root in the global zone's file space.
autoboot: Whether to start the zone automatically. (Note that the svc:/system/zones:default service needs to be running in SMF for this to work.)
pool: Associate the zone with a resource pool; multiple zones may share a pool.
net: Zone network interface
fs: File systems from the zone's /etc/vfstab, automounted file systems configured within the zone, manually mounted file systems or ZFS mounts from within the zone.
dataset: This allows a non-global zone to manage a ZFS file system.
inherit-pkg-dir: In a sparse root zone, represents directories containing packaged software that a non-global zone shares with the global zone. (Should not be used in a whole root zone.)
device: Devices that should be configured in a non-global zone.
rctl: Zone-wide resource controls such as zone.cpu-shares and zone.max-lwps
attr: Zone comments
The components can be set using the zonecfg command.

zonecfg Interactive Mode
In interactive mode, zonecfg can refer to either a global scope or a specific resource. If no zone is specified in the original zonecfg command, the scope is global by default.

If a select or add subcommand is used to specify a resource, the scope limited to that resource until an end or cancel command is issued.

The following subcommands are supported:

add: Add the specified resource or property to the configuration in the scope.
cancel: Ends the resource specification and returns to the global scope without retaining partially specified resources.
commit: Dump current configuration to disk.
create: In-memory configuration begun for a new zone. A -t template option specifies a template, -F overwrites an existing configuration, and -b creates a blank configuration.
delete: Destroy the specified configuration.
end: Ends the resource specification
exit: Ends the zonecfg session.
export: Export the configuration in a form that can be used in a command file.
help: Context-sensitive help depending on the current scope
info: Display information about the configuration of the current scope.
remove: Remove the specified resource or property from the command scope.
revert: Return to the last state written to disk.
select: From the global scope, changes scope to the specified resource
set: Set the specified property to the specified value
verify: Verify the current configuration for correctness.

Adding Resources
dataset:
zonecfg:zone-name> add dataset
zonecfg:zone-name:dataset> set name=pool/filesys
zonecfg:zone-name:dataset> end

fs:
zonecfg:zone-name> add fs
zonecfg:zone-name:fs> set directory=/mountpoint
zonecfg:zone-name:fs> set special=/dev/dsk/c#t#d#s#
zonecfg:zone-name:fs> set raw=/dev/rdsk/c#t#d#s#
zonecfg:zone-name:fs> set type=ufs
zonecfg:zone-name:fs> add options logging
zonecfg:zone-name:fs> end

inherit-pkg-dir:
zonecfg:zone-name> add inherit-pkg-dir
zonecfg:zone-name:inherit-pkg-dir> set dir=/package-home
zonecfg:zone-name:inherit-pkg-dir> end

net:
zonecfg:zone-name> add net
zonecfg:zone-name:net> set physical=interface-name
zonecfg:zone-name:net> set address=xxx.xxx.xxx.xxx
zonecfg:zone-name:net> end
(Examples of interface names include hme0 and bge0.)

rctl:
zonecfg:zone-name> add rctl
zonecfg:zone-name:rctl> set name=resource-name
zonecfg:zone-name:rctl> add value (priv=priv-level,limit=#,action=action-type)
zonecfg:zone-name:rctl> end

(See Resource Management for information about what sorts of values to use.)

Zone Models
There are two different zone models, sparse and whole root.

Sparse zones only contain a subset of the packages installed into the root zone. Additional packages can be brought in using the inherit-pkg-dir resources. Each sparse zone requires about 100MB of free space in the global file system. 40MB of free RAM are also recommended.

Whole root zones contain all required packages and also any optional Solaris packages that have been selected. The disk space required for whole root zones is as much as is required for a full installation. Whole root zones allow maximum configuration within the zone context.

Zone Creation Example
From within the global zone:
# zonecfg -z zone-name
zonecfg:zone-name> create
zonecfg:zone-name> set zonepath=/zone-root-path
(Note that the zone's root path cannot be on ZFS, though that capability is coming.)
zonecfg:zone-name> set autoboot=true
zonecfg:zone-name> add fs
zonecfg:zone-name:fs> set dir=/mount-point
zonecfg:zone-name:fs> set special=/global-source-dir
zonecfg:zone-name:fs> set type=lofs
zonecfg:zone-name:fs> end
(Inside the non-global zone, the mounted loopback file system will be readable and writable.)
zonecfg:zone-name> add dataset zonecfg:zone-name:dataset> set name=zone-pool/ZFS-filesys
zonecfg:zone-name:dataset> end
zonecfg:zone-name> verify
zonecfg:zone-name> commit
zonecfg:zone-name> end