Professional Documents
Culture Documents
Linux Interview Questions With Answers: Explainthe Boot Process?
Linux Interview Questions With Answers: Explainthe Boot Process?
1.POST
2.OBPROM
3.KERNEL INITIALIZATION
4.INIT PHASES
POST:Power on self test, It will detect hardware, machine host ID,serialNo, architecture type,
memory and Ethernet address and it will loadthe primary program called bootblk.
3.Creating device trees and load the boot block from(0-15 sector), it is called as
KERNEL
INITIALIZATION:ufsboot load the kernel (generic unix), kernel will load all thenecessary
devices modules to mount the root partition tocontinue the booting process.
InitPhase : It will started by executing of /etc/init program and startother process reading the
Init0:Shutting down the system and bring back the system to OBP prompt (OK)
Init4:Not in use
Rcscript : check and mount the file system, start and stop the variousprocess.
#/etc/inittab
Explain/etc/inittab files
Once:Run once
Wait:Wait for the process to be completed before processing the next linein /etc/inittab
Explain/etc/system file
#crontab-e
# Vi/etc/system
Explaininode
Itcontain the information of the files and directory
Howmany file to modify the host name to be changed without rebooting thesystem.
Thereare 6 files.
#vi/etc/hosts
#vi/etc/nodename
#vi/etc/hostname.hme
#vi/etc/net/ticlts/hosts
#vi/etc/net/ticosts/hosts
#vi/etc/net/ticotsord/hosts
#/etc/hosts
#/etc/inet/ipnodes
Wherethe ip address will be stored
#/etc/hosts
#/etc/hostname.hme
#/etc/path_to_inst
Thiswill be quite complicative, because kernel is the core of theoperating system, its an image of
the OS. whereas /etc/path_to_instare the drivers are stored for the enabled hardware.
Ok.version --> This will tell the open boot prompt versionotherwords, FIRMWARE
#prtconf –V
#uname –x
#hostname
Howwill compare 2 host patches
Throughftp copy the copied files nad use dd command to compare both the hostpatches.
OKprobe-scsi-all: it will show all the scsi devices connected internaland external
#prtconf
#sysdef
#/use/platform/sun4u/sbin/prtdiag
#sysdef
#coreadm
#./etc/init.d/cronstop
#resetsc -y
>cd /114527-04
>lom -G ./sgrtos.flash
>lom -G ./sgsc.flash
Escapeto lom> and reset the SC:
lom>resetsc -y
>lom -G ./lw8cpu.flash
>lom -G ./lw8pci.flash
#shutdown–i0 –g0 –y
>poweroff
>poweron
#/etc/syslog.conf
#patchadd –P
#patchadd –P
#pkginfo| more
.profiles
#/var/sadm/patch
9 inshadow:useraccount:passwd:lastchange:min:max:warring:inactivity:expiration:flag
4 ingroup: username:passwd:gid:user
/etc/shadow:400
directory:755
Whatis UMASK
Defaultvalue is 022
TZ=
Hardlink: link betweensame file systems and inode number will be same
Stickybit: It is aspecial permission that protect the files within a public writabledirectory
Stickybit permission set the shared directory, user cancreate a files or directory
But only by owner of the directory can modify or delete.
#passwd–x –1 (username)
passwd -S user_login_name
#/usr/dt/bin/dtconfig –d ( disable)
Wehave edit the /etc/passwd file and modify a user forget to give theshell will user able to
loging?
7fileds
Aftercreating swap file update the same to /etc/vfstab what will be thefstype.
temfs
#/use/platform/sun4u/sbin/prtdiag
Okboot cdrom-s
# cdmnt
#setTERM=vt100
#umount /mnt
#reboot ( While system come up it will ask the new root passwd.)
Explaininode
Itcontain the information of the files and directory
Okboot cdrom-s
# cda
#installboot /usr/platform/’uname-i/lib/fs/ufs/bootblk/dev/rdsk/c00t0d0s0
#umount mnt
#boot –r
#newaliases
#in.lpd daemon
Whatis the protocol supported by NFS
UDPand TCP
ExplainFSCK
Utilityfor checking and repairing the files system inconsistence due toabnormal shutdown.
Ithas 5 phases
#swap–a /filename
Hardmount:Normalfile system mount used mainly for mounting local file systems.
its umount.
Softmount:It allows automatic unmounting if the filesystem is idle for aspecified timeout
For64 bit
#eeprom boot-file=”/kernel/sparc9/unix
or
OKprintenv boot-file
For32 bit
#eeprom boot-file=”/kernel/unix
or
OKprintenv boot-file
or
#eeprom
#umount/prasad
#who –r
Editthe /etc/hosts.allow (it will have list of host to access) -> Thiswill show the user list on that
host.-
/etc/hosts.deny(it will have list of host to access deny)-> This will show theuser list on that host.-
/etc/servicesfile
-20high priorities
+20low priorities
/etc/default/login
sshd.config
1. Limited su access
Whatis nslookup
Tofind the hostname and ip address
# vi/etc/hosts.hme0 ( update the ip address ) --> to bring theinterface along with the ipaddress
during boot time.
Rpc
1 =100mbps, 0 = 10mbps
Tomodify
100=fullduplex
10=halfduplex
0=
1=autoneg
100
1mountd statd
2.nfsd lockd
3.nfslogd
4.statd
5.lockd
1. mountd Handles file system mount requests from remote systems, and provides access
control (server)
2. nfsd Handles client file system requests (both client and server)
3. statd Works with the lockd daemon to provide crash recovery functions for the lock
manager (server)
4. lockd Supports record locking operations on NFS files
5. nfslogd Provides filesystem logging. Runs only if one or more filesystems is mounted
with log attribute.
biod: On the client end, handles asynchronous I/O for blocks of NFS files.
#/etc/init.d/nfs.server stop
#iostat –xctd 4 5
If adisk shows consistently high reads/writes along with , the percentagebusy (%b)of the disks is
greater than 5 percent, and the average service time (svc_t)is greater than 30 milliseconds, then
one of the followingaction needs to be taken
rpc.yppasswdd
Ypxfrd
rpc.ypupdated
Ypserv
Ypbind
#vietc/ssh/sshd_config
PermitRootLoginno or Yes
#dumpadm.conf
DUMPADM_DEVICE=/dev/dsk/c0t10d0s3
DUMPADM_SAVDIR=/var/crash/isd250
DUMPADM_CONTENT=kernel
DUMPADM_ENABLE=yes
$ pwd
/etc
$ ls -l sav*
$ pwd
SDS
RAID 0Concatenation/Striping
RAID 1Mirroring
Striping:Spreading ofdata over multiple disk drives mainly to enhance the performance
bydistributing data in alternating chunks - 16 k interleave across thestripes. Sequential data
operations are performed in parallel on allthe stripes by reading/writing 16k data blocks
alternativelyform the disk stripes.
Mirroring:Mirroring provides data redundancy by simultaneously writing data onto two sub
mirrors of a mirrored device. A submirror can be a stripeor concatenated volume and a mirror
can have three mirrors. Mainconcern here is that a mirror needs as much as the volume to
bemirrored.
RAID5: RAID 5provides data redundancy and advantage of striping and uses lessspace than
mirroring. A RAID 5 is made up of at least three disks,which are striped with parity information
written alternately on allthe disks. In case of a single disk failure the data can be rebuildusing the
parity information from the remaining disks.
#/etc/lvm/md.tab
or
#/etc/opt/SUNWmg/md.tab
Identifiedthe free disks and the volumes size and meta device name
#df–h
#metattachd102 10G
#cfgadm
#newfs /dev/md/rdsk/d111
#mkdir ora13data
#df-k
#luxadmprobe
FoundEnclosure(s):
LogicalPath:/dev/es/ses0
LogicalPath:/dev/es/ses1
LogicalPath:/dev/rdsk/c8t60020F200000D28D3E7768C80008F620d0s2
LogicalPath:/dev/rdsk/c8t60020F200000D28D3E77593A00008EA9d0s2
SMS800Failed Disk Notes
http://sunsolve8.sun.com/search/document.do?assetkey=1-9-76438-1
#metadetach –f d0 d30
#metadetach–f d1 d31
Deletedisk metadevices:
#metacleard30
#metacleard31
#metastat –p | grepc1t0d0
#metadb –i
#metadb –d c1t0d0s7
#ls –ld/dev/dsk/c1t0d*
#devfsadm
or
#/usr/sbin/luxadm insert_device
luxadminsert_device /dev/rdsk/c1t49d0s2
or
#/usr/sbin/luxadm insert_device (if enclosure name is not known)
Note:In many cases, luxadm insert_device does not require the enclosure
#luxadm display
#luxadm probe
been created.
At the end of metastatcommand output are the hardware device numbers. After replacementthe
metadevadm command should be run to update the new device number.
#metadevadm –u c1t0d0
#fmthard –s/var/adm/mmddyyc1t0d0.vtoc/dev/rdsk/c1t0d0s2
#metattachd0 d30
#metattachd1 d31
#metadb –a –c 3c1t0d0s7
The lower case letteredflags may not appear until the server is rebooted. For sms800 thereneed to
be six total metadbs. Three on each of the root mirroreddisk.
# metadb
************************************************************************
Observation
Following file systemsare not able to open, while using dk –k its shows i/o error.
Step1
meter/d18: Trans
State:Hard Error
MasterDevice: meter/d17
LoggingDevice: meter/d5
meter/d17: Mirror
Submirror 0: meter/d15
State: Okay
Pass: 1
State: Okay
Stripe 0:
c2t5d1s0 0 No Okay
State:Hard Error
meter/d5: Mirror
Submirror 0: meter/d3
State: Okay
Submirror 1: meter/d1
State: Okay
Pass: 1
State: Okay
Stripe 0:
c1t3d4s6 0 No Okay
State: Okay
Stripe 0:
c1t4d0s6 0 No Okay
Step2:- Analyzedboth the disk and no error found disks are okay.
21. c1t3d4
22. c1t4d0
analyze> test
2732/18/14
2732/18/14
meter/d2 -m meter/d0 1
meter/d9 -m meter/d7 1
meter/d11 1 1 c1t5d1s0
meter/d3 1 1 c1t3d4s6
meter/d1 1 1 c1t4d0s6
meter/d4 1 1 c1t5d3s0
meter/d1 1 1 c1t4d0s6
#umount /appl/TEST
#umount /ora1data/METR
#umount /ora1index/METR
#umount /oraredo/METR
#umount /redoarch/METR
meter/d5:Mirror is setup
#mount/dev/md/meter/dsk/d6
#mount/dev/md/meter/dsk/d10
#mount/dev/md/meter/dsk/d14
installthe disk
youcan do this few ways, let's the scenario be, the disk is alreadyattached and its been label
through format.
primarydisk is u r c1t0d0s2
#fsck-y /dev/rdsk/c1t1d0s0
#mount/dev/dsk/c1t1d0s0 /mnt
#vi/mnt/etc/vfstab
Backups
# mt/dev/rmt/0 status
devicefiles.
3. It can work on mounted or unmounted file systems.
Tar:
1.Used for single or multiple files backup.
2. Can't backup specialcharacter & block device files.
3. Works only on mounted filesystem.
#cd/export/home
Incremental:Only those files will be included which have been changed since thelast backup.
Differential:Only those files will be included which have been changed since thelast Full backup
0 =Full Backup
1-9= Incremental backup of file,That have changed since the last lowerlevel backup.
Optionsin ufsdump
L =auto loaded
U =update the /etc/dumdate files (Indicate:Name of the file system,Levelof the backup 0-9,Date.
Optionsin ufsrestore
I= interactive mode
V= verbose mode
# Vi/etc/system (To comment the error line in /etc/system files, wehave to use *)
Howwill you come to know wheather hme 0r eri or to configuring thenetwork card.
#newfs /dev/rdsk/c0t0d0s0
#mkdir a
#mount /dev/dsk/c0t0d0s0 /a
# cda
#ufsrestore rf /dev/rmt/0
# rmrestoresymtable
# cd/usr/platform/’uname-m/lib/fs/ufs
# cd/
#umount /a
#fsck /dev/rdsm/c0t0d0s0
#init 6
fromthe OK prompt, execute
OK>boot -r
# pr
#crontab-e
Systemcan not find the /etc/path_to_install file .It might be missing orcorrupted and needs to be
rebuild.
ok>boot-ar
Pressenter to select default values for the questions asked duringbooting and select yes to rebuild
/etc/path_to_install
The/etc/path_to_inst on your system does not exist or is empty. Do youwant to rebuild this file
[n]? y
deviceto mount
deviceto fsck
mountpoint
FS type
fsckpass
mountat boot
mountoptions
# sudo –l
Veritas
pkginfo-l VRTSvxvm
Vxconfigd
Vxiod
Vxrelocd
#devfsadm
#format (tolabel the disk)
#vxdctl–enable
#vxdiskadm
Rebootthe server or
Afterreboot
#vxprintlist
#vxrootmirrootnew
#vxdiskunsetup mirror_disk_name
#devfsadm–Cv
#vxdctlint
#vxdctlenable
#vxdisksetup–i c0t1d0
Diskto recover
Detachsecond mirror
#/etc/vx/bin/vxunroot
Rebootsystem #init6
#vxunroot
Rebootthe system (it will remove the entries of VXVM from /etc/systems &Filesystem from
/etc/vfstab)
#vxiodset 10
#vxconfigd–m disable
#vxdctenable
Veritaswill start
#prtvtoc -s /dev/rdsk/c2t2d0s2
#cd /
#umount /mnt
#vxplex dis rootvol-02 (Disassociatethe plex from the volume and remove the volume.)
#vxedit rm rootalt
#vxsd dis newroot-01 (Disassociatethe sub-disk from the plex and remove the plex.)
#vxedit rm rootvol-02
Mirrorall the other volumes from the current root disk to the new rootdisk.Do not mirror swap
volumes. Swap slices will be created on thenew disk manually. In this example, the volumes to
mirror are var andopt.
Howyou will identify that how may DG creation a particular VXVM versionsupport
Supportinformation:
vxconfigd_vrsn: 21
dg_minimum: 10
dg_maximum: 120
kernel: 15
protocol_minimum:40
protocol_maximum:60
protocol_current:0
Device: VPATH_SANVC0_62
devicetag:VPATH_SANVC0_62
type: auto
hostid: kirkcmis3
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
pubpaths:
block=/dev/vx/dmp/VPATH_SANVC0_62s2char=/dev/vx/rdmp/VPATH_SANVC0_62s2
version: 3.1
ssb: actual_seqno=0.0
headers: 0 240
Definedregions:
Multipathinginformation:
numpaths: 1
vpath128c state=enabled
total20
#/usr/lib/vxvm/bin/vxconfigrestore -l /etc/vx/cbr/bk/devdg
-
devdg'sdiskgroup configuration is restored (in a precommitted state).
Run:
Once the configuration is restored, the volumes can bestarted, and the file systems that reside on
those volumes can bemounted.
mode:enabled: clustered_state (Clusterinactive, Cluster active - role not set, cluster active -
MASTER,cluster active – SLAVE)
A:Disk groupsharedg: cannot create: Disk group version doesn't support feature;see the vxdg
upgrade command
Checkthe PROTOCOLVERSION
#vxdctl protocolversion
Clusterrunning at protocol 40
Toupgrade the protocol version to the latest available version runvxdctlupgrade onthe master
node:
Beforethe export or import, need to unmount the volume and stop the volume
Whatare the steps to be follow to add a disk in veritas & before addthe disk what are the
steps to be follow
#devfsadm
#vxdctlenable
#vxdiskadm choose the option 1 and then it will ask you the diskgroup once ithas been added it
will ask for the encapsulation, say no then it willask the device name, assign the name, that's it,
#vxdisklist, this will tell the status of the newly added disk as online
vxsddis disk##-##
removea subdisk by
vxeditrm disk##-##
#vxresize
Howto find the VERITAS License?
#vxlicense–p or #vxlicrep -g
#/opt/VRTSvlic/bin/vxlicinst
#vxlicense(or) vxlicinst
Detectnew disks
#devfsadm
#vxdiskadm - select option 1 to add new disks (Initialize new disks and add itto disk group
appdg )
#mkdirsnetprd01
#vi/etc/vfstab
#mount/snetprd01
#df–k
#mount–p
#vxdisklist
##vxprint–g appdg
#cp/etc/vfstab.0702 /etc/vfstab
#vxvol–g appdg stop snetprd01 (Stopping the volumes snetprd01 from appdg)
# df–k
#vxprint -g appdg
Pathfro multipathing.
/kernel/drv/scsi_vhci.conf
Command to execute
Take a copy of
#vxprint list
#vxprint –t DB1
#vxprint –t DB2
#vxprint –t DB3
Verify snapshot iscompleted: ( it will show 2 number ofplex for the volume)
# vxprint –g snapdb1
# vxprint –g snapdb2
# vxprint –g snapdb3
Detach the temporarysnapshot and associated to new volume name
#mkdir /prasadly
#vi /etc/dfs/dfstab
Mount the filesystem to client or you can put the entre in /etc/vfstab on clientside.
Create a mount point
#mkdir prasadly-db1
#mkdir prasadly-db2
#mkdir prasadly-db3
#mount / prasadly-db1
#mount / prasadly-db2
#mount / prasadly-db3
----------------End-----------------
If you want to takebackup the snapshot files follow the below processor
or
Solution:-
veritasvolume made stale & cleaned
7001 vxvea
7012 vxdiskadm
7027 vxdiskadm
#vxreattach–c
#modinfo| gre vx
Howto bring the existing data disk into VERITAS volume manger control.
ThroughEncapsulations method
Howto change the mirror status from 0:1 to 0:5 and how?
#/kernel/drv/sd.cf
Howto find the plex, sub disk, Volume group, disk status, free spaces,disk controller,
Volume controller?
#vxprint-lp
#vxprint -l plex_name
#vxprintlist
#vxprint-Aht
# df–k ( dentify the VERITAS group and volume name of /myhr on EXU407)
#vxassist –g appdg maxsize (check for the free space available inthe group appdg on EXU407 )
youcan increase the size of teh file system by using solaris volumemanager
#vxresize –F vxfs –g rootdg myapps +5g (increase the size of/myapps by 5gb)
#vxresize –F vxfs –g rootdg myapps +5g (decrease the size of/myapps by 5gb)
#df-k
Whatis encapsulation?
Thisis used to bring the disk under volume manager , which are alreadypresent in the system
with data but without volume manager .Data on these disks are not disturbed and if these disks
meetscertain volume manager requirements these are added under volumemanager
Whatis the difference between the VERITAS 3.0 and VERITAS 4.0?
InVertias 4.0 cdsdisk has introduced which means, in any os it can beexported
#vxrootmir
Howto rename the old root disk. In this example, rootdisk is beingrenamed as rootold.
#/etc/vx/bin/vxencap rootdisk=c2t2d0
#vxdgdestroy
#vxdctl-c mode
Whatis a resource?
Resourceare h/w or s/w which work together to provide service to client in aclient/server
environment
Itis a set of items (resource) working together to provided service(application, files and printer)
to client. Failure of one criticalitem in the service group will cause the entire group to fail over
toanother system.
Whatis HA?
Itis a daemon of a cluster which is in the form of Active Passive,i.e. No load balancing
HA-->Highly Available means, two or more systems are connected with thesame configuration,
if one fails the other will take care theresources
#vxdisklist
snapstart starts creating a onlinesnapshot mirror of the volume using the available disk space .
Thesnapshot is completed with vxassist snapshot command when offlinesnapshot volume is
created with a userdefined name.
vxdctlenable
initialize newdisk
vxdisksetup–i
vxassist –g oradgmaxsize
Command Syntax
1. Horizontal configuration
1. Vertical configuration
#hastatus–sum
Storageboxes 1
NodeCluster 2
Whatis a heart-beat?
Heart-beatis a communication which can be set at the time of creating a systemin a cluster,
which can send and receive signal through that designedport.
tocheck the heartbeat use the command gabconfig -a
#lltconfig–U
#gabconfig-U
#hastop
#lltconfig–c
#gabconfig–c -x
#hastart
Okboot –x
#hastop –local –force ( This will ring down the vcs only notapplication it will on alive)
Configurationfiles:
Notes :- Before configuring VCS make sure thelocal_mac_address =true.
(eg)0 sun 1
1sun 2
Set-node0
Start
/sbin/config–c –n 2
#PATH=$PATH:/opt/VRTS/bin:/sbin:/opt/VRTSllt
#exportPATH
#/etc/VRTSvcs/conf/config/main.cf
#/etc/VRTSvcs/conf/config/sysname
Howto bring the resource to online and offline
#getmac/dev/qfe:0
#hastop–loca –force withoutshutting down the application,only vcs can be down (hadaemon)
4types
Onlinelocal
Onlineremote
Onlineglobal
Offlineglobal
2.Disable resource
3.Delete resource
#haconf–makerw
#hagrp–add groupname
#haconf–dump -makero
Ifa main.cf files corrupted how will you rectify
#hastop–all
#dtpad/etc/VRTSvcs/bin/sysname
#mkdir/etc/VRTSvcs/bin/sysname/config
#cptypes.cf config
#cdconfig
#dtpadmain.cf
#vimain.cf
Include”types.cf”
Clustermycluster
Systemnode1
Systemnode2
Snmpmycluster
#hacf–verify .
#hacf–cftocmd .
#hastart
#hastatus–sum
Afterconfiguration of the cluster VCS creates the following files on eachnode participating in the
cluster configuration
/etc/llthosts
/etc/llttab
/etc/gabtab
/etc/VRTSvcs/conf/config/main.cf
/etc/VRTSvcs/conf/config/types.cf
Totake the back up of the cluster configuration files of all the nodedo the following procedure
# hastop -all
# hasnap -backup
. (dot)( as terminator)
doyou want each file to backup to be confirmed (y/n): n( choose the option)
NowStart the Cluster on this terminal first by using the followingcommand and use same
commands on each node
#hastart -force
# hastop -all
specify the option [1…4] : 1( this is the Sr. Number of the cluster configuration Backup file)
Now Start the Cluster on this terminal first by using the following command and use
same commands on each node
#hastart -force
T3Storage
2)Volstat
3)Vol init volname data
5)Vollist
6)Mkdir/dev/es
7)Luxadminsert
4channels
2controllers
Forexample if you remove SB3 board on 6800 server for replaceing faultymemory or faulty CPU
/N0/SB3/P2/B1/d2
LUXADM:-
TheLuxadm program is an administrative command that manages both the sunstorage A5000 and
SPARC storage array disk arrays, Lunadm performa avariety of control and query task,
depending on the command-linearguments and options used.
#vxdctl -c mode
mode:enabled: cluster active - MASTER
master:bits
#vxdctl upgrade
NOTE:All nodes need to be joined in the Cluster Volume Manager clusterbefore running the
above command.
Toconfirm that the protocol version has been updated, the following canbe run:
#vxdctl protocolversion
Clusterrunning at protocol 50
#lltstat–nvv
Howwill you check the status of GAB
#gabtab–a
Okshow-post-result
#vxassist-F
before3 roodisk should be named as rootdg itself ..after 4.0 you can nameit as any thing u want
Whatis Multipathing
Multipathing is the use ofredundant storage network components responsible for transfer of
databetween the server and storage. ...Multipathing allows for two ormore data paths to be
simultaneously used for read/write operations,enhancing performance by automatically and
equally dispersing dataaccess across all the available paths.
Splitbrain:If the private network fails there will not be connectivity betweenthe nodes,
Qourm device will take place in thissenario, Quarm devie have the information of both
the nodes. It will distroy one ofthe node information and make other node to be owner of
(or)
Splitbrain:Enables only the partition(subcluster) with a majority of votes to run as the cluster
(only onepartition can exist with such a majority). After a node loses therace for quorum, that
node panics.
Tosolve this probel
#vi llttab
Node
Seeding;Itis use to protect the cluster in pre-existing network, One seedingsystem can run vcs
Manualseeding #gabconfig –c –x
Amnesia:Guaranteesthat when a cluster is booted, it has at least one node that was amember of
the most recent cluster membership (and thus has the latestconfiguration data).
JeopardyDefined
Thedesign of VCS requires that a minimum of two heartbeat-capablechannels be available
between nodes to protect against networkfailure. When a node is missing a single heartbeat
connection, VCScan no longer discriminate between a system loss and a loss of thelast network
connection. It must then handle loss of communicationson a single network differently from loss
on multiple networks. Thisprocedure is called "jeopardy." As mentionedpreviously, low latency
transport (LLT) provides notification ofreliable versus unreliable network communications to
global atomicbroadcast (GAB). GAB uses this information, with or without afunctional disk
heartbeat, to delegate cluster membership. If thesystem heartbeats are lost simultaneously across
all channels, VCSdetermines the system has failed. The services running on that systemare then
restarted on another. However, if the node was running withone heartbeat only (in jeopardy)
prior to the loss of a heartbeat,VCS does notrestartthe applications on a new node. This action of
disabling failover isa safety mechanism that prevents data corruption.
I/OFencing SCSI III Reservations- I/O Fencing (VxFEN) is scheduled to be included in the
VCS 4.0version. VCS can have parallel or failover service groups withdisk group resources in
them. If the cluster has a split-brain, VxFEN should force one of the subclusters to commit
suicide inorder to prevent data corruption. The subcluster which commitssuicide should never
gain access to the disk groups without joiningthe cluster again. In parallel service groups, it is
necessary toprevent any active processes from writing to the disks. In failovergroups, however,
access to the disk only needs to be prevented whenVCS fails over the service group to another
node. Somemultipathing products will be supported with I/O Fencing.
Thecluster resource group and resources showing “ERROR_STOP_FAILED”,then follow
the below mentioned steps.
---------- --------- -----
Group:pspd-rg phys-pspd1 Error--stopfailed
Group:pspd-rg phys-pspd2 Offline
=====================================================================
==
Forclearing the STOP_FAILED flag ---- -c is for clear flag, -h fornodename, -j for resource
name, -f for error flag.
(ifmore then one resource showing error use this command every resourceand then go to
next step)
ForBring down the resource group ----- (If bring down the resource groupSTOP_FAILED
error will clear and it goes to Offline state)
=====================================================================
==
2. root@phys-pspd1 # scstat -g
--Resource Groups --
Group:pspd-rg phys-pspd2 Offline
root@phys-pspd1#
=====================================================================
==
=====================================================================
==
root@phys-pspd1# scstat -g
#scstat
#scswitch–F –g smsweb-rg
verifyresources are offline on both tgui1 & tgui2
#scstat
#scstat
#scswitch–Z –g smsweb-rg
#scstat
#scstat
ii) Switch back the resource group "hhda-rg" from phys-hhdc1to phys-hhdc2 using the command
shown below:
iv) Comunicate to OPS to start monitoring the alerts on this servers -phys-hhdc1 & phys-hhdc2
switchresources from smslu131 to smslu132
#scstat
#scstat
DiskReplacement on phys-mw1 and phys-mw2
Symptoms:
DID devices d18, d30, d39 are in “Needs Maintenance” state. (phys-mw2 on SENA-B)
format command was showing “drive type unknown” for these DID devices.
To begin the Oracleinstallation using the Veritas DBE/AC, a shared disk group and
thenecessary volumes need to be created.
The following steps provide anexample of how to create the disk group and volumes:
1. From the master node in the cluster, create the shared disk group on the shared disk
c2t3d1:
1. In order to create the cluster file system, on the other node, enter:
# mkfs -F vxfs/dev/vx/rdsk/orasrv_dg/srvm_vol
1. On both systems, create the mount point for the file system:
# mkdir /orasrv
1. On both systems, mount the file system, using the device file for the block device. Use
the option flag –o cluster.
vxdctl -c mode
or:
Resolution:
Step-I
Weneed to reboot the servers phys-mw1 & phys-mw2 for the disks tocome under OS/Cluster
control.
Hereis the procedure for rebooting of phys-mw1 and phys-mw2:
(Monitoron both console sessions for any errors/warning duringswitchover. Wait for 5-10 mins
for the switchover)
1. Confirm that cluster is stable & both “gisdbmw” & “gisfsmw” are owned by phys-mw2.
(Monitoron both console sessions for any errors/warning during stoppingfor cluster services.
Wait for 5-10 mins for this activity)
1. Confirm that cluster is stable & both gisdbmw & gisfsmw are owned by phys-mw2.
phys-mw1 will NOT be a cluster member now.
1. Waiting for phys-mw1 to return.. Monitoring phys-mw1 from console for any issues.
2. Login to phys-mw1 & start the cluster services.
(Monitoron both console sessions for any errors/warning during startingfor cluster services. Wait
for 5-10 mins for this activity)
1. Confirm that cluster is stable & both gisdbmw & gisfsmw are owned by phys-mw2.
phys-mw1 will be a cluster member now.
Phys-mw2#hastat ….on phys-mw2
(Monitoron both console sessions for any errors/warning duringswitchover. Wait for 5-10 mins
for the switchover)
1. Confirm that cluster is stable & “gisdbmw” is owned by phys-mw1 & “gisfsmw” is
owned by phys-mw2.
(Monitoron both console sessions for any errors/warning during startingfor cluster services. Wait
for 5-10 mins for this activity)
1. Confirm that cluster is stable & both “gisdbmw” & “gisfsmw” are owned by phys-mw1.
Phys-mw2#hastat
Phys-mw1#hastat
(Monitoron both console sessions for any errors/warning during stoppingfor cluster services.
Wait for 5-10 mins for this activity)
1. Confirm that cluster is stable & both gisdbmw & gisfsmw are owned by phys-mw1.
phys-mw2 will NOT be a cluster member now.
Phys-mw1#hastat
Phys-mw2#hastat
1. Waiting for phys-mw1 to return.. Monitoring phys-mw2 from console for any issues.
2. Login to phys-mw2 & start the cluster services.
(Monitoron both console sessions for any errors/warning during startingfor cluster services. Wait
for 5-10 mins for this activity)
1. Confirm that cluster is stable & both gisdbmw & gisfsmw are owned by phys-mw1.
phys-mw2 will be a cluster member now.
(Monitoron both console sessions for any errors/warning during startingfor cluster services. Wait
for 5-10 mins for this activity)
1. Now, that the disks are replaced, check if it is viewable from format command.
Suppose,the disk is not viewable from phys-mw1, then run these commands.
Phys-mw1#drvconfig
Phys-mw1#devlinks
Phys-mw1#disks
Toadd DID device d18, d30 and d39, run scdidadm–R fromthe primay node (phys-mw1)
Phys-mw1#scdidadm –R d18
Phys-mw1#scdidadm –R d30
Phys-mw1#scdidadm –R d39
Note:If any state database replicas exist on the failed disk (DID device),then delete the state
database replicas & then reboot the server.In phys-mw1, DID device d18 is containing the state
databasereplicas. This was removed before reboot.
phys-mw1#metadb -s gisdbmw
W l 16 1034 /dev/did/dsk/d18s7
phys-mw1#metadb –d /dev/did/dsk/d18s7
phys-mw1#hastat
-------------------------------------------
phys-mw1 phys-mw2
phys-mw1 is a clustermember
phys-mw2 is a clustermember
uptime of phys-mw1: 3:56pm up 34 day(s), 22:13, 2 users, load average: 0.97, 1.03,1.01
uptime of phys-mw2: 3:56pm up 34 day(s), 19:43, 6 users, load average: 1.29, 1.24,1.38
gisdbmw
gisfsmw
gisfsmw
gisdbmw
None
STATUSOF PRIVATE NETS IN THE CLUSTER
interconnect0: selected
interconnect1: up
To phys-mw1 - UP
To phys-mw2 - UP
interconnect0: selected
interconnect1: up
To phys-mw1 - UP
To phys-mw2 - UP
mwgisapi: On
sybase: On
nfs: On
gisdbmw - running;
gisdbmw/d20:Trans
State: Okay
gisdbmw/d21:Mirror
Submirror 0: gisdbmw/d22
Submirror 1: gisdbmw/d23
State: Okay
Pass: 1
gisdbmw/d22:Submirror of gisdbmw/d21
Stripe 0:
/dev/did/dsk/d18s0 0 No Maintenance
gisdbmw/d23:Submirror of gisdbmw/d21
State: Okay
Stripe 0:
/dev/did/dsk/d25s0 0 No Okay
25 phys-mw2:/dev/rdsk/c4t1d0 /dev/did/rdsk/d25
25 phys-mw1:/dev/rdsk/c4t1d0 /dev/did/rdsk/d25
18 phys-mw1:/dev/rdsk/c2t1d0 /dev/did/rdsk/d18
AVAILABLEDISK SELECTIONS:
0. c2t1d0
/sbus@3,0/SUNW,socal@0,0/sf@0,0/ssd@w21000020374fe013,0
1. c4t1d0
/sbus@b,0/SUNW,socal@0,0/sf@0,0/ssd@w2100002037222d57,0
selectingc4t1d0
[diskformatted]
format>p
PARTITIONMENU:
partition>p
1 unassigned wm 0 0 (0/0/0) 0
2 unassigned wm 0 0 (0/0/0) 0
3 unassigned wm 0 0 (0/0/0) 0
partition>q
FORMATMENU:
format>di
AVAILABLEDISK SELECTIONS:
0. c2t1d0
/sbus@3,0/SUNW,socal@0,0/sf@0,0/ssd@w21000020374fe013,0
1. c4t1d0
/sbus@b,0/SUNW,socal@0,0/sf@0,0/ssd@w2100002037222d57,0
selectingc2t1d0
[diskformatted]
format>p
PARTITIONMENU:
partition>p
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition>0
Enterpartition id tag[root]:
partition>1
Enterpartition id tag[swap]:
partition>6
Enterpartition id tag[usr]:
partition>p
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wu 0 0 (0/0/0) 0
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition>7
7 unassigned wm 0 0 (0/0/0) 0
Enterpartition id tag[unassigned]:
partition>4
4 unassigned wm 0 0 (0/0/0) 0
Enterpartition id tag[unassigned]:
partition>p
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wu 0 0 (0/0/0) 0
3 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
partition>0
0 unassigned wm 0 0 (0/0/0) 0
Enterpartition id tag[unassigned]:
Enterpartition permission flags[wm]:
partition>p
1 unassigned wu 0 0 (0/0/0) 0
3 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
partition>5
5 unassigned wm 0 0 (0/0/0) 0
Enterpartition id tag[unassigned]:
partition>p
1 unassigned wu 0 0 (0/0/0) 0
3 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
partition>6
6 unassigned wm 0 0 (0/0/0) 0
Enterpartition id tag[unassigned]:
Enterpartition permission flags[wm]:
partition>p
1 unassigned wu 0 0 (0/0/0) 0
3 unassigned wm 0 0 (0/0/0) 0
partition>l
partition>q
FORMATMENU:
format>q
/dev/did/dsk/d18s0 0 No Maintenance
/dev/did/dsk/d18s4 0 No Maintenance
/dev/did/dsk/d18s6 0 No Maintenance
/dev/did/dsk/d18s5 0 No Maintenance
INC000000290763& RFC:16070
Disksc2t0d0(d17) & c2t22d0 (d9) and Fan (SENA B: 1-in rear) failedwithin the SENA B disk
array attached to phys-mw1 & phys-mw2 ...the disks & FAN will be hot-swapped by a HP.CDS
engineer .
Step-1
>> Issue the abovecommand , then inform to Synstar person to remove the faulty disk andthen
insert the new disk . (In this case it is r6)
phys-mw2#format c2t22d0
>>Create the partition table in the disk
Step-2
Afterrebooting the server, one disk (d17) is detected in didlist of cluster but another disk (d9) is
not configured in didlist.
WeRan:
Phys-mw1#drvconfig
Phys-mw1#devlinks
Phys-mw1#disks
Phys-mw2#drvconfig
Phys-mw2#devlinks
Phys-mw2#disks
Tryto attach the disks in metadevice. If again facing same problem thenfollowing these
steps:
Phys-mw1#drvconfig
Phys-mw1#devlinks
Phys-mw1#disks
Phys-mw2#drvconfig
Phys-mw2#devlinks
Phys-mw2#disks
Step-3
Thingsto be checked in phys-mw1 & phys-mw2 server before updating inthe worklog that RFC
has been completed successfully.
phys-mw1#su – sa
phys-mw1:/home/sa>showserver-----------------------------Sybase database
Note:If you find any problem with Sybase database please contact with1-WAMPAPPteam.
1. List the files in current directory sorted by size ? - ls -l | grep ^- | sort -nr
2. List the hidden files in current directory ? - ls -a1 | grep "^\."
3. Delete blank lines in a file ? - cat sample.txt | grep -v ‘^$’ > new_sample.txt
4. Search for a sample string in particular files ? - grep “Debug” *.confHere grep uses
the string “Debug” to search in all files with extension“.conf” under current directory.
5. Display the last newly appending lines of a file during appendingdata to the same
file by some processes ? - tail –f Debug.logHere tail shows the newly appended data into
Debug.log by some processes/user.
6. Display the Disk Usage of file sizes under each directory in currentDirectory ? - du
-k * | sort –nr (or) du –k . | sort -nr
7. Change to a directory, which is having very long name ? - cd CDMA_3X_GEN*Here
original directory name is – “CDMA_3X_GENERATION_DATA”.
8. Display the all files recursively with path under current directory ? - find . -depth
-print
9. Set the Display automatically for the current new user ? - export DISPLAY=`eval
‘who am i | cut -d"(" -f2 | cut -d")" -f1′`Here in above command, see single quote, double
quote, grave ascent is used. Observe carefully.
10. Display the processes, which are running under yourusername ? - ps –aef | grep
MaheshvjHere, Maheshvj is the username.
11. List some Hot Keys for bash shell ? - Ctrl+l – Clears the Screen. Ctrl+r – Does a
search in previously given commands in shell. Ctrl+u - Clears the typing before the
hotkey. Ctrl+a – Places cursor at the beginning of the command at shell. Ctrl+e – Places
cursor at the end of the command at shell. Ctrl+d – Kills the shell. Ctrl+z – Places the
currently running process into background.
12. Display the files in the directory by file size ? - ls –ltr | sort –nr –k 5
13. How to save man pages to a file ? - man | col –b > Example : man top | col –b >
top_help.txt
14. How to know the date & time for – when script is executed ? - Add the following
script line in shell script.eval echo "Script is executed at `date`" >> timeinfo.infHere,
“timeinfo.inf” contains date & time details ie., when script is executed and history related
to execution.
15. How do you find out drive statistics ? - iostat -E
16. Display disk usage in Kilobytes ? - du -k
17. Display top ten largest files/directories ? - du -sk * | sort -nr | head
18. How much space is used for users in kilobytes ? - quot -af
19. How to create null file ? - cat /dev/null > filename1
20. Access common commands quicker ? - ps -ef | grep -i $@
21. Display the page size of memory ? - pagesize -a
22. Display Ethernet Address arp table ? - arp -a
23. Display the no.of active established connections to localhost ? - netstat -a | grep EST
24. Display the state of interfaces used for TCP/IP traffice ? - netstat -i
25. Display the parent/child tree of a process ? - ptree Example: ptree 1267
26. Show the working directory of a process ? - pwdx Example: pwdx 1267
27. Display the processes current open files ? - pfiles Example: pfiles 1267
28. Display the inter-process communication facility status ? - ipcs
29. Display the top most process utilizing most CPU ? - top –b 1
30. Alternative for top command ? - prstat -a