Useful Command of Solaris
Useful Command of Solaris
Commands Functions
1. ls| ls l To list the files at current location
2. mkdir <name> To create a directory
3. cd <name> | cd .. For logging in to a directory
4. df | df k To view disk free
5. du To view disk usage
6. cat > <file> Catenation to create a file
7. pwd To view current location
8. rm <file>|rmdir |rm-r To remove file and directory
9. cp <file> <new name> To copy a file
10. mv <file> <path> To move a file and to rename
11. touch <file> To create a file
12. chmod < 777 > <file> To set permission|rwxrwxrwx =777|owner
chmod u+w,g-r,o+w <file> group & other| i.e : r=4 w=2 x=1 by total 7
13. clear To clear the screen
14. man <command> To view manual
15. bc Binary count
16. cal To view calculator
17. banner <content> To view banner
18. date To view date
19. find / -name <file> To find a specific file
20. grep <word> <file> To grep a word from a file
21. getent <admin file> <value> To search using specific entry in admin file
22. wc <file> To view word count
23. sort <file> To sort the content of a file
24. head -<100> <file> To list only the first <100> lines
25. tail -<100> <file> To list only the last <100> lines
26. ln <exist file> <new file> hard link both file points the i-node
number, link count increases
27. ln s for soft link If source is lost entire content is lost, L will
be at the front of filename
28. useradd m d <home dir> To create a user account|uuser id, gpri.
<user name>| -u g G group, Gsec. group, mmk dir, dpath
29. passwd <user name> To set password for an user
30. usermod |userdel <user> To modify and to delete a user account
31. groupadd g <gid> <group> To create a new group |-o to reallocated gid
Commands Functions
32. /usr/sadm/bin/smuser To create a SM-User
1
add -- -n <user name> -u <uid>
-g <gid> -d <home dir> -s
/bin/ksh
33. /usr/sadm/bin/smuser To modify a present user
modify -- -n <old user> -N
<new user> -d <home dir> -s
/bin/ksh
34. /usr/sadm/bin/smuser To delete a present user
delete -- -n <user name>
35. smgroup|same as above 3 To create, modify and to delete a smgroup
36. smc& To invoke the SMC tool in GUI mode
37. umask <value 022> This value will make effect on permission
i.e /etc/profile|attains default -- restarted
38. vi <file> To open a file through VI-Editor
39. prtconf To view system configmemory, peripheral
40. prstat a To view the system process status
41. psrinfo v To view information about the processor
42. iostat -En |-xtc 5 To view the i/o device status
43. sdtprocess To view the current system process status
44. sar <sec_1> <report_10> To view the system activity in average
45. kill <process id> To kill a process which is listed in prstat
46. format To make slices in an hard disk
47. devfsadm -v To identify the hardware changes
48. devfsadm -C To invoke cleanup | then only v fn works
49. newfs /dev/rdsk/c#t#d#s# To make a new file system on the disk
50. mount /dev/dsk/c#t#d#s# To mount the new disk for use
/<mount point>
51. dmesg To view the diagnostic messages
52. eeprom To view the environment messages
53. uname m | -a To view the m/c name, version, archi. etc.,
54. /usr/platform/uname-m/ To view the entire system status includes
sbin/prtdiag v memory, cpu, patches, os-version, etc.,
55. pkgadd d <path> <pkg To install a package | if s spool is used in
name> | -s spool btwonly copies the pkg to spool directory
56. pkgchk <pkg name> To check for error in a particular package
57. pkginfo <pkg name> To get info about package in local machine
58. pkgrm <pkg name> To remove a package from local machine
59. pkginfo |wc l To check for number of packages installed
60. fstyp v /dev/rdsk/ctd#s# To check for the current minfree value
61. tunefs m # To set minfree value i.e #% with that of root
/dev/rdsk/ctds
62. fsck o f,p /dev/rdsk/ctds# To run file system check |-o f,p for yes to all
Commands Functions
2
63. fsck o b=# /dev/rdsk/ctds To restore backup sup. Block|#-sup. block
64. quot |-af root To view summarized FS ownership
65. mountall To mount all FS which have entry at vfstab
66. mountall l To mount only the local FS listed in vfstab
67. umount <mt pt> |/dev/dsk To unmount the mounted file system 1 by 1
68. umount -f ---do--- To unmount forcibely| may affect data
69. umountall To unmount all mounted FS inclused N/W
70. umountall l To unmount all locally mounted FS
71. fuser <mount pt> | -c or cu To view any process is accessing the FS
72. fuser ck <mt pt> To kill all process which access the FS
73. volcheck To check whether the floppy is ready or not
74. /etc/init.d/volmgt start To start the volume mgt | to stop, give stop
75. mount F hsfs o r0 To mount a cdrom manually
/dev/dsk/ct#d#s# /cdrom
76. mount F pcfs To mount a floppy drive manually
/dev/diskette/pcfs
77. tar xvf <file.tar> To uncompress a tar file
78. patchadd <patch> | -d To install a patch |d is for no rollback
79. patchrm <patch> To uninstall and rollbacks the patch
80. init 0 To OK prompt
81. init 1 To single user mode
82. init 2 To multi user without network
83. init 3 To console super user|multiuser with nfs
84. init 5 To shutdown the server
85. init 6 To restart the server
86. init s To single user mode
87. shutdown y g <#> -i <run To shutdown the system |-y for interactive
level number> <Message> mode| # - grace time in seconds
88. halt To switch over to OK prompt suddenly
89. poweroff | Reboot Alternate command to switch-off & restart
90. who r To view the current run level
91. who | -a To view all logged-in users in the local sys
92. who m To view the current user name alone
93. whoami | who I am To view effective user | To view actual user
94. rusers l To identify all users logged in through n/w
95. finger |-m <username> To view the activity of the users
96. last | <username> To view full details for all users |record
97. last -n 5 reboot To view only the last five reboot activity
98. chown root : sys To activate loginlog entry i.e. to note the
/var/adm/loginlog failure login |you must create the directory
99. su <username>|su -<usern> To switch into another user |home dir acti
Basic Commands Functions
100. chown <user> filename To change the ownership of a file|-R for dir
3
101. chmod 1777 <dir name> Sticky bit permission|user can access dir
102. chmod 4555 <exe file name> Users exe this file will get root privilege
103. chmod 2555 <exe file name> Group exe this file will get root privilege
104. lpadmin d <prt name> To config a printer manually |-x to remove
105. lpstat d To view the systems default printer
106. lp <file name> To give an print request
107. reject <prt name> To stop the queuing printer request
108. disable <prt name> To stop the printer
109. enable <prt name> To activate the printer
110. accept <prt name> To start the queuing printer request
111. /usr/lib/lpsched | lpshut To start the LP printer service | To stop
(or) /etc/init.d/lp start | stop the LP printer service
112. lp d <prtname> <filename> To divert your printing job to a new printer
113. lpstat a <prt name> To view the status of the printer
114. lpmove <fault prt> <nw prt> To divert one prt job to another printer
115. at <hh:mm> |at> job |ctrl d To assign job at AT schedule| ctrl d to close
116. crontab e |-r to remove job To assign a job in crontab it opens a editor
117. at -l & crontab l To view the AT and crontab content
118. ufsdump 0uf /dev/rmt/0n To perform backup | 0-full backup, u-
/dev/dsk/c#t#d#s# update{/etc/dump dates}, 0-drive or disk
number i.e for incremental, n-no rewind
119. ufsrestore rvf /dev/rmt/0 To restore the backup
120. ufsrestore i /dev/rmt/0 To view the list of files present in the tape
121. mt status |rewind |offline To view the status| To rewind | To eject
122. mt fsf count To move the tape forward count records
123. fssnap F ufs o To perform a snapshot backup which
bs=/var/tmp /export/home usually stores at /dev/fssnap/0
124. fssnap -i To display a list of snapshot ct avail in sys.
125. prtvtoc /dev/rdsk/ct0ds2 To store the structure of the given hard disk
> /<file> to an file through prtvtoc
126. fmthard s /<file> To copy the structure from /<file> and to
/dev/rdsk/ct1ds2 make available on the destiny hard disk
4
4. Esc j To move the cursor down - command mode
5. Esc k To move the cursor up - command mode
6. Esc i To Enter into Insertion mode
7. Esc x | 4x To delete a character | deletes 4 character
8. Esc X | 4X To delete left i.e. Back-Space
9. Esc R To over-write a character
10. Esc o To insert a line below the cursor
11. Esc O To insert a line above the cursor
12. Esc u Undo
13. Esc G To move to the last line first character
14. Esc w To move word by word right
15. Esc b To move word by word left
16. Esc H To move to the first line of the current page
17. Esc M To move to the middle of the current page
18. Esc L To move to the last line of current page
19. Esc I To move to the beginning of the line & append
20. Esc A To move to the end of the line & append
21. Esc dw To delete a word to the right
22. Esc dd To delete the current line completely
23. Esc yy To copy the current line yanking
24. Esc p To paste the copied content
25. Esc yw To copy a word cursor must be at the starting
26. Esc J To join two separate line
27. Esc ~ To change the case i.e. upper to lower & V-via
28. Esc : wq To save & quit a file EX-command mode
29. Esc : wq! To save & quit a file forcibly
30. Esc : !sh To go to shell temp. & type Exit to come back
31. Esc : r! <command> To add the output into the file
32. Esc : r <file name> To add the content of <file> into the current file
33. Esc : q To quit the file without saving
34. Esc : q! To quit the file without saving forcibly
35. Esc : w To save the file and continue working
36. Esc ZZ To save & quit the file
37. Esc : set nu To assign the number for the lines
38. Esc : set nonu To remove the assigned number for the lines
39. ctrl f Page down
40. ctrl b Page Up
5
5. boot cdrom -s To boot and get into single user mode using cdrom
6. boot -r To reconfigure |config result will be at /reconfigure
7. boot To boot through the default configuration
8. boot disk To boot via specified disk|devalias - entry must exist
9. boot -s To get into the single user mode
10. boot a For interactive booting
11. boot -v Detailed device information to the console
12. help To get command details at OK prompt
13. printenv To print the environment detail
14. setenv <prm> <val> To set environment for a specific parameter
15. reset-all To save the changes and followed by reboot
16. set-defaults To set the values to the manufacturers setting
17. set-defaults <param> To set the value for a specific parameter alone
18. probe-scsi | -ide To check for internal scsi/ide status
19. probe-scsi-all |-ide-all To check for internal & external scsi/ide status
20. probe-fcall-all To check for fiber optics status
21. devalias To view the alias name & to which its mapped
22. nvalias <alias> <add> To add the alias and its physical address to the list
23. nvunalias <alias> To remove an alias from the current list
24. show-disks To see the physical add of all drives i.e. sec storage
25. .version To view the version, Ethernet address details etc.,
26. .speed To view cpu speed, bus speed, etc.,
27. .enet-addr To view only the Ethernet address
28. showdevs To view all the devices i.e. secondary storage only
29. banner To view the ip, mac add, subnet mask etc
30. watch-net To view the status of NIC card
31. watch-net-all To view the status of NIC and network cable
6
13. ProcFS | under Pseudo FS Process FS for currently running proc.
14. MntFS | under Pseudo FS Mount FS for locally mounted FS
Hints Purpose
Host Bus Adopter All harddisk will have a common HBA
Max 7 Slices Only 7 slices are possible in a hard disk
Slice S2 Back Up Points entire disk cant be changed or used
SUNWCxall Entire Distribution with OEM support 64 bit
SUNWCall Entire Distri 64 bit no 3rd party support
SUNWCprog Developer Sys Supp only manuals &network
7
SUNWCuser End User Sys Supp limited network support
SUNWCreg Core Sys Support no network
Web Installation 1st Installation CD then 1 of 2 CD & 2 of 2 CD
JumpStart Installation Installing the OS through network
Vi Editor 3 Modes Command, Insert and Ex-Command Mode
OE file system Disk based(ufs), Distributed(nfs) & Pseudo(swap)
File Types 4 types Regular, directories, symbolic link & device files
Device naming Logical, physical(actual) & instance(kernal) name
Sd n | dad n For scsi | ide n-number instance name
NV Ram EEPROM Removable chip, inbuilt Lithium battery, host id
# before any line in a file This makes that particular line or process inactive
what happens during the Post, generic devi ce drivers, loads config done
Booting of Sun System by admin, other default parameter, then OS files
Backup Superblock It resides at several areas of disk| for restoration
Cylinder group size Default size is 16 cylinders per group
Boot block active for / Boot strap program resides here 15 disk sector
Pointer types Direct Pointer and Indirect Pointer
Minfree Value Its the space utilized by the operating sys in root
Preen During sys boot fsck runs at Non Intractive mode
Vol Mgr -/etc/vold.conf Automatically mounts the cdrom and floopy
105050-01 patch name 105050 is base code & 01 is the revision number
sys wide & user environ While user logs this files get executed by shell
restoresymtable This is a image file of tape formed in hard disk
/etc/hosts It is an link to /etc/inet/hosts
/opt Common location for utilities and 3rd party tools
RSC Remote System Console |consist of serial, n/w
mgt port and modem
LOM Light Out Management | consists of only serial
port and not a part of OS.
ALOM Advanced LOM | Consists of serial port and a
part of OS and also an n/w mgt port.
SCC System Controller Card | nvram data are stored
here its an removable card respble for booting
KVM switch Keyboard Video Mouse switch |common unit
Part Number Identity Number 300-4250 |product-exact no/.
8
C /etc/.login $home/.profile $home/.cshrc /bin/csh
$home/.cshrc
SUN SOLARIS
SA-II
Commands Functions
1. sys-unconfig sys restarts To get into the network config. section
2. ifconfig a To view ip, mac add, subnet mask,etc status
3. ifconfig hme0 <ip#> netmask To assign IP address, netmask and as well
<netmask#> up as to make the network up
4. ifconfig hme0 up | down To enable network interface | disable
9
5. snoop <source ip> <dest. ip> To capture and inspect the network pkgs
6. rpcinfo p | <hostname> To list the registered RPC services
7. rpcinfo d <prog no> version To delete a RPC service registration
| pkill-HUP inetd | To reactivate your service again
8. etc/init.d/init.wbem status To view the status of the SMC service |To
| start | stop start service | To stop service
9. smc To open SMC
10. smc edit To open SMC toolbox editor
11. pagesize | default is 8192 b To view the size of memory page
/var/sadm/smc/toolboxes/smc/ Default location for SMC toolbar
smc.tbx &
/var/sadm/smc/toolboxes/ smc edit command will make effect on this
this_computer/this_computer.tbx two files
Introduction To IP - Version IV
/etc/rcS.d/S30network.sh solaris 8|/etc/rcS.d/S30rootusr.sh sol 7 & below
During booting of sys these files get exe. This uses ifconfig utility & searches
etc/hostname.xxn to identify instance |xx hme/nic
/etc/inet/hosts this can be used instead of DNS, NIS, NIS+. It contains ip,
hostname, nickname, comments.
10
SWAP Expansion
#swap s to display the virtual swap area
#swap l to display the physical swap area
Adding swap space by slice:
create a slice of required size in hard-disk
add the entry for that slice in /etc/vfstab for an permanent effect
swap a /dev/dsk/c#t#d#S# | to activate the swap space
Adding swap space by file:
#mkfile <size#> <mount point>
#swap a /<path of above file> | to activate the swap file
#also add an entry in the /etc/vfstab for an permanent effect
e.g: export/swapfile -- -- swap -- no --
Removing a swap space:
#swap d <path of swap area> this is to de-activate the swap area
remove the entry from the /etc/vfstab
delete the slice or file to free the utilized space
Crash Dump :
#dumpadm its to activate the crash dump device for the fore-coming fault
Procedure to read the crash message:
cd /var/crash/uname-n/ log-into this location
mdb unix.# vmcore.# | mdb or adb
when you execute above command the prompt will change as below
> |when prompt is as shown when there is no prompt type $p>
> ::status then you will get the prompt as >
> $c
> $q |to quit the prompt
Command Operation
1. /etc/init.d/nfs.server start |stop To start & stop
the NFS service
manually
2. share F nfs o <ro/rw> <path> To share a file
for NFS service
11
3. mount F nfs <hostname>: <path> <mount point> To mount the
shared file
4. unshare F nfs <path> To unshared a
file from NFS
service
5. shareall -F nfs To share all
resources listed
in
/etc/dfs/dfstab
6. unshareall F nfs To un-share all
resources listed
as above
7. dfshares F nfs <host> To display the
currently
shared NFS
8. dfmounts -F nfs <host> To display the
NFS mounted
resources
9. mountall -r -F nfs To mount all
remote file
resources
10. umountall -r -F nfs To un-mount all
remote file
resources
12
Daemons involved: /etc/rc2.d/S74 syslog
# /etc/init.d/syslog start | stop this is to start and stop the daemon.
Auto FS
It provides an automatic mounting using NFS protocol
Its an client side service
Components of auto-mount facility:
Auto FS file system, Auto-mountd daemon, Auto-mount command
Auto FS file system mount-point is defined in the auto-mount maps on the
client system.
Configuring Master Map:
For all types of auto sharing methods the entry must be here. Hence this
remains the base entry for all sharing methods.
Edit /etc/auto_master
----------------------entries-------------------
+auto_master # + indicates that consider automountd daemon
/home auto_home -browse, (or) -nobrowse
<mount point> <map name> <mount options>
#- browse allow the users to view the mount-point
--------------------------------------------------
#automount reactivate the above file again
Then the shared resources get mounted below the /home/<auto_home file
mount point>
Direct map entries:
This map is only for general directorys, and common sharing files (eg:
softwares). In case 1 server is down then it can be get from other.
Edit /etc/auto_direct
----------------------entries-------------------
/usr/share/man -ro, soft ser1, ser2, ser3:/usr/share/man
<local mnt pt> <permission> <hostname>:<path>
#/- auto_direct -ro this entry in auto_master
--------------------------------------------------
#automount reactivate the above file again
Indirect Map Entries:
This mapping is for user home directories and for their files.
Edit /etc/auto_home
----------------------entries-------------------
magi server_primary:/export/home/babu
<local mnt pt> <hostname>:<home dir path>
#/home auto_home -nobrowse this entry in auto_master
--------------------------------------------------
procedure:
Create the account for the user in both the servers with same UID & GID
Put the entry for auto_home as shown above for a desired user e.g. babu
13
# passwd h babu | in secondary server
(/export/home/babu)? /home/magi | change the home dir as desired
# cd /home/magi |in sec server to enter into the pri servers home dir.
After all this files are edited just type #automount -t <time#> -v this is to
activate the desired mountpoint. If time is mentioned in t then upto that time
the FS remains mounted when its not in use.
Name Server :
Name service switching files location
Local files /etc/nsswitch.files
DNS /etc/nsswitch.dns
NIS /etc/nsswitch.nis
NIS+ /etc/nsswitch.nisplus
LDAP /etc/nsswitch.ldap
14
NIS
The NIS maps are located at /var/yp/domainname/<host>.byname.pag |& .dir
Similarly /var/yp/domainname/<host>.byaddr.pag |& .dir
Daemons used: ypserv, ypbind, rpc.yppasswdd, ypxfrd, rpc.updated
All five are utilized by server and only first two by clients
Through NIS service a centralized user-account can be provided.
Configuring a machine as the NIS master server :
#cp /etc/nsswitch.nis / etc/nsswitch.conf
#domainname accel.com
#touch /etc/defaultdomain
#domainname > /etc/defaultdomain
#cd /etc
#touch ethers bootparams locale timezone netgroup netmasks
#ypinit -m To initialize the master server
#/usr/lib/netsvc/yp/ypstart To start the NIS daemons
Configuring a machine as the NIS client :
The steps were same as above but instead of ypinit m give ypinit c to start
client service and also put the server IP entry in the /etc/hosts.
Root Mirroring
create a slice of 50mb for state database ||let it be slice 7 i.e. s7
15
#prtvtoc /dev/rdsk/c0t0d0s2 | fmthard s - /dev/rdsk/c#t#d0s2
#metadb -afc3 c0t0d0s7 c0t#d0s7 c#t#d0s7 || To create 3 replicas in
each state db | 3 hard-disk because (n/2)+1 replicas
#metadb -i ||To check for status
#metainit -f d10 1 1 c0t0d0s0 ||To create primary sub-mirror
#metastat
#metainit -f d20 1 1 c0t#d0s0 ||To create secondary sub-mirror
#metainit d50 -m d10 || mapping to main mirror
#metaroot d50 ||To put an auto entry in vfs tab
reboot the system now # init 6
#metattach d50 d20 ||resynchronization starts now
Replacing the defective disk in case of failure :
# metareplace <defective disk c#t#d#s#> <newly attached disk c#t#d#s#>
Breaking the Mirror :
#metadetach d50 d20 ||breaking secondary sub-mirror
#metaroot /dev/dsk/c0t0d0s0 ||role-back the vfs entry
#init 6
#metaclear -r d50 ||removing main mirror
#metaclear d20 ||removing secondary mirror
#metadb -d -f c0t0d0s7 c0t#d0s7 c#t#d0s7 ||removing the replicas
16
c2 & c3 be the hot-spare which acts during the failure of s1. Let it be the scenario.
create a slice of 50mb for state database ||let it be slice 7 i.e. s7
#metadb -afc2 c1t0d0s7 c2t0d0s7 c3t0d0s7 || To create 2 replicas
#metahs -a -hsp009 c2t0d0s3 c3t0d0s3 ||To create the hot spare
#metainit d101 -r c1t0d0s1 c2t0d0s1 c3t0d0s1
#metaparam -h hsp009 d101
#newfs /dev/md/dsk/d101 ||Making new file system
#mkdir /raid5dir ||Create a directory for mounting
#mount /dev/md/rdsk/d101 /raid5dir ||mount the partition
In case if any disk fails & hot-spare comes into picture then replace the disk, then
#metareplace -e d <the disk that has replaced c#t#d#s#>
#metahs -e <hot spare disk that has to be reactivated c#t#d#s#>
17
#touch /etc/defaultdomain
#domainname > /etc/defaultdomain
#cd /etc
#touch ethers bootparams locale timezone netgroup netmasks
#ypinit -m To initialize the master server
#/usr/lib/netsvc/yp/ypstart To start the NIS daemons
8. #mkdir /jump ||create a directory to copy jump start files size 2gb
18
10. Insert Solaris CD - 2/2
#cd /cdrom/cdrom0/Solaris_8/Tools
#./setup_install_server /jump
11. Copy the sample jumpstart scripts from Solaris CD 1/2 to /jump
#cd /cdrom/cdrom0/s0/Solaris_8/Misc/jumpstart_sample
#cp -r * /jump
19
-------------------------entry-----------------------------
any - - .profile
-----------------------------------------------------------
15. Validate the rules.ok file
# ./check
Remote Access :
Put a + or user name in the .rhost file at home directory or else in /etc
location so that users from other system can login to the local system remotely.
Command Function
rcp <host name>:<path> <destiny> Remote copy
rlogin Remote login lllar to telnet
rsh <host name> mt staus To utilize the other system h/w |tape
Hints Purpose
Well-known ports Ranges upto 1024 located at /etc/inet/services
Dynamic ports From 1025 to 65535 at /etc/inet/services
20
Daemons Used : vxconfigd , vxiod i/o operation, vxrelocd hot relocation
Disk Group : Collection of physical disk which were under veritas
Volume (V) : Collection of disk is said to be as a volume.
Plux (Pl) : Volumes were subdivided into pluxes. Maximum 32 plux in a
volume & at least 1 plux per volume.
Subdisk (Sd) : Each and ever Plux is subdivided into a subdisk. All subdisk
within a volume must fall under a same Disk Group.
Commands Functions
Vxprint To view the status of VxVM
Vxdiskadm To view the Vx menu |press q - quit
vxassist make <con1> <size> To create concatenation | con1 is the
newfs /dev/vx/rdsk/<con1> name of concate | mount & use it
vxvol stop <con1> To remove the concatenation |-rf rm
vxedit -rf rm <con1> remove forcibely, remove volume.
vxassist make <str1> <size> To create stripe of desired size | run
layout=stripe newfs and mount the device
vxvol stop <str1> To remove the stripe |-rf rm remove
vxedit -rf rm <str1> forcibely, remove volume.
vxassist mirror rootvol To create root mirror|dont run newfs
vxassist mirror swapvol |run encapsulation here - vxdiskadm
vxplex -o rm dis <rootvol-02> To break the root mirror | dont give
vxplex -o rm dis <swapvol-02> <rootvol-01> at any-cost it will crash
/etc/vx/bin/vxunroot the system
vxassist make <mirror> <size> To create a data mirror | run newfs
layout=mirror and mount the device
vxvol stop <mirror> To break the data mirror
vxplex -o rm dis <mirror>
vxassist make <raid5> <size> To create disk space for Raid 5
layout=raid5
vxvol stop <raid5> To break the Raid 5
vxplex -o rm dis <raid5>
vxdctl stop To stop the VxVm daemon
vxiod -f set0 To terminate the i/o operation
init 6 Restart & uninstall veritas using cd
SUN CLUSTER :
Required Components:
Terminal Concentrator, Cluster host, Storage array, Public network,
Administrative workstation sun cluster console software SUNWccon
It wont support multiple connections from a same server to a single storage box.
21
Clustered Pair Topology : If two are more pairs of nodes operating under a single cluster
administrative framework. In this the Nodes are configured in pairs-two, four, six or eight
nodes
N+1 Topology : This is providing one system to act as the back-up for the other system
in the group.
Pair + N topology : It is adding or including a pair of cluster in an existing cluster pair
only for the purpose of storage sharing. In this there is no direct connection between
them.
NOTE:
Once cluster is installed the init command wont work to shutdown the system use
# scshutdown -y g <grace period in minuter ##>
Configuration steps of sun cluster 3.0
Steps involved :
Install Disk Suit
Change SCSI Initiator ID
Initial Installation - Sun Cluster Software Installation
Configuring Quorum device
Disk Set using Disk Suit
Data Service Configuration
Changing SCSI Initiator ID : { do this steps only in any one server node }
Ok: probe-scsi-all | To view the physical disk path of the hard disk | note this for disk set
Ok: nvedit
0: probe-all install-console banner
1: cd < physical path or external hard disk_@1f,2000/scsi@1>
2: 6 scsi-initiator-id integer-property
3: device-end
4: cd < physical path or external hard disk_@1f,2000/scsi@1>
5: 6 scsi-initiator-id integer-property
6: device-end
7: banner < to save press ctrl c >
Ok: nvstore
Ok: setenv use-nvramrc? true
Ok: setenv auto-boot? true
Ok: reset-all
Ok: cd < physical path or external hard disk_@1f,2000/scsi@1>
Ok: .properties | This is to view the changed SCSI initiator ID
Creating Slices : { do this step in all the servers/nodes }
For an sun cluster 4 slices are important they are root, swap, /globaldevices, 50mb
for replica.
22
----------------------------------------------------
Configure the Quorum Device : { do in any one servers/node } | for voting purpose
# scdidadm -L | to see the DID instance name on the storage box
# scsetup # scconf -a -q globaldev=d9
continue (y/n) :y # scconf -c -q reset
Quorum device : <DID instance name> Or # scstat -q | to see status
Add another quorum device (y/n) :n
Reset installmode (y/n) :y
23
# mount -g /dev/md/<disk set name>/dsk/<d99> /global/nfs
Data Service Configuration : Services like apache, oracle, dns, iws etc., Insert sun
cluster 2nd CD & give ./scinstall and then choose 4 for adding support for data service.
In case of nfs select it and quit and then add required patched for the service eg. 111555-
07 and then restart the system by scshutdown -y -g0
24
Enabling & Bringing Resources Online :
# scswitch -Z -g nfs-server-rg
# scrgadm -a -L -g < resource group name_nfs-server-rg > -l <logical name_nfs-server>
-n <nafo0@e450, nafo1@e250> | To associate pubic n/w mgt with resource group
FLASH Installation :
Flash installation is getting and saving the network configuration & setting
of your system to an existing extra disk. In case of any failure in your system you
put the extra disk in some other machine and restore the configuration by
locating it while reinstallation of OS on your system.
#flarcreate -n <archive_name> -a <author name> -R / -x </var/tmp>
</flashdisk/file.archive path in the destiny disk> To create a flash archive.
I do agree with my supervisor.... i will put all my effort, in the areas i need to be improve.
25