Solaris Commands

  Home  Operating System  Solaris Commands


“Solaris Commands frequently Asked Questions by expert members with experience in Solaris Commands. These interview questions and answers on Solaris Commands will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. So get preparation for the Solaris Commands job interview”



55 Solaris Commands Questions And Answers

3⟩ How to stop the VCS?

Stop the cluster on the local server but leave the

application/s running, do not failover the application/s

#hastop -local

Stop cluster on local server but evacuate (failover) the

application/s to another node within the cluster

#hastop -local -evacuate

Stop the cluster on all nodes but leave the application/s

running

#hastop -all -force

 142 views

4⟩ Explain SUN CLUSTER offline cluster resources on smslu131?

verify resources are online on tgui1-svc

# scstat

Take all resources offline

# scswitch –F –g smsweb-rg

verify resources are offline on both tgui1 & tgui2

# scstat

verify resources are offline on tgui1-svc & tgui2-svc

# scstat

switch resources online on smslu131

#scswitch –Z –g smsweb-rg

verify resources are online on tgui1-svc

#scstat

verify resources are online on tgui1-svc

# scstat

switch resources from smslu131 to smslu132

# scswitch –z –g smsweb-rg –h tgui2-svc

verify resources are online on tgui2-svc

# scstat

switch resources from smslu131 to smslu132

# scswitch –z –g smsweb-rg –h tgui1-svc

verify resources are online on tgui1-svc

# scstat

 125 views

6⟩ How to add a server group?

#haconf –makerw

#hagrp –add groupname

#hagrp –modify groupname systemList –add node1 node2

#haconf –dump -makero

 136 views

7⟩ How to delete a service group?

1. Check the Service Group dependancy with other service

group

#hares -dep <Service Group>

2.to make the cluster configuration to read write mode.

haconfig -dump ro

3.Switch the online Service groups to the other system.

#hagrp -switch <Service group> -to <host2>

4.Make the Service group stable on other Host or freez them

on other node:

#hares -freeze <Service group> -sys <host2>

5.Make the service group offline on host1

#hagrp -disable <service group> -sys <host1>

 135 views

13⟩ What is the difference between init runlevel and milestone?

Upto solaris 9 runlevel are used they are

Runlevel 0 1 2 3 4 5 6

In solaris 10 milestone is introduced. Milestone is

improved level of runlevel

In run level we use init 1 to bring system into single

user, in milestone # svcadm milestone single-user command

used to bring the system to single user Simillarly

init 2 as multi-user(more than one user),init 3 as multi-

user-sever provide multiuser mode along with nfs

runlevel 4 is currently unused

runlevel 5 ie init 5 shutdown and power off

runlevel 6 ie init 6 shut down and restart

 156 views

14⟩ How system identify run level at boot time?

After initialization of kernal it self next init phase

starts. Here kernal reads init level from /etc/inittab file.

in solaris 9 but in solaris 10 svc.startd deamon starts

mailstone serviceses

 139 views

15⟩ How to view the kernel (shmmax) parameter value in Solaris 10?

To view the current values of the resource control, enter

the following commands:

#id -p //to verify the project ID

uid = 0 (Root) gid = 0 (Root) projid = 1 (user.root)

#prctl -n project.max-shm-memory -i project user.root

#prctl -n project.max=sem-ids -i project user.root

 157 views

18⟩ What you would do if you want to replace a slice using metareplace option?

We use metareplace usually when we have have faulty

submirrors and once replaced it resyncs with the failed

components.

1) Find the meta state databases on the slice

#metadb -i

2) If any meta state databases exist remove them

#metadb –d c0t0d0sX where x is slice number

3) Once the meta state databases are removed we can use

cfgadm to unconfigure the device

#cfgadm -c unconfigure diskname

Once unconfigured replace the disk and configure it as

below

4)#cfgadm –c configure diskname

5) Now copy the Volume Table Of Contents (VTOC) to the new

disk

#prtvtoc /dev/rdsk/devicename | fmthard -s -

/dev/rdsk/devicename

6) Once the VTOC is in place now use metareplace command to

replace the faulty meta devices

#metareplace -e d11 devicename ( Where d11 is the

meta device )

 140 views

19⟩ What is the significance of 51% state database replicas in SVM?

A state database is the collections of multiple,

replicated database copies and each copy is considered as a

state database replica.

If the solaris box loses a state database replica, SVM

should figure out which state database replicas still

contain valid data and boot using the valid ones and this

is achieved by using “majority consensus algorithm” and

according to this algorithm we need half+1 number of state

database replicas before it finds for a valid data.

And for the above reason we need to recreate at least three

state database replicas when we setup a disk configuration.

If all the three database replicas are corrupted meaning we

lose all data stored on svm volumes.

Hence its good to create as many replicas on separate

drives across controllers.

 145 views