Monday, January 24, 2011

Moving local zone root path

Moving the local zone is very easy task in solaris.Here I`m moving the local zone(moon) path from /zones/moon to /export/zones/moon.

Global# mkdir /export/zones

Global# zoneadm -z moon halt


Global# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
4 earth running /zones/earth native shared
- moon installed /zones/moon native shared

Global# zoneadm -z moon move /export/zones/moon

Global# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
4 earth running /zones/earth native shared
- moon installed /export/zones/moon native shared

Global zone name from Local zone

Most of the time we struggle to identify global zone name while we are working in local zone.This tips will be useful to identify global zone name from its local zone.

1.First you login to Global zone and create a file called "global_zone_name" under /usr/bin directory.Hardcore your Global zone name in this file and save it.Change the file permission to 700.

Global Zone
===========
Global# vi /usr/bin/global_zone_name
"/usr/bin/global_zone_name" 1 line, 7 characters

echo "sunray"
wq!


Global# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
1 moon running /zones/moon native shared


Login to local zone
# zlogin moon
[Connected to zone 'moon' pts/6]


In local zone type global_zone_name command it will display your global zone name.
Local Zone:
===========
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

# uname -a
SunOS moon 5.10 Generic_141445-09 i86pc i386 i86pc

# global_zone_name
sunray

**Anyone know better solution than this please share it**

Wednesday, November 17, 2010

Oracle Solaris 11 Express released

Oracle announces immediate availability of Oracle Solaris 11 Express, a fully supported, production-ready environment that builds on existing Oracle Solaris 10 features with more than 2,700 new projects and 400 significant innovations.
for more details
http://www.oracle.com/us/products/servers-storage/solaris/solaris-11-express-185123.html

Wednesday, May 26, 2010

Useful Solaris Commands

1. Display system information
#uname –a

2. Diplay processor information
#psrinfo –v

3.Display hostname
#hostname
#cat /etc/hosts

4.Dispaly domain name
#domainname
#cat /etc/defaultdomain

5. Display installed memory configuration

#prtconf | grep memory

6.To get installed Network card status
#dladm show-dev

7. Display Routing table information
#netstat –nr

8. Display virtual memory information
#swap –l
#swap –s

9. Display Disks error information
#iostat –E

10. Diplay memory status
#vmstat –p

11. Display interrupts status
#vmstat –ip

12. Dispaly Disk usage information
#df –hk

13. Dispaly system events since last reboot
#vmstat –s

14. Display swapping statistics
#vmstat –S

15. Display cache flushing statistics
#vmstat –c

16. To check buffer activities
#sar -b

17. To check system call activities
#sar –c

18.To check unused memory statistics
#sar –r

19.To check CPU utilization
#sar -u

20.Dispaly OBP version
#prtconf -v

21.Display installed packages
#showrev
#pkginfo

22.To get HBA card details
#fcinfo hba-port
#luxadm -e

23.To get running process status
#prstat
#ps -ef

24.To get hardware details
#prtdiag

Tuesday, May 25, 2010

Configuring RAID5 with hot spare using SVM

I`ve planned to create RAID 5 volume with 7 HDD and one HDD for Hot spare.

1.I`m creating RAID5 volume using metainit command.In this -r represent RAID5 volume
bash-2.03# metainit d50 -r c4t0d0s0 c4t1d0s0 c4t2d0s0 c4t8d0s0 c4t9d0s0 c4t10d0s0 c4t11d0s0
d50: RAID is setup

2.type metastat command to verify the RAID 5 status
bash-2.03# metastat d50
d50: RAID
State: Initializing
Initialization in progress: 0% done
Interlace: 32 blocks
Size: 210141064 blocks
Original device:
Size: 210143616 blocks
Device Start Block Dbase State Hot Spare
c4t0d0s0 330 No Initializing
c4t1d0s0 330 No Initializing
c4t2d0s0 330 No Initializing
c4t8d0s0 330 No Initializing
c4t9d0s0 330 No Initializing
c4t10d0s0 330 No Initializing
c4t11d0s0 330 No Initializing

3.After I created the RAID 5 volume I`m creating one Hot spare spool(hsp001) and assign one HDD to this pool(c4t12d0s0)
bash-2.03# metainit hsp001 c4t12d0s0
hsp001: Hotspare pool is setup

4.finally I`m assigning this hot spare spool to RAID5 volume d50
bash-2.03#metaparam -h hsp001 d50

5.verify whether the hot spare disk is assigned to RAID5 volume using metastat command
bash-2.03# metastat d50
d50: RAID
State: Initializing
Initialization in progress: 84% done
Hot spare pool: hsp001
Interlace: 32 blocks
Size: 210141064 blocks
Original device:
Size: 210143616 blocks
Device Start Block Dbase State Hot Spare
c4t0d0s0 330 No Initializing
c4t1d0s0 330 No Initializing
c4t2d0s0 330 No Initializing
c4t8d0s0 330 No Initializing
c4t9d0s0 330 No Initializing
c4t10d0s0 330 No Initializing
c4t11d0s0 330 No Initializing

Friday, July 10, 2009

Jumpstart server Configuration on Solaris10

I configured Jumpstart server for Solaris 10 client last week.

Create one directory and share that directory using NFS
#mkdir -m 775 /vol/install
#vi /etc/dfs/dfstab

share -F nfs -o ro,anon=0 /vol/install
#shareall


insert your SUN Solaris10 DVD to your DVD drive and goto following directory
#cd /cdrom/cdrom0/s0/Solaris_10/Tools

Run setup_install_server command to copy installation files to install base directory(/vol/install) It takes some time...
# ./setup_install_server /vol/install/
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk...
Copying Install Boot Image hierarchy...
Install Server setup complete


Jumpstart server required 3 configuration files.
1.rules [this is a first config file accessed by client to read profile file file]
2.sysidcfg [This file is having values which are required for client initial boot ]
3.Profile file [This file has filesystems,patch details]


Make config directory under install folder and you can copy sample configuration files from DVD which are reside under Misc folder.I`ve copied only check and any_machine files.Remaining files I`ve created manually.


#mkdir /vol/install/config
#cd /cdrom/cdrom0/s0/Solaris_10/Misc/jumpstart_sample/
# cp check /vol/install/config
# cp any_machine /vol/install/config

# ./setup_install_server -b /vol/install/boot

Verifying target directory...
Calculating space required for the installation boot image
Copying Solaris_10 Tools hierarchy...
Copying Install Boot Image hierarchy...
Install Server setup complete


#vi rules
hostname sunserver1 - e250_prof -
any - - any_machine -
in this above
sunserver1 --> client name
e250_prof -->profile file name.
My sunserver1 is a Sun E250 model server,so I created this name:)


#vi e250_prof
# profile keywords profile values
# -------- ------ --------- --------
install_type initial_install
cluster SUNWCXall
partitioning explicit
filesys c0t0d0s0 12000 /
filesys c0t0d0s3 3072 swap
system_type server


#vi sysidcfg
system_locale=en_US
timezone=Asia/Calcutta
timeserver=localhost
terminal=vt100
name_service=NONE
security_policy=NONE
root_password=kFEEDxSc4v2E6
network_interface=hme0 {hostname=sunserver1
netmask=255.0.0.0
ip_address=10.1.1.4
protocol_ipv6=no
default_route=10.1.1.1}

update your client MAC address and name into /etc/ethers file
#vi /etc/ethers
8:0:xx:xx:xx:xx sunserver1

update your client IP address and name into /etc/hosts file
#/etc/hosts
1.1.1.4 sunserver1

Jumpstart server uses TFTP protocol, so check whether the TFTP entry has commented out or not in inetd.conf file.
#vi /etc/inet/inetd.conf
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

#eject cdrom

# /vol/install/Solaris_10/Tools/add_install_client -e 8:0:xx:xx:xx:xx -s 1.2.3.4:/vol0/install -c 1.2.3.4:/vol0/install/config -p 1.2.3.4:/vol0/install/config sunserver1 sun4

updating /etc/bootparams
[1.2.3.4 is IP address of jumpstart server]


##########
#### Client Side ########
##########
ok>boot net - install

Thursday, May 7, 2009

Common Desktop Environment Help

To disable the login server from starting automatically
# /usr/dt/bin/dtconfig -d
done
desktop auto-start disabled.

to kill login server,X server and entire soalris CDE Desktop
# /usr/dt/bin/dtconfig -kill
done
dtlogin kill complete.

Check if login manager is running
# ps -ef grep dtlogin
root 17621 16732 0 23:47:03 pts/8 0:00 grep dtlogin

To start the login server from command line
#/usr/dt/bin/dtlogin -daemon;exit

To enable the login server from starting automatically
# /usr/dt/bin/dtconfig -e
(This will add a S99dtlogin file to /etc/rc2.d directory