You are on page 1of 111

Linux Interview Questions with Answers

Explainthe boot process?


Bootprocess dived into 4 phases.
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.

OBP:Open boot programmable,


1.Diagnosing all the system hardware and memory.
2.Initializing the boot parameter.
3.Creating device trees and load the boot block from(0-15 sector), it is called as
secondary boot programmable ufsboot.
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
/etc/inittab files, as the directory in the/etc/inittab files.

Whatis the difference between init 1 and init s ?

Ifyou switch from multiuser mode to init s and switch it back tomultiuser mode.then remote
useres automatically reconnects to thesystem.
where as in the case of init 1. they have to reconnectmanully means they have to relogin

Explainabout init phases


Thereare 8 run level.
Init0:Shutting down the system and bring back the system to OBP prompt (OK)
Init1:Single user mode for administrative
Init2:Multi user mode without resource sharing
Init3:Multi user mode with resource sharing
Init4:Not in use
Init5:Shutdown and power off the system
Init6:Reboot the system to default run level
Inits:Single user mode but user login are disabled

Explainrc script and run level


Rcscript : check and mount the file system, start and stop the variousprocess.
Runlevel: Base on the init phases 8 run level

Whichfile will take place while booting.


#/etc/inittab

Explain/etc/inittab files
Itwill have 4 fields( id, rstat, action, process)

Respawn: Restart daemon if killed


Off: Dont start the daemon if killed
Once:Run once
Wait:Wait for the process to be completed before processing the next linein /etc/inittab

Explain/etc/system file
Itwill control the kernel modules and it dived into 5 sector
Moddir: default loadable kernel modules
Root.devices& root files configuration : Physical path name of the devices
Exclude:Does not load the kernel during kernel initializing
Forceload:Force the kernel module to load
Set:set maxium user =40

Isit possible to edit the corntab using vi


Itis not recommended but it is possible by
editing
#vi /var/spool/cron/crontabs/root

Thecommand to edit the crontab is


#crontab-e

Isit possible to create swap in new harddisk


without format

No without label the drive, you can't do anything

How will youcomment error line in /etc/system file


# Vi/etc/system
(Tocomment the error line in /etc/system files, we have to use *)

Explaininode
Itcontain the information of the files and directory
Like( date, home directory, rights, modified date, etc)

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

Howdo u change ipaddress in solaris 10


Changeipaddess in following files
#/etc/hosts
#/etc/inet/ipnodes

Wherethe ip address will be stored


#/etc/hosts
#/etc/hostname.hme

Whichfile maintain the kernel


#/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.

Howwill see the kernel version


Okbanner --> This will not show the Kernel
Ok.version --> This will tell the open boot prompt versionotherwords, FIRMWARE
#prtconf V
#showrev --> will show the installed patches
#uname x

Howwill see the hostname


#nodename
#hostname

Howwill compare 2 host patches


Throughftp copy the copied files nad use dd command to compare both the hostpatches.
usethe command called "diff"

Differencebetween probe-scsi-all and probe-scsi


OKprobe-scsi-all: it will show all the scsi devices connected internaland external
OKprobe-scsi: it will show only internal scsi devices connected

Howto find the hardware configuration


OKbanner --> from the open boot prompt
#prtconf
#sysdef
#/use/platform/sun4u/sbin/prtdiag

Howwill you find the number of hard disk


#format
#dmesg --> this will not give the correct answer
#sysdef
#iostatEn --> it wont show the Fibre channel
OKshow-devs --> it will show the device scsi bus channel

OKprobe-scsi-all --> This will deteck all the scsi bus channel, itwill show CD-ROM/DVD-ROM
also

Howto create core dump and crash dump


#coreadm
globalcore file pattern:
init core file pattern:core
global core dumps:disabled
per-process core dumps: enabled
global setid core dumps: disabled
per-process setidcore dumps: disabled
global core dump logging:disabled
To disable per-process corefile creation, use: coreadm-d process
This will modify the/etc/coreadm.conf which is read at boot when /etc/init.d/coreadm isexecuted
from a runtime control script. To make permanent changes tocoreadm, do not edit the
/etc/coreadm.conf file, use the coreadmcommand.
Procedurefor Firmware upgrade
Shutdownroot cron on csslu377 servers
#./etc/init.d/cronstop

Resetthe system controller from the console.


#resetsc -y

Upgradethe firmware on the system controller


>cd /114527-04
>lom -G ./sgrtos.flash
>lom -G ./sgsc.flash

Escapeto lom> and reset the SC:


lom>resetsc -y

Upgradethe firmware on the system boards:


>lom -G ./lw8cpu.flash
>lom -G ./lw8pci.flash

Shutdownthe Operating System.


#shutdowni0 g0 y

Thismay take a while for the server to come up


>poweroff
>poweron

Whichfile to be configuring the logs messages (like: /var/adm/messageetc)


#/etc/syslog.conf

Howwill see the version of the patches


#showrev p
#patchadd P

Howwill check patches installed

#showrev p --> This is the correctone


#patchadd P
#patchrm : to remove the patch
#patchad d (patch no ) : to install the patch

Howwill you view the packages?


#pkginfo| more

Whenuser logging in which file will take place


.profiles

Defaultpath for patches


#/var/sadm/patch

Howmany fields in passwd, shadow and


group files
7inPasswd:username:passwd:uid:gid:commentfiled:homedirectory:loginshell
9 inshadow:useraccount:passwd:lastchange:min:max:warring:inactivity:expiration:flag
4 ingroup: username:passwd:gid:user

Syntaxfor useradd commad


#useradd u 101 g other d /export/home/ragu m s /bin/kshc revenue ragu

Asa user how he can change is passwd with root privilege.

Setuidto set on /usr/bin/passwd command

Whatis default permission of /etc/passwd ,


/etc/shadow files
/etc/passwd:444
/etc/shadow:400

Whatis default permission of files and


directory?
file:644
directory:755

Whatis UMASK
UMASKis a Unix environment variable, which automatically sets filepermissions onnewly
created files,
Defaultvalue is 022

Howto find the kernel bit version or architecture


#isainfo kv

Howto set the time zion

#/etc/default/init
TZ=

Expalinsoft link and hard link


Softlink: link between different file systems and inode number will bedifferent
(eg) /U3 - /U4
#lns /U3/file1 /U4/file2

Hardlink: link betweensame file systems and inode number will be same
(eg) /U3 - /U3
#lns /U3/file1 /U3/file2

Explainsetuid, setgid and stickybit


Setuid: When setuidpermission set on a executable file, user who access the file is
granted access permission of the owner of the file.
#find / -prem 4000

setgid: Permissionsimilar to setuid, The process is changed to owner of the file.


#find / -prem 2000

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.


#find / -prem 1000

Howto set passwd never expire for a user


#passwdx 1 (username)
Tolock an account simply type: passwd-l user_login_name
Nowcheck the status of the account: passwd-S user_login_name
Tounlock the user account...passwd-u user_login_name
passwd -S user_login_name

Howto enable and disable the dtlogin


#/usr/dt/bin/dtconfig e (enable)
#/usr/dt/bin/dtconfig d ( disable)

Howto change the hostname and Ethernet


address in single command
#/usr/sbin/sys-unconfig

Howdo you add the disk without reboot the


server?
#devfsadm c disk

Howto delete abc files using find command


#find / -name abc exec rm {}\;

Whatis difference between g G while creating useradd?


Smallg is primary group
CapitalG is for secondary group

Wehave edit the /etc/passwd file and modify a user forget to give theshell will user able to
loging?
IfPasswd f option given In which files it will update.

Howmany filed in /etc/vfstab


7fileds

Aftercreating swap file update the same to /etc/vfstab what will be thefstype.
temfs

Howwill you clear the soft error on disk


#format analyst & verify test

Howto modify the user from ragu to prasad


#usermod d /export/home/prasad m l prasad ragu

Howwill you find out enough memory?


#/use/platform/sun4u/sbin/prtdiag
#prtconf | grep i mem

Whatcommand can be used in running a background process?


#nohup ( comment ) &

Howwill you rectify the root passwd in solaris


Bootthrough cdrom 1/3 cd in single user mode.
Okboot cdrom-s
#mount F ufs /dev/rdsk/c0t0d0s0 /mnt
# cdmnt
#setTERM=vt100
#exportTERM --> If you dont give, vi editor won't start properly
# vi/etc/shadow (remove the passwd entry and save the file)
#umount /mnt
#reboot ( While system come up it will ask the new root passwd.)

Explaininode
Itcontain the information of the files and directory
Like( date, home directory, rights, modified date, etc)

Ifthe system panic or system not booting


Bootthrough cdrom 1/3 cd in single user mode.
Okboot cdrom-s
#mount F ufs /dev/rdsk/c0t0d0s0 /a
# cda
#installboot /usr/platform/uname-i/lib/fs/ufs/bootblk/dev/rdsk/c00t0d0s0
#umount mnt
#boot r

Howwill you ad new aliases name


# vi/etc/mail/aliases ( enter the aliases name (eg)service:servicedesk@hotmail.com
#newaliases
#/usr/lib/sendmail v b (aliases name)

Totest send mail:


root on LIVE cathnidp #echo "This is a test msg" | mailx -s testthambirajh@inbangalore.mail.saic.com
root on LIVE cathnidp #

Whatare printer daemon


#/etc/inetd.conf --> This is an servicesdaemons
#in.lpd daemon

Whatis the protocol supported by NFS


UDPand TCP

Tofind the OBP environment variable


OKprintenv

ExplainFSCK
Utilityfor checking and repairing the files system inconsistence due toabnormal shutdown.
Ithas 5 phases
Phase1 : Check block and size
Phase2 : Check pathname
Phase3 : Check connectivity
Phase4 : Check reference count
Phase5 : Check cylinder group

Whatis the difference between dsk and rdsk


DSK:Block level devices
RDSK:Raw level device or character level device

Ifsuper block corrupted how to recover


#newfs N /dev/rdsk/c0t0d0s6
Thenrun the fsck utility using alternative super block
#fsck F ufs o b=32 /dev/rdsk/c0t0d0s6

Howto create swap file


#mkfile20m /filename
#swapa /filename
#swapl ( to view and swap file)
#swapd ( to delete the swap file)

Whatis difference between Hard and Soft mount?


Hardmount:Normalfile system mount used mainly for mounting local file systems.
Once a file system is hard mounted,can use a normal filesystem untill
its umount.

Softmount:It allows automatic unmounting if the filesystem is idle for aspecified timeout
period. It is mainly used for networkfilesystems like NFS It can be configured
using Autofs and the networkfilesystem can be soft mounted.

Howto boot the solaris system in 64 0r 32 bit kernel


For64 bit
#eeprom boot-file=/kernel/sparc9/unix
or
OKprintenv boot-file
OKsettenv boot-file kernel/sparc9/unix

For32 bit

#eeprom boot-file=/kernel/unix
or
OKprintenv boot-file
OKsettenv boot-file kernel/unix

Howto find the boot path in solaris


#prtconf vp | grep bootpath
or
#eeprom

Howto bring the process to offline or online


#psradm f (no of the process)
#psradm a n ( no of the process)

Howto check the no of the processor available


#psrinfo v

Howwill you check the process for particular


user
# psU oracle or #ps fu oracle | grep smon

Howdo you check the no of user logged into


the system
#who

Notable to unmount the files its say busy


#fuser -kxuc to terminate all the process
#umount/prasad

Howdo you check the run level


#who r

Inwhich file port Nos are defined


#/etc/service
Howto enable the telnet or ftp session for one host
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

Iftelnet not working, what are the thing to be


checked
Pingtest, service enable or not in (/etc/inetd.conf), NIS problem

Iftelnet is not working, first of all you will not be get connected,login through console access and
then find out with ps -ef | greptelnetd or Kill -1

Whatis nice and renice command do


Toset the high priority for the process
-20high priorities
+20low priorities
Eg:#nice 20 oracles

Tellme the port for Telnet, ftp,nis,ssh,nfs


Telnet= 23, ftp = 21, ssh = 22, nfs = 2049, nis
= 749
Howwill you restart the inetd process?
#Pkill HUP inetd

Whatare thing you must ensure to provide


security the system
1. Latest patches
1. Access to the system:
/etc/default/login

sshd.config
1. Limited su access
1. Stop unnecessary service at run level
/etc/inetd.config : finger, discard,daytime,charger,tftp,spary & etc

Whatis nslookup
Tofind the hostname and ip address
Toresolve the hostname into ip and ip into hostname

Howto configure the network card


#ifconfig hme0 plumb
#ifconfig hme0 192.9.200.10 netmask 255.255.255.0 up
# vi/etc/hosts ( update the ip address )
# vi/etc/hosts.hme0 ( update the ip address ) --> to bring theinterface along with the ipaddress
during boot time.

Howto configure the virtual ip address


Infinityvirtual ip address can be created.
#ifconfig hme0:1 plumb
#ifconfig hme0:1 192.9.200.10 netmask 255.255.255.0 up
# vi/etc/hosts ( update the ip address )

# vi/etc/hosts.hme0:1 ( update the ip address ) --> to bring theinterface along with the ipaddress
during boot time.

Whichservice assign port no dynamically


Rpcservice ( /etc/rpc)
Rpc
Portmaping: it will convert the application into port number

Howto find the network card speed


#ndd get /dev/hme link_speed
1 =100mbps, 0 = 10mbps

Howto modify network card speed


#ndd set /dev/hme instance 0
#ndd get /dev/hme link_status
#ndd get /dev/hme link_mode
Tomodify
#ndd set /dev/eri instance 0
#ndd set /dev/eri adv_100T4_cap0
#ndd set /dev/eri adv_100fdx_cap1
#ndd set /dev/eri adv_100hdx_cap0
#ndd set /dev/eri adv_10fdx_cap0
#ndd set /dev/eri adv_10hdx_cap0

#ndd set /dev/eri adv_autoneg_cap0


100=fullduplex
10=halfduplex
0=
1=autoneg
2
rooton BUILD kirkbiz06 # ndd -set /dev/bge3 adv_autoneg_cap 0
rooton BUILD kirkbiz06 # ndd -get /dev/bge3 link_speed
100
rooton BUILD kirkbiz06 # ndd -get /dev/bge3 link_status
1
rooton BUILD kirkbiz06 # ndd -get /dev/bge3 link_duplex
2
rooton BUILD kirkbiz06 # ndd -get /dev/bge3 link_autoneg
rooton BUILD kirkbiz06 # ndd -set /dev/bge3 adv_autoneg_cap 1
rooton BUILD kirkbiz06 # ndd -get /dev/bge3 link_duplex
2
rooton BUILD kirkbiz06 # ndd -get /dev/bge3 link_autoneg
1
rooton BUILD kirkbiz06 #

Whatare the NFS daemon in server & client

ServerDaemons Client Daemons


1mountd statd
2.nfsd lockd
3.nfslogd
4.statd
5.lockd
The following daemons play acritical role in NFS service:
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.

Howto start / stop the nfs server


#/etc/init.d/nfs.server start
#/etc/init.d/nfs.server stop

Whatare performance tool used


Iostat,vmstat , prstat , sar ,netstat, top

Howwill you check the disk performance?


#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

Howto find out the shared file system from


server and client
Server: # share & dfmount
Client: # showmount e (hostname) and dfshares

Whatare the daemons in nis server.


rpc.yppasswdd
Ypxfrd
rpc.ypupdated

Whatare processing daemon in nis


Ypserv
Ypbind

Createda fs without largefilesuppot


bash-3.00#mkfs -F vxfs -o nolargefiles /dev/vx/rdsk/mydg/oravol
version 6 layout
204800 sectors, 102400 blocksof size 1024, log size 1024 blocks
largefilesnot supported
bash-3.00# mount -F vxfs /dev/vx/dsk/mydg/oravol /mnt
bash-3.00# mount -p | grepmnt

mnttab - /etc/mnttab mntfs - no


/dev/vx/dsk/mydg/oravol -/mnt vxfs - no rw,suid,delaylog,nolargefiles,ioerror=mwdisable

Modifyproperty throughfsadm -enable largefiles


bash-3.00#/opt/VRTS/bin/fsadm -F vxfs -o largefiles /mnt
bash-3.00#mount -p | grep mnt
mnttab - /etc/mnttab mntfs -no
/dev/vx/dsk/mydg/oravol - /mnt vxfs - norw,suid,delaylog,largefiles,ioerror=mwdisable
Howwill you restrict one node from ssh service
#vietc/ssh/sshd_config
PermitRootLoginno or Yes
#dumpadm.conf
# Configuration parametersfor system crash dump.
# Do NOT edit this file byhand -- use dumpadm(1m) instead.
DUMPADM_DEVICE=/dev/dsk/c0t10d0s3
DUMPADM_SAVDIR=/var/crash/isd250
DUMPADM_CONTENT=kernel
DUMPADM_ENABLE=yes
$ pwd
/etc
$ ls -l sav*
-r-xr-xr-x 1 root bin 1112912 Jun 4 2004 save
-r-xr-xr-x 62 root bin 10044 Jan 23 2005 savecore
lrwxrwxrwx 1 root other 6 Mar 29 2006 savepnpc -> ./save
$ pwd

SDS

ExplainRAID0, RAID1, RAID3,


RAID 0Concatenation/Striping
RAID 1Mirroring
RAID5-Striped array with rotating parity.

Concatenation:Concatenation isjoining of two or more disk slices to add up the disk


space.Concatenation is serial in nature i.e. sequential data operations areperformed serially on
first disk then second disk and so on. Due toserial nature new slices can be added up without
having to take thebackup of entire concatenated volume, adding slice and restoringbackup.
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.

How manyreplicas should be for raid5 in sds if I have 5 disk


Noof Hard Devices Noof State Database Replicas to created
One Three, all on one slice
Two-four Two on each drive
Fiveor more One on each drive

Werewill be the configuration for metadevice


#/etc/lvm/md.tab
or
#/etc/opt/SUNWmg/md.tab

Howto grow disk size in SDS


Identifiedthe free disks and the volumes size and meta device name
#dfh
/dev/md/dsk/d19 27G 1.5G 25G 6% /rpbkup

Increasethe filesystem by 10Gb


#metattachd102 10G
#growfs-M /agtmgt/ora1data /dev/md/rdsk/d102

Tofind the free space on soft partition


#metarecover-v -n d40 -p|grep -i free

Howto find the disk controller


#cfgadm

CreatingNew FS in LUNs and new mount point to the Oracle filesystem


#metainit d111 -p d200 20G

d111:Soft Partition is setup


#newfs /dev/md/rdsk/d111
newfs:construct a new file system /dev/md/rdsk/d111: (y/n)? y
#mkdir ora13data
#chown oracle:dba /ora13data
#ls -la ora13data
#mount /dev/md/dsk/d111 /ora13data
#df-k

Whatis luxadm probe used


#luxadmprobe

FoundEnclosure(s):
SUNWGSINT FCBPL Name:FCloop Node WWN:50800200001bcf28
LogicalPath:/dev/es/ses0
LogicalPath:/dev/es/ses1

FoundFibre Channel device(s):


NodeWWN:50020f200000d250 Device Type:Disk device
LogicalPath:/dev/rdsk/c8t60020F200000D28D3E7768C80008F620d0s2
NodeWWN:50020f200000d28d Device Type:Disk device
LogicalPath:/dev/rdsk/c8t60020F200000D28D3E77593A00008EA9d0s2

SMS800Failed Disk Notes

This information wasobtained from Sunsolve


http://sunsolve8.sun.com/search/document.do?assetkey=1-9-76438-1

This example is forreplacing c1t0d0 on SMSLU104


Detach failed mirrors:
#metadetach f d0 d30
#metadetachf d1 d31

Deletedisk metadevices:
#metacleard30
#metacleard31

Verifythere are no existing metadevices:


#metastat p | grepc1t0d0

Remove metadbreplicates on failed disk:


#metadb i
#metadb d c1t0d0s7

Verify there are noreplicas:


#metadb | grep c1t0d0

Save the disk partitiontable from the surviving disk:


#prtvtoc/dev/rdsk/c1t0d0s2 > /var/adm/mmddyyc1t0d0.vtoc

Required for v880, notsure about other HW:


Run luxadm to remove thefailed disk
#luxadm remove_device F/dev/rdsk/c1t0d0s2
At the prompt, physicallyremove the device and continue

Run devfadm cleanup


#/usr/sbin/devfsadm Cc disk
This should remove devicepaths for this disk. Verify via:
#ls ld/dev/dsk/c1t0d*
This should return nodevices.

Thenew disk should now be inserted.


Refresh device names:
#devfsadm
or
#/usr/sbin/luxadm insert_device
luxadminsert_device /dev/rdsk/c1t49d0s2
wheresx is the slot number
or

#/usr/sbin/luxadm insert_device (if enclosure name is not known)


Note:In many cases, luxadm insert_device does not require the enclosure
nameand slot number.
Usethe following to find the slot number:

#luxadm display
Tofind the use:
#luxadm probe
Run"ls -ld /dev/dsk/c1t1d*" to verify that the new devicepaths have
been created.

Update hardware devicenumbers:


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

Write vtoc toreplacement disk:


#fmthard s/var/adm/mmddyyc1t0d0.vtoc/dev/rdsk/c1t0d0s2
Or use format to copy thepartition table.

Create new metadevices:


#metainit d30 1 1 c1t0d0s0
#metainit d31 1 1 c1t0d0s1

Attach mirrors:
#metattachd0 d30
#metattachd1 d31

Add metadbs toreplacement disk:


#metadb a c 3c1t0d0s7

Check that metadbs arecorrect:


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
flags first blk block count
am p luo 16 8192 /dev/dsk/c1t0d0s7
a p luo 8208 8192 /dev/dsk/c1t0d0s7
a p luo 16400 8192 /dev/dsk/c1t0d0s7

Check the progress ofthe sync:


#metastat | grep i sync

Comment chk-vols intoroot cron if needed.

Receivingfollowing io error on /scratch ls /scratch

/scratch:I/O error
************************************************************************
Observation

Found trans deviced5having problem

Following file systemsare not able to open, while using dk k its shows i/o error.

[root drcs1] ksh$ df -k |grep -i /dev/md/meter


/dev/md/meter/dsk/d141001382 117016 874353 12% /appl/TEST
/dev/md/meter/dsk/d611329080 681210 9514970 7% /ora1data/METR
/dev/md/meter/dsk/d105664168 1651 5096107 1% /ora1index/METR
/dev/md/meter/dsk/d222002021 10 1981991 1% /oraredo/METR
/dev/md/meter/dsk/d261887813 20 1699013 1% /redoarch/METR

Step1
[root drcs1] ksh$
[root drcs1] ksh$ metastat-s meter d18
meter/d18: Trans
State:Hard Error
Size: 4087280 blocks
MasterDevice: meter/d17
LoggingDevice: meter/d5

meter/d17: Mirror
Submirror 0: meter/d15
State: Okay
Pass: 1
Read option:roundrobin (default)
Write option: parallel(default)
Size: 4087280 blocks

meter/d15: Submirror ofmeter/d17


State: Okay
Size: 4087280 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c2t5d1s0 0 No Okay

meter/d5:Logging device for meter/d6 meter/d10 meter/d14 meter/d18 meter/d22meter/d26


State:Hard Error
Size: 131990 blocks

meter/d5: Mirror
Submirror 0: meter/d3
State: Okay

Submirror 1: meter/d1
State: Okay
Pass: 1
Read option:roundrobin (default)
Write option: parallel(default)
Size: 132240 blocks

meter/d3: Submirror ofmeter/d5


State: Okay
Size: 132240 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t3d4s6 0 No Okay

meter/d1: Submirror ofmeter/d5


State: Okay
Size: 132240 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t4d0s6 0 No Okay

Step2:- Analyzedboth the disk and no error found disks are okay.

21. c1t3d4
22. c1t4d0
analyze> test
Ready to analyze (won'tharm data). This takes a long time,
but is interruptable withCTRL-C. Continue? yes

pass 0 - pattern =0xc6dec6de


2732/18/14
pass 1 - pattern =0x6db6db6d
2732/18/14
Total of 0 defectiveblocks repaired.

Step3:- Take the output ofmetadevice configuration for meter

[root drcs1] ksh$ metastat-s meter -p


meter/d6-t meter/d2 meter/d5
meter/d2 -m meter/d0 1
meter/d0 1 6 c1t4d0s0c1t4d1s0 c1t4d2s0 c1t4d3s0 c1t4d4s0 c1t5d0s0 -i 256b
meter/d10-t meter/d9 meter/d5
meter/d9 -m meter/d7 1
meter/d7 1 3 c1t3d1s0c1t3d2s0 c1t3d3s0 -i 256b
meter/d14-t meter/d13 meter/d5

meter/d13 -m meter/d11 1
meter/d11 1 1 c1t5d1s0

meter/d5-m meter/d3 meter/d1 1


meter/d3 1 1 c1t3d4s6
meter/d1 1 1 c1t4d0s6
meter/d4 1 1 c1t5d3s0
[root drcs1] ksh$

Sterp4:Find the disk is place withsome other metaset


[root drcs1] ksh$ metastat-s drcs1 -p | grep -i c1t3d4
[root drcs1] ksh$ metastat-s drcs1 -p | grep -i c1t4d0
[root drcs1] ksh$ metastat-s tdcc -p | grep -i c1t3d4
[root drcs1] ksh$ metastat-s tdcc -p | grep -i c1t4d0
[root drcs1] ksh$ metastat-s ssd -p | grep -i c1t3d4
[root drcs1] ksh$metastat -s msp_cd -p | grep -i c1t3d4
[root drcs1] ksh$ metastat-s meter -p | grep -i c1t4d0
meter/d0 1 6 c1t4d0s0c1t4d1s0 c1t4d2s0 c1t4d3s0 c1t4d4s0 c1t5d0s0 -i 256b
meter/d1 1 1 c1t4d0s6
[root drcs1] ksh$

Step5: Find the entry in/etc/vfstab for meter


/dev/md/meter/dsk/d14/dev/md/meter/rdsk/d14 /adev ufs 1 no -

/dev/md/meter/dsk/d6/dev/md/meter/rdsk/d6 /ora1data/METR ufs 1 no /dev/md/meter/dsk/d10/dev/md/meter/rdsk/d10 /ora1index/METR ufs 1 no -

Step6: Unmount all the followingfile systems


#umount /appl/TEST
#umount /ora1data/METR
#umount /ora1index/METR
#umount /oraredo/METR
#umount /redoarch/METR
Check df k whether thefile system are umounted

Step7:-Clearingall the trans device fromd5


meter/d5:Logging device for meter/d6 meter/d10 meter/d14 meter/d18 meter/d22meter/d26

[root drcs1] ksh$metaclear -s meter d10


meter/d10: Trans iscleared
[root drcs1] ksh$metaclear -s meter d14
meter/d14: Trans iscleared
[root drcs1] ksh$metaclear -s meter d18
meter/d18: Trans iscleared

Step8:- Find all the Transdevice configuration hascleared


[root drcs1] ksh$ metastat-s meter -p

Step9:- Mirror meter/d5 withmeter/d3


[rootdrcs1] ksh$ metainit meter/d5 -m meter/d3
meter/d5:Mirror is setup

Step10:- Attache the mirrordevice meter/d5 with sub mirror meter/d1


[rootdrcs1] ksh$ metattach meter/d5 meter/d1
meter/d5: submirrormeter/d1 is attached

Step11:- Create all the transdevice of d5


meter/d5:Logging device for meter/d6 meter/d10 meter/d14 meter/d18 meter/d22meter/d26

#metainitmeter/d6 -t meter/d2 meter/d5


#metainit meter/d10 -t meter/d9 meter/d5

Step12:- Mount all the followingfile systems


#mount/dev/md/meter/dsk/d6
#mount/dev/md/meter/dsk/d10
#mount/dev/md/meter/dsk/d14

MostImportant:- Verification and confirmation

Check dfk whether the file system are mounted

Check all the trans deviceis presentmetastat -s meter p


Check any error is existmetastat -s meterany hard error
Check all the file systemspecifically using ls lrt
Confirmedwith user and close the call.

Howto do the disk cloning on solaris


Hereis the procedure
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
#ddif=/dev/dsk/c1t0d0s2 of=/dev/dsk/c1t1d0s2 bs=256k
Thiswill take time, depends on the size of the primary disk
verfythe clone disk has a clean filesystem, for that
#fsck-y /dev/rdsk/c1t1d0s0
Toverify that mount the clone disk
#mount/dev/dsk/c1t1d0s0 /mnt
changethe /etc/vfstab to point to the clone device
#vi/mnt/etc/vfstab
Aftermaking changes, boot the clone disk -----Done

Backups
Howwill you take ufsdump and ufsrestore in a sing command line?

#ufsdump 0f - /dev/rdsk/c0t0d0s6 | (cd /mnt/prasad ufsrestore xf -)

Tocheck the status of the media inseted on the tape drive


# mt/dev/rmt/0 status

Syntexto execute a ufsdump


#ufsdump 0uf /dev/rmt/1

Differencebetween ufs and tar commnad


ufsdump
1.Used for complete file system backup.
2. It copies every thingfrom regular files in a file system to special character and block
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.

Howcopyall the files to new filesystem


#cd/export/home
#tar-cf - . | ( cd /mnt ; tar -xpf - )

Whatis different between crontab and at command?


Crontab:job can be scheduled
At:Job can be a run once only

Whatis difference between incremental backup and differential backup?


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

Howmany ufsdump level


0-9level
0 =Full Backup
1-9= Incremental backup of file,That have changed since the last lowerlevel backup.

Optionsin ufsdump
S =size estimate amount of space need on tape
L =auto loaded
O =offline once the backup completed & if possible to eject themedia
U =update the /etc/dumdate files (Indicate:Name of the file system,Levelof the backup 0-9,Date.
F =specified the tape devices name

Optionsin ufsrestore
T=list the content of the media
R=restore entire file system
X =restore only the file named on the command line
I= interactive mode

V= verbose mode
F =specified the tape devices name

Howwill you comment error line in /etc/system file


# 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.
Baseon Ethernet card

Disasterrecovery steps if OS corrupted


Okboot cdrom s
#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
#installboot bootblk /dev/rdsk/c0t0d0s0
# cd/
#umount /a
#fsck /dev/rdsm/c0t0d0s0
#init 6

fromthe OK prompt, execute


OK>boot -r

Howmay will you find the process id and disk utilizations.


# pr

Whatis an alternative to the top command


on Solaris?
#prstat a

Isit possible to edit the corntab using vi


Itis not recommended but it is possible by
editing
#vi /var/spool/cron/crontabs/root
Thecommand to edit the crontab is
#crontab-e

Howwill you restrict the users from login


when system in heavy load
Isit possible to create swap in new harddisk
without format
No without label the drive, you can't do anything

Cannotopen '/etc/path_to_inst'"
Systemcan not find the /etc/path_to_install file .It might be missing orcorrupted and needs to be
rebuild.
Torebuild this file boot the system with -ar option :
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
systemwill continue booting after rebuilding the file.

Whatare filed in vfstab


deviceto mount
deviceto fsck
mountpoint
FS type
fsckpass
mountat boot
mountoptions

Howto check the sudo user


# sudo l

Howedit the sudo

#/usr/local/sbin/visudo

Veritas
Howto find the demo?
#Psef |grep vxvm

Howto find the versions?


pkginfo-l VRTSvxvm

Whatare the daemons in VERITAS?


Vxconfigd
Vxiod
Vxrelocd

Howto add disk on a rootdg


#vxdg -g rootdg adddisk newroot=c2t2d0

Howto create a new dg


#vxdginit dgname disk=c2t2d0

Howto mirror a root disk


Initializea new disk
#devfsadm

#format (tolabel the disk)


#vxdctlenable
#vxdiskadm
Selectoption (2) to encapsulation
Rebootthe server or
#vxencapAc -g rootdg f sliced rootdisk=c0t0d0
Afterreboot
#vxdisksetupi diskname (c0t1d0)
#vxdgg rootdg adddisk rootnew=c1t0d0
#vxprintlist
#vxrootmirrootnew

Howto remove the mirrored root disk


#vxplexg bootdg o rm dis plexname
#vxdgg bootdg rmdisk mirror_disk_name
#vxdiskunsetup mirror_disk_name
Removemirror disk, and replace.
#devfsadmCv
#vxdctlint
#vxdctlenable
layoutthe new partitions on disk
#vxdisksetupi c0t1d0
#vxdgg bootdg adddiks rootmirror=c0t1d0

#vxrootmirrootmirror
foreach other volume
#vxassistg bootdg mirror volname

Diskto recover
#vxrecoversn g dgname newdiskname
Howto Unencapsulating root disk
Runthe following command to prevent VxVM from starting up afterreboot:
touch/etc/vx/reconfig.d/state.d/install-db
Detachsecond mirror
#vxplex -o rm dis opt-02 rootvol-02 swapvol-02 usr-02 var-02
unencapsulatea root disk that
#/etc/vx/bin/vxunroot
Rebootsystem #init6
Howto remove the root mirror disk permanently
#vxunroot
Rebootthe system (it will remove the entries of VXVM from /etc/systems &Filesystem from
/etc/vfstab)
Removethe plexes of the rootnew
#vxplexdis rootvol-02 (remove the plexes of the rootnew)

Howto start the vxvm


#vxiodset 10
#vxconfigdm disable

#vxdctenable
Veritaswill start

Now,the slice information for disk newroot (c2t2d0) is:


#prtvtoc -s /dev/rdsk/c2t2d0s2

Deletethe rootalt volume from the new root disk.


#cd /
#umount /mnt
#vxvol stop rootalt
#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.
#vxassist -g rootdg mirror var newroot
#vxassist -g rootdg mirror opt newroot

Tofind out the number of the disk available on veritas


#vxdisk-o alldgs list | more

Howill you create a subdisk and plexus


vxmakesd disk02-02 disk02,0,8000
this would create a subdisk calleddisk02-02 at the start of disk02
and would be 8000blocks (4000k)long.
vxmake plex prasadly-02 sd=disk03-01
creates a plexcalled prasadly-02 using subdisk disk03-01

Howyou will identify that how may DG creation a particular VXVM versionsupport
rooton BUILD kirkcmis3 # vxdctlsupport
Supportinformation:
vxconfigd_vrsn: 21
dg_minimum: 10
dg_maximum: 120
kernel: 15
protocol_minimum:40
protocol_maximum:60
protocol_current:0

Howwill you recover the destroyed DG (devdg)


rooton BUILD kirkcmis3 # vxdisk list VPATH_SANVC0_62
Device: VPATH_SANVC0_62
devicetag:VPATH_SANVC0_62

type: auto
hostid: kirkcmis3
disk: name=devdg84 id=1134042519.185.kirkcmis3
group: name=devdg id=1157983965.194.kirkcmis3
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
flags: online ready private autoconfig autoimport imported
pubpaths:
block=/dev/vx/dmp/VPATH_SANVC0_62s2char=/dev/vx/rdmp/VPATH_SANVC0_62s2
version: 3.1
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=2 offset=2304 len=85948160 disk_offset=0
private: slice=2 offset=256 len=2048 disk_offset=0
update: time=1193065091 seqno=0.51
ssb: actual_seqno=0.0
headers: 0 240
configs: count=1 len=1280
logs: count=1 len=192
Definedregions:
config priv 000048-000239[000192]: copy=01 offset=000000 disabled
config priv 000256-001343[001088]: copy=01 offset=000192 disabled
log priv 001344-001535[000192]: copy=01 offset=000000 disabled
lockrgn priv 001536-001679[000144]: part=00 offset=000000
Multipathinginformation:
numpaths: 1

vpath128c state=enabled

rooton BUILD kirkcmis3 # cd /etc/vx/cbr/bk/ (thedefault repository for DG information)


rooton BUILD kirkcmis3 # ls -ltr
total20
drwxr-x--- 2 root root 512 Feb 2 2006testdg.1138894812.396.kirkcmis3
drwxr-x--- 2 root root 1024 Feb 3 2006dr_sdmp3dg.1138715376.392.kirkcmis3
drwxr-x--- 2 root root 1536 Sep 8 2006test1.1157725540.188.kirkcmis3
drwxr-x--- 2 root root 1536 Oct 22 15:59infodg.1134131590.274.kirkcmis3
drwxr-x--- 2 root root 1536 Oct 22 15:59everestdg.1135092719.278.kirkcmis3
drwxr-x--- 2 root root 1536 Dec 3 15:59devdg.1157983965.194.kirkcmis3

#/usr/lib/vxvm/bin/vxconfigrestore -l /etc/vx/cbr/bk/devdg

Diskgroupdevdg configuration restoration started ......

Installingvolume manager disk header for c1t1d0s2 ...


Installingvolume manager disk header for c1t2d0s2 ...
Installingvolume manager disk header for c1t3d0s2 ...
Installingvolume manager disk header for c1t4d0s2 ...
Installingvolume manager disk header for c1t5d0s2 ...
Installingvolume manager disk header for c1t6d0s2 ...
-

devdg'sdiskgroup configuration is restored (in a precommitted state).


Diskgroupcan be accessed in read only and can be examined using
vxprint(1m)in this state.

Run:
vxconfigrestore -l/etc/vx/cbr/bk/ -c devdg ==> to commit the restoration.
vxconfigrestore -l/etc/vx/cbr/bk/ -d devdg ==> to abort the restoration.

#/usr/lib/vxvm/bin/vxconfigrestore l /etc/vx/cbr/bk c devdg


Committingconfiguration restoration for diskgroup devdg ....

devdg'sdiskgroup configuration restoration is committed.


Once the configuration is restored, the volumes can bestarted, and the file systems that reside on
those volumes can bemounted.

How you will check the FreeSpace in the DG?

root on BUILD kirkcmis3 #vxassist -g devdg maxsize


Maximum volume size:26624 (13Mb)

How will you check theMaster node in VCS

rooton BUILD kirkcmis3 # vxdctl -c mode


mode:enabled: clustered_state (Clusterinactive, Cluster active - role not set, cluster active MASTER,cluster active SLAVE)

Howwill you create the shared Disk group.

rooton BUILD kirkcmis3#vxdg -s init sharedg share01=c3t0d4s2

I amUnable to create the share DG

Whaterror messages the command is displaying?


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:
Howto export and import
Beforethe export or import, need to unmount the volume and stop the volume
#vxvolg dgname stopall
Exporta disk group:
vxdg deport
vxdg -h deport to export to another host
Import a diskgroup:
vxdg import

vxdg -C to clear hostid ofold host (When failing over in DR situation)


vxdg -fC to clearhostid of old host and forcing diskgroup online

Whatare the steps to be follow to add a disk in veritas & before addthe disk what are the
steps to be follow
Beforeadding the disk,
takean output from the format command.
takean output of vxdisk list
afterthe disk is added, do the following:
#devfsadm
#format--> label the disk
#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
Howill you remove the subdisk and plexus
todissociate a subdisk try
vxsddis disk##-##

removea subdisk by
vxeditrm disk##-##

Howwill you grow a disk space whitout disturbs


#vxresize

Howto find the VERITAS License?


Afterinstalling VERITAS, one should confirm with VERITAS license keys
#vxlicensep or #vxlicrep -g

Howto install veritas license


#/opt/VRTSvlic/bin/vxlicinst
#vxlicense(or) vxlicinst

Howto create a new volume


Detectnew disks
#devfsadm
#vxdiskadm - select option 1 to add new disks (Initialize new disks and add itto disk group
appdg )
#vxassist g appdg make snetprd01 55g (create volume in appdg assnetprd01)
#mkfsF vxfs o largefiles /dev/vx/rdsk/appdg/snetprd01 (creating filesystem for the volumes
snetprd01)
# cd/ (creating directories for snetprd01 )
#mkdirsnetprd01
#chownoracle /snetprd01 (change the ownership to oracle for snetprd01directories )
#vi/etc/vfstab
#mount/snetprd01
#dfk
#mountp
#vxdisklist

##vxprintg appdg
Howto remove the volume
Restorethe previous /etc/vfstab
#cp/etc/vfstab.0702 /etc/vfstab
#umount /snetprd01 (Unmounting the files)
#rmdir/snetprd01 (Remove the mount points)
#vxvolg appdg stop snetprd01 (Stopping the volumes snetprd01 from appdg)
#vxeditg appdg v rm snetprd01 (removing volumes from disk group)
# dfk
#vxprint -g appdg

Explainshrinking the disk


Shrinkingthe disk is nothing but reducing the allocated volume size

Whatis shrinking and how to shrink a volume?


#vxassist shrinkto vol_name1000
will shrink a volume by 1000 sectors,
make sure you don'tshrink a volume below the current
size of the filesystem

Pathfro multipathing.
/kernel/drv/scsi_vhci.conf

Procedure forSnapshot Volume

1. Should know the volumename


2. Give new temporarysnapshot volume name
3. Find the disk availablespace to copy the snapshot volume.

Command to execute
Take a copy of
#vxprint -Aht | more
#vxprint list

To displayinformation about DB1, DB2 and DB3


#vxprint t DB1
#vxprint t DB2
#vxprint t DB3

Create a snapshotvolume:- (Execute the below command totake snapshot)


# vxassist g -b snapstart DB1 snapdb1
# vxassist g -b snapstart DB1 snapdb2
# vxassist g -b snapstart DB1 snapdb3

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


# vxassist g snapshot snapdb1-02 snap-db1
# vxassist g snapshot snapdb2-02 snap-db2
# vxassist g snapshot snapdb3-02 snap-db3

Check the filesystem using fsck command


#fsck y/dev/vx/rdsk/ snap-db1
#fsck y/dev/vx/rdsk/ snap-db2
#fsck y/dev/vx/rdsk/ snap-db3

Make a temporarydirectory and mount the file system


#mkdir /prasadly
# mount /dev/vx/rdsk/ snap-db1 /prasadly

Editthe /etc/dfs/dfstab file and just added this entry:


#vi /etc/dfs/dfstab
shareF nfs o rw= /snap-db3
shareF nfs o rw= /snap-db3
shareF nfs o rw= /snap-db3

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-t nfs servername:/snap-db1 /prasadly-db1
#mount-t nfs servername:/snap-db2 /prasadly-db2
#mount-t nfs servername:/snap-db3 /prasadly-db3

Mount all the files system


#mount / prasadly-db1
#mount / prasadly-db2
#mount / prasadly-db3
----------------End----------------If you want to takebackup the snapshot files follow the below processor

Backup the files


#tar cvf /dev/rmt/0 /prasadly
or
#ufsdump 0uf /dev/rmt/0/dev/vx/rdsk/ snap-db1

/ora1data/CUSMARP2file system not able to mounted on veritas

Solution:-

veritasvolume made stale & cleaned


7001 vxvea
7004 vxrecover -s -g cusmarp2_dg vol_ora1data
7005 vxrecover -v -g cusmarp2_dg vol_ora1data
7006 vxprint -Ath | more
7009 datapath query device | more
7010 vxprint -Ath | more
7011 mount -F vxfs /dev/vx/dsk/cusmarp2_dg/vol_ora1data/ora1data/CUSMARP2
7012 vxdiskadm
7015 vxdisk list
7016 vxprint -Ath | more
7021 ./vxse &
7027 vxdiskadm
7049 mount -F vxfs /dev/vx/dsk/cusmarp2_dg/vol_ora1data/ora1data/CUSMARP2
7050 vxprint -Ath
7051 vxmend -g cusmarp2_dg fix stale vol_ora1data-01
7052 vxprint -Ath
7053 vxmend -g cusmarp2_dg fix clean vol_ora1data-01
7054 vxprint -Ath
7055 vxvol -g cusmarp2_dg start vol_ora1data
7056 vxprint -Ath
7057 mount -F vxfs /dev/vx/dsk/cusmarp2_dg/vol_ora1data/ora1data/CUSMARP2
7058 fsck -F vxfs /dev/vx/rdsk/cusmarp2_dg/vol_ora1data

7059 mount -F vxfs /dev/vx/dsk/cusmarp2_dg/vol_ora1data/ora1data/CUSMARP2

Howto recovering an unstartable mirrored volume


#vxmendg dgname fix clean plexname
#vxmend g dgname fix stale plexname
#vxvol g dgname start volumename

Howto recovering an unstartable volume with a disable in the recoverstate


#vxmendg dgname o force off plexname
#vxmend g dgname on plexname
#vxplex g dgname att plexname volumename
#vxmend g dgname fix clean plexname
#vxvol g dgname o gbg start volumename

Howto forcibly restarting the disable volume


#vxvolg dgname o bg f start volume

Howwill you check reattachment is possible with out performing.


#vxreattachc

Tofind the file system version


#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?
#vxassistg dgname v volume name relayout layout=strip

Werethe veritas disk information store.


#/kernel/drv/sd.cf

Howto find the plex, sub disk, Volume group, disk status, free spaces,disk controller,
Volume controller?
Displaysinfo about plexes
#vxprint-lp
#vxprint -l plex_name
Displaysinfo about subdisks
#vxprint -st
#vxprint -l disk##-##
showdisk iops over 10 seconds...
#ssaadmdisplay -p c#
Tracesall i/o on a volume..
#vxtracevol
Toreport disk stats
#vxstat-d
Displaysthe free space on the disks
#vxdgfree
Displaythe disk crontroller
#vxprintlist

#vxprint-Aht

Tellsyou how much you can grow a volume by


#vxassistmaxgrow vol

InVERITAS How to recover the mirror disk with data.

Howto increase the size of the file system?


# dfk ( 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 )
#vxprint thA g appdg (Check if /myhr is mirrored)
#mount p (check the file system of /myhr )
# cpp /etc/vfstab/etc/vfstab.070223 ((take backup of /etc/vfstab file)
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)

Howto increase the size of the file system?


#vxresize F vxfs g rootdg myapps +5g (decrease the size of/myapps by 5gb)
#df-k
#vxresizeb F vxfs ora03vol +70gb
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?
InVERITAS 3.0 , the root dg is present by default
InVERITAS 4.0, the root dg has to be created manually
InVertias 4.0 cdsdisk has introduced which means, in any os it can beexported

Howto mirror a root dg? With eg


#vxrootmir

Howto rename the old root disk. In this example, rootdisk is beingrenamed as rootold.
#vxedit -g rootdg rename rootdisk rootold

Howto Encapsulate the new root disk (c2t2d0).


#/etc/vx/bin/vxencap rootdisk=c2t2d0

Howto mirror and unmirror a disk?


#vxassistmirror prasadly disk05 disk06
uses disks5 and 6 ro make a mirroron volume called prasadly
#vxassist make prasadly 50mlayout=mirror
makes a 50Mb mirror using any 2 disks
Howto remove a disk group?
#vxdgdestroy

Howto display the volume configuration information?

#vxprint-l rootdg

Whatis the command to identify master node on vcs


#vxdctl-c mode
mode:enabled: cluster active - MASTER

Whatis the nature of VCS?


Active Active Load Balancing and high availability
Active passive No load Balancing

Whatis the physical device to check the 2


nodes connect in cluster
Physicalfiber cable which is connect to the 2 nodes is called a HOTBEAT

Whatis a resource?
Resourceare h/w or s/w which work together to provide service to client in aclient/server
environment
Itis monitored and controlled by vcs.

Whatis a service group?


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

Howfar VCS supports?


VCSsupports more than 32 nodes.

Whatare the protocols in VCS


VRTSLLT (low latency) & VRTSGAB (Global autom)

Howto clear the failing flag?


#vxeditset failing=off mydg02
#vxdisklist

Howto create a snapshot mirror


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.
Command Syntax: vxassistsnapstart volume_name
To create a snapshot mirrorof a volume called vol8, type

#vxassist snapstart vol8

How to bring the Disk intodiskgroup on veritas.


Force a lip event on the hbasso they will re-login in Storage
luxadme forcelip /dev/cfg/c5
luxadme forcelip /dev/cfg/c7

Enable the disk devices.


vxdctlenable
vxdisko alldgs list

initialize newdisk
vxdisksetupi
Add disk to disk group
vxdgg oradg adddisk oradg05=
vxdgg oradg adddisk oradg06=

Verify free disk space


vxassist g oradgmaxsize
How to create a snapshot volume
Command Syntax
vxassist snapshot volume_namenew_volume_name
To create a snapshot volume ofvol8, type:
#vxassist snapshot vol8 snapvol8

You can now back up the snapshotvolume by whatever means you prefer. To avoid wasting
space, you canthen remove the snapshot volume, which occupies as much space as theoriginal
volume

Whatare the types of cluster configuration?


1. Horizontal configuration
1. Vertical configuration

Commandto find the VCS status


#hastatussum

Whatare the minimum hardware requirements for cluster configuration?


Storageboxes 1
NodeCluster 2
Minimum2 nodes, 2 etherned address, shared disk and HA applications (ex)oracle

Whatis the purpose of ha daemons in VCS servers?


Hadaemons are used to start/stop services in VCS servers

Howto check the communication between 2 nodes?


Heartbeat checks the communication between 2 nodes.
Whatis a heart-beat?
Itis a script that checks the communication between nodes.
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

Whatare the two types of service groups?


1. Parallel Service group
1. Fail over service group.

Howto unconfigure llt and gab


#lltconfigU
#gabconfig-U
#hastop

Howto start llt and gab


#lltconfigc
#gabconfigc -x
#hastart

Howto start one node cluster.


Okboot x

Howto stop one node cluster exclusively


#hastop local force ( This will ring down the vcs only notapplication it will on alive)

Werethe vcs logs will be

#/var/VRTSvcs/log/engine_A.log

Whatare configuration files and to configure it in VCS


Configurationfiles:
Notes :- Before configuring VCS make sure thelocal_mac_address =true.
#eepromlocal_mac_address?=true ( on both the nodes)
#/etc/llthosts (specify the node names)
(eg)0 sun 1
1sun 2

#/etc/llttab(specify the node names)


Set-node0
Linkqfe0 /dev/qfe:0 _ ether _ _
Linkqfe1 /dev/qfe:1 _ ether _ _
set_cluster 10
Start

#/etc/gabtab (specify the node names)


/sbin/configc n 2

Pathto be set =/etc/profile


#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


#/opt/VRTSvcs/bin/hagrp -online (service_group) -sys (system_name)
#/opt/VRTSvcs/bin/hagrp -offline (service_group) -sys (system_name)

Howto Switch service group between nodes


#/opt/VRTSvcs/bin/hagrp -switch (service_group) -to (system_name)

Howto Freeze svcgroup, (disable onl. & offl.)


#/opt/VRTSvcs/bin/hagrp -freeze (service_group) [-persistent]

Howto unfreeze the svcgroup, (enable onl. & offl.)


#/opt/VRTSvcs/bin/hagrp -unfreeze (service_group) [-persistent]

Whatis the command to check the connectivity between 2 nodes


Getthe mac address from both the nodes
#getmac/dev/qfe:0
Svfrom server side
Cvfrom client side

#./dlpipingsv /dev/qfe:0 macaddresss


#./dlpipingcv /dev/qfe:0 macaddresss

Howto stop the VCS

#hastoplocal
#hastoplocal evaculate 100% shutdown the system
#hastoploca force withoutshutting down the application,only vcs can be down (hadaemon)

Whatare the service group dependence?


4types
Onlinelocal
Onlineremote
Onlineglobal
Offlineglobal

Howto delete a service group


1.Bring all the resource offline
2.Disable resource
3.Delete resource
Eg : #hares delete mysun

Howto add a group


#haconfmakerw
#hagrpadd groupname
#hagrpmodify groupname systemList add node1 node2
#haconfdump -makero

Ifa main.cf files corrupted how will you rectify


#hastopall
Createa config file
#dtpad/etc/VRTSvcs/bin/sysname
#mkdir/etc/VRTSvcs/bin/sysname/config
#cptypes.cf config
#cdconfig
#dtpadmain.cf
#vimain.cf
Includetypes.cf
Clustermycluster
Systemnode1
Systemnode2
Snmpmycluster
#hacfverify .
#hacfcftocmd .
#hastart
#hastatussum

Howto backup the VCS configuration Files


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

Go to the directory /opt/VRTS/bin


Stop the cluster at all nodes

# hastop -all

Fire the Backup Command

# hasnap -backup
wantto dump VCS configuration before proceeding? :y
Name :snap.bak (name of thefile in which Backup has to be taken up )
. (dot)( as terminator)
doyou want each file to backup to be confirmed (y/n): n( choose the option)
Backupwill be created in the directory/var/VRTSvcs/hasnap/data/repository/vcs

NowStart the Cluster on this terminal first by using the followingcommand and use same
commands on each node
#hastart -force

Howto restoring the Cluster configuration

Stopthe cluster at all nodes


# hastop -all
start the process ofrestoring

#hasnap -restore
specify the option [14] : 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
1)Voladd volname data undn raid n standby undn
2)Volstat
3)Vol init volname data
4)Volmount vol name
5)Vollist
6)Mkdir/dev/es
7)Luxadminsert
8)ifabove solaris 7 exclude the steps 6 & 7
9)format and partition .

Howmany controllers in 3510 storage.


4channels
2controllers

Whatis WWN on storage


Worldwide number _______________continues_____________________

Toview the LUNs on a Solarishost, you need to use cfgadms


Forexample if you remove SB3 board on 6800 server for replaceing faultymemory or faulty CPU
cfgadm-c unconfigure N0.SB3 ------Forunconfigure the entire(only SB3) CPU board
root@kbl-db-02# cfgadm -c disconnect N0.SB3 ----Disconecting from physical path
root@kbl-db-02# cfgadm -al |more --forconfirming removed or not
/N0/SB3/P2/B1/d2
cfgadm-c configure N0.SB3 ---Afterreplacing to configure the same board
SSAADM:-ssaadm command is now link to the luxadm command

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

Howwill you check the status of LLT


#lltstatnvv

Howwill you check the status of GAB


#gabtaba

Howto run dignostic for system board and processor board


Okshow-post-result

Howto dettach the volum from veritas


#vxassist-F

Differancebetween 3.0 & 4.0 verision


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
the service group.
(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
Automaticseeding #gabconfig c n < no of nodes>
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.
1. -- Resource Groups -Group Name
----------

Node Name
---------

State

-----

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.

root@phys-pspd1# scswitch -c -h phys-pspd1 -j pspd-oralisten-res -f STOP_FAILED


(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)
root@phys-pspd1# scswitch -F -g pspd-rg
=====================================================================
==
2. root@phys-pspd1 # scstat -g
--Resource Groups and Resources ---Resource Groups -Group Name

Node Name

State

----------

---------

-----

Group:pspd-rg

phys-pspd1

Offline

Group:pspd-rg

phys-pspd2

Offline

Resource:pspd-oralisten-res phys-pspd1

Offline Offline

root@phys-pspd1#
=====================================================================
==
Tobring up the resource group-root@phys-pspd1# scswitch -Z -g pspd-rg
=====================================================================
==
root@phys-pspd1# scstat -g
--Resource Groups and Resources -Resources:pspd-rg

pspd pspd-hastorageplus-res pspd-orasrv-res pspd-oralisten-res

Resource:pspd-oralisten-res phys-pspd1
Resource:pspd-oralisten-res phys-pspd2

Online

Offline Offline

SUNCLUSTER offline cluster resources on smslu131


verifyresources are online on tgui1-svc
#scstat

Takeall resources offline


#scswitchF g smsweb-rg

Online

verifyresources are offline on both tgui1 & tgui2


#scstat

verifyresources are offline on tgui1-svc & tgui2-svc


#scstat

switchresources online on smslu131


#scswitchZ g smsweb-rg

verifyresources are online on tgui1-svc


#scstat

verifyresources are online on tgui1-svc


#scstat

Comunicateto OPS to ignore the alerts on this servers - phys-hhdc1 &phys-hhdc2.


ii) Switch back the resource group "hhda-rg" from phys-hhdc1to phys-hhdc2 using the command
shown below:
scswitch-z -g hhda-rg -h phys-hhdc2
iii) Check if the resouce group is available on phys-hhdc2.
iv) Comunicate to OPS to start monitoring the alerts on this servers -phys-hhdc1 & phys-hhdc2

switchresources from smslu131 to smslu132


#scswitchz g smsweb-rg h tgui2-svc

verifyresources are online on tgui2-svc


#scstat

switchresources from smslu131 to smslu132


# scswitchz g smsweb-rg h tgui1-svc

verifyresources are online on tgui1-svc


#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:
# vxdg -s init orasrv_dgc2t4d2
1. Set the connectivity policy for the disk group as local:
# vxedit setdiskdetpolicy=local orasrv_dg
1. Create the volume in the shared disk group:
# vxassist -g orasrv_dgmake srvm_vol 200M
1. Set the activation mode to read-write:

# vxdg -g orasrv_dg setactivation=sw


1. On the other node, enter:
#vxdg -g orasrv_dg set activation=sw
1. In order to create the cluster file system, on the other node, enter:
# vxdg -g orasrv_dg setactivation=sw
1. To create the file system on srvm_vol:
# 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.
# mount -F vxfs -ocluster /dev/vx/dsk/orasrv_dg/srvm_vol /orasrv
1. To determine which node is the master, use the command:
vxdctl -c mode
In the output, look for:
cluster active - MASTER
or:
cluster active - SLAVE

Resolution:
Step-I
Thedisks were hot-swappable & were replaced online.
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:


1. Login to console of phys-mw1 & phys-mw2.
telnet10.100.175.6 using ports 2 & 3
1. Login to phys-mw1 and switch the resource group gisdbmw to phys-mw2.
Phys-mw1#scadmin switch mwgis phys-mw2 gisdbmw onphys-mw1
(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.
Phys-mw2#hastat .on phys-mw2
1. Stop the cluster services on phys-mw1
Phys-mw1#scadmin stopnode .on phys-mw1
(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.
Phys-mw2#hastat .on phys-mw2
1. Reboot phys-mw1 server
Phys-mw1#shutdown y g0 i6 .on phys-mw1
1. Waiting for phys-mw1 to return.. Monitoring phys-mw1 from console for any issues.
2. Login to phys-mw1 & start the cluster services.
Phys-mw1#scadmin startnode .on phys-mw1
(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


1. From phys-mw2, Switch back gisdbmw back to phys-mw1.
Phys-mw2#scadmin switch mwgis phys-mw1 gisdbmw ..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.
Phys-mw2#hastat on phys-mw2
1. Switch the resource group gisfsmw from phys-mw2 to phys-mw1
Phys-mw2#scadmin switch mwgis phys-mw1 gisfsmw on 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
1. Stop the cluster services on phys-mw2
Phys-mw2#scadmin stopnode .on 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-mw1.
phys-mw2 will NOT be a cluster member now.
Phys-mw1#hastat
Phys-mw2#hastat
1. Reboot phys-mw2 server
Phys-mw2#shutdown y g0 i6 ..on phys-mw2
1. Waiting for phys-mw1 to return.. Monitoring phys-mw2 from console for any issues.

2. Login to phys-mw2 & start the cluster services.


Phys-mw2#scadmin startnode .on 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 will be a cluster member now.
Phys-mw2#hastat .on phys-mw2
1. Switch the resource group gisfsmw from phys-mw1 to phys-mw2
Phys-mw1#scadmin switch mwgis phys-mw2 gisfsmw on phys-mw1
(Monitoron both console sessions for any errors/warning during startingfor cluster services. Wait
for 5-10 mins for this activity)
1. Check if everything is fine on both the server
Phys-mw1#hastat .Check if resource groups are owned by correct servers
Phys-mw1#df k .Check if all the filesystem are mounted
Phys-mw2#hastat .Check if resource groups are owned by correct servers
Phys-mw2#df k .Check if all the filesystem are mounted
1. Now, that the disks are replaced, check if it is viewable from format command.
Ifits not viewable, run these commands - drvconfig,devlinks, disks
Suppose,the disk is not viewable from phys-mw1, then run these commands.
Phys-mw1#drvconfig
Phys-mw1#devlinks
Phys-mw1#disks
Phys-mw1#format Check if the disk is viewable.
1. Disks needs to be added as DID device at the kernel level.
Toadd DID device d18, d30 and d39, run scdidadmR fromthe primay node (phys-mw1)

Phys-mw1#scdidadm R d18
Phys-mw1#scdidadm R d30
Phys-mw1#scdidadm R d39
1. hastat output is as shown in Appendix A.
2. Partitions the disks and mirror them as described in Appendix B.
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
flags first blk block count
W l 16 1034 /dev/did/dsk/d18s7
W l 1050 1034 /dev/did/dsk/d18s7
phys-mw1#metadb d /dev/did/dsk/d18s7
Afterreboot and after scdidadmR d18
Phys-mw1#metadb ac 2 /dev/did/dsk/c18s7
AppendixA : hastat output
phys-mw1#hastat
GettingInformation from all the nodes ......
HIGH AVAILABILITYCONFIGURATION AND STATUS
------------------------------------------LISTOF NODES CONFIGURED IN CLUSTER
phys-mw1 phys-mw2

CURRENTMEMBERS OF THE CLUSTER


phys-mw1 is a clustermember

phys-mw2 is a clustermember

CONFIGURATIONSTATE OF THE CLUSTER


Configuration State onphys-mw1: Stable
Configuration State onphys-mw2: Stable

UPTIMEOF NODES IN THE CLUSTER


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

LOGICALHOSTS MASTERED BY THE CLUSTER MEMBERS


LogicalHosts Mastered on phys-mw1:
gisdbmw
LogicalHosts for which phys-mw1 is Backup Node:
gisfsmw

LogicalHosts Mastered on phys-mw2:


gisfsmw
LogicalHosts for which phys-mw2 is Backup Node:
gisdbmw

LOGICALHOSTS IN MAINTENANCE STATE


None

STATUSOF PRIVATE NETS IN THE CLUSTER

Status of Interconnects onphys-mw1:


interconnect0: selected
interconnect1: up
Status of private nets onphys-mw1:
To phys-mw1 - UP
To phys-mw2 - UP

Status of Interconnects onphys-mw2:


interconnect0: selected
interconnect1: up
Status of private nets onphys-mw2:
To phys-mw1 - UP
To phys-mw2 - UP

STATUSOF PUBLIC NETS IN THE CLUSTER

Statusof Public Network On phys-mw1:


bkggrp r_adp status fo_time live_adp
nafo0 hme0:hme3 OK NEVER hme0

Statusof Public Network On phys-mw2:


bkggrp r_adp status fo_time live_adp
nafo0 hme0:hme3 OK NEVER hme0

STATUSOF DATA SERVICES RUNNING IN THE CLUSTER


StatusOf Registered Data Services
mwgisapi: On
sybase: On
nfs: On

StatusOf Data Services Running On phys-mw1


Data Service "mwgisapi":
Not being managed onthis system
Data Service "sybase":
Database Status onphys-mw1:
gisdbmw - running;
Data Service "nfs":
Not being managed onthis system

StatusOf Data Services Running On phys-mw2


No Status Method forData Service "mwgisapi"
Data Service "sybase":

Not being managed onthis system


Data Service "nfs":
On Logical Host gisfsmw: Ok

RECENT ERROR MESSAGES FROM THE CLUSTER


RecentError Messages on phys-mw1

Aug 9 14:27:00 phys-mw1 snmpdx: agent_process() : bad community from10.100.202.1


Aug 9 14:27:00 phys-mw1 snmpdx: local pdu process error
Aug 9 14:27:00 phys-mw1 snmpdx: session_send_loopback_request() failed
Aug 9 14:27:00 phys-mw1 snmpdx: session_open() failed for a pdu receivedfrom
10.100.202.1.50038
Aug 9 14:35:05 phys-mw1 ID[SUNWcluster.fdl_enum_probe_disks.1105]:Accessed majority of
diskset gisfsmw replicas
Aug 9 14:35:08 phys-mw1 ID[SUNWcluster.fdl_enum_probe_disks.3036]:Cannot access disk
c4t19d0 (/dev/did/rdsk/d30) in diskset gisfsmw,possibly due to a bad cable or controller.
Aug 9 14:35:08 phys-mw1 ID[SUNWcluster.fdl_enum_probe_disks.3036]:Cannot access disk
c4t22d0 (/dev/did/rdsk/d39) in diskset gisfsmw,possibly due to a bad cable or controller.

RecentError Messages on phys-mw2


Aug 9 14:26:58 phys-mw2 snmpdx: local pdu process error
Aug 9 14:26:58 phys-mw2 snmpdx: session_send_loopback_request() failed
Aug 9 14:26:58 phys-mw2 snmpdx: session_open() failed for a pdu receivedfrom
10.100.202.1.50039
Aug 9 14:40:17 phys-mw2 majmddb[7394]: open of '/dev/did/rdsk/d18s7'failed - No such device
or address

Aug 9 14:40:17 phys-mw2 last message repeated 1 time


Aug 9 14:40:17 phys-mw2 majmddb[7394]: Finished all listed devices:succeeded=24 toolong=0
bad=2
Aug 9 14:40:17 phys-mw2 ID[SUNWcluster.fdl_enum_probe_disks.1105]:Accessed majority of
diskset gisdbmw replicas
AppendixB: Create partitions & mirroring of the disks

1. To check which disks are mirrored.

phys-mw1#metastat -s gisdbmw d20


gisdbmw/d20:Trans
State: Okay
Size: 17107524 blocks
Master Device: gisdbmw/d21
Logging Device: gisdbmw/d24

gisdbmw/d21:Mirror
Submirror 0: gisdbmw/d22
State: Needs maintenance
Submirror 1: gisdbmw/d23
State: Okay
Pass: 1
Read option: roundrobin(default)
Write option: parallel(default)

Size: 17107524 blocks

gisdbmw/d22:Submirror of gisdbmw/d21
State: Needs maintenance
Invoke: metareplacegisdbmw/d21 /dev/did/dsk/d18s0
Size: 17107524 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
/dev/did/dsk/d18s0 0 No Maintenance

gisdbmw/d23:Submirror of gisdbmw/d21
State: Okay
Size: 17107524 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
/dev/did/dsk/d25s0 0 No Okay

1. Check what disks represent these did devices.

phys-mw1#scdidadm -L |grep d25


25 phys-mw2:/dev/rdsk/c4t1d0 /dev/did/rdsk/d25
25 phys-mw1:/dev/rdsk/c4t1d0 /dev/did/rdsk/d25
phys-mw1#scdidadm -L |grep d18

18 phys-mw2:/dev/rdsk/c2t1d0 /dev/did/rdsk/d18
18 phys-mw1:/dev/rdsk/c2t1d0 /dev/did/rdsk/d18

3.Partition the disks as follows:

phys-mw1#format c4t1d0 c2t1d0

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
Specifydisk (enter its number): 1
selectingc4t1d0
[diskformatted]
format>p

PARTITIONMENU:
partition>p
Currentpartition table (original):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

0 unassigned wm 117 -4880 8.16GB (4764/0/0) 17107524


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
4 unassigned wm 2 - 116 201.64MB (115/0/0) 412965
5 unassigned wm 4881 -4886 10.52MB (6/0/0) 21546
6 unassigned wm 4887 -4923 64.88MB (37/0/0) 132867
7 unassigned wu 0 - 1 3.51MB (2/0/0) 7182
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
Specifydisk (enter its number)[1]: 0
selectingc2t1d0
[diskformatted]
format>p

PARTITIONMENU:
partition>p
Currentpartition table (original):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 root wm 0 - 73 129.75MB (74/0/0) 265734
1 swap wu 74 - 147 129.75MB (74/0/0) 265734
2 backup wu 0 -4923 8.43GB (4924/0/0) 17682084
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 usr wm 148 -4923 8.18GB (4776/0/0) 17150616
7 unassigned wm 0 0 (0/0/0) 0

partition>0
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 73 129.75MB (74/0/0) 265734

Enterpartition id tag[root]:
Enterpartition permission flags[wm]:
Enternew starting cyl[0]:

Enterpartition size[265734b, 74c, 129.75mb, 0.13gb]: 0


partition>1
Part Tag Flag Cylinders Size Blocks
1 swap wu 74 - 147 129.75MB (74/0/0) 265734

Enterpartition id tag[swap]:
Enterpartition permission flags[wu]:
Enternew starting cyl[74]:
Enterpartition size[265734b, 74c, 129.75mb, 0.13gb]: 0
partition>6

Part Tag Flag Cylinders Size Blocks


6 usr wm 148 -4923 8.18GB (4776/0/0) 17150616

Enterpartition id tag[usr]:
Enterpartition permission flags[wm]:
Enternew starting cyl[148]:
Enterpartition size[17150616b, 4776c, 8374.32mb, 8.18gb]: 0
partition>p
Currentpartition table (unnamed):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 -4923 8.43GB (4924/0/0) 17682084
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
Part Tag Flag Cylinders Size Blocks
7 unassigned wm 0 0 (0/0/0) 0

Enterpartition id tag[unassigned]:
Enterpartition permission flags[wm]: wu
Enternew starting cyl[0]:
Enterpartition size[0b, 0c, 0.00mb, 0.00gb]: 2c
partition>4
Part Tag Flag Cylinders Size Blocks
4 unassigned wm 0 0 (0/0/0) 0

Enterpartition id tag[unassigned]:
Enterpartition permission flags[wm]:
Enternew starting cyl[0]: 2
Enterpartition size[0b, 0c, 0.00mb, 0.00gb]: 115c
partition>p
Currentpartition table (unnamed):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 -4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 2 - 116 201.64MB (115/0/0) 412965
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wu 0 - 1 3.51MB (2/0/0) 7182

partition>0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0

Enterpartition id tag[unassigned]:

Enterpartition permission flags[wm]:


Enternew starting cyl[0]: 117
Enterpartition size[0b, 0c, 0.00mb, 0.00gb]: 4764c
partition>p
Currentpartition table (unnamed):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 unassigned wm 117 -4880 8.16GB (4764/0/0) 17107524
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 -4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 2 - 116 201.64MB (115/0/0) 412965
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wu 0 - 1 3.51MB (2/0/0) 7182

partition>5
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 0 0 (0/0/0) 0

Enterpartition id tag[unassigned]:
Enterpartition permission flags[wm]:

Enternew starting cyl[0]: 4881


Enterpartition size[0b, 0c, 0.00mb, 0.00gb]: 6
Pleasespecify units in either b(blocks), c(cylinders), m(megabytes) org(gigabytes)
Enterpartition size[0b, 0c, 0.00mb, 0.00gb]: 6c
partition>p
Currentpartition table (unnamed):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 unassigned wm 117 -4880 8.16GB (4764/0/0) 17107524
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 -4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 2 - 116 201.64MB (115/0/0) 412965
5 unassigned wm 4881 -4886 10.52MB (6/0/0) 21546
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wu 0 - 1 3.51MB (2/0/0) 7182

partition>6
Part Tag Flag Cylinders Size Blocks
6 unassigned wm 0 0 (0/0/0) 0

Enterpartition id tag[unassigned]:

Enterpartition permission flags[wm]:


Enternew starting cyl[0]: 4887
Enterpartition size[0b, 0c, 0.00mb, 0.00gb]: $
partition>p
Currentpartition table (unnamed):
Totaldisk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 unassigned wm 117 -4880 8.16GB (4764/0/0) 17107524
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 -4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 2 - 116 201.64MB (115/0/0) 412965
5 unassigned wm 4881 -4886 10.52MB (6/0/0) 21546
6 unassigned wm 4887 -4923 64.88MB (37/0/0) 132867
7 unassigned wu 0 - 1 3.51MB (2/0/0) 7182

partition>l
Readyto label disk, continue? y

partition>q

FORMATMENU:

format>q

4.Check out what mirrors needs to re-synced.


phys-mw1#metastat -s gisdbmw |grep d18
Invoke: metareplacegisdbmw/d21 /dev/did/dsk/d18s0
/dev/did/dsk/d18s0 0 No Maintenance
Invoke: metareplacegisdbmw/d121 /dev/did/dsk/d18s4
/dev/did/dsk/d18s4 0 No Maintenance
Invoke: metareplacegisdbmw/d124 /dev/did/dsk/d18s6
/dev/did/dsk/d18s6 0 No Maintenance
Invoke: metareplacegisdbmw/d0 /dev/did/dsk/d18s5
/dev/did/dsk/d18s5 0 No Maintenance

5.Resync the mirrors.


phys-mw1#metareplace -e gisdbmw/d21 /dev/did/dsk/d18s0
gisdbmw/d21:device /dev/did/dsk/d18s0 is enabled
phys-mw1#metareplace -e gisdbmw/d121 /dev/did/dsk/d18s4
gisdbmw/d121:device /dev/did/dsk/d18s4 is enabled
phys-mw1#metareplace -e gisdbmw/d124 /dev/did/dsk/d18s6
gisdbmw/d124:device /dev/did/dsk/d18s6 is enabled
phys-mw1#metareplace -e gisdbmw/d0 /dev/did/dsk/d18s5
gisdbmw/d0:device /dev/did/dsk/d18s5 is enabled

6.Check out if they are re-syncing..


phys-mw1#metastat -s gisdbmw |grep %
Resync in progress: 2 %done
Resync in progress: 35 %done
Resync in progress: 54 %done
phys-mw1#metastat s gisdbmw |grep Main
phys-mw1#metastat -s gisdbmw |grep -i main

Updatefrom Rajiba Swain


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
1. Replace the faulty disk(s).
phys-mw2#luxadm remove B,r6
>> Issue the abovecommand , then inform to Synstar person to remove the faulty disk andthen
insert the new disk . (In this case it is r6)

>> After gettingconfirmation from Synstar issue the following command


phys-mw2#luxadm insert B,r6

>>Verify the disk geometry


phys-mw2#format c2t22d0

>>Create the partition table in the disk


Step-2

Followthe steps mentioned in the Originaldocument.


Normallythe disks will be detected automatically .Problem we faced during theRFC;
Afterrebooting the server, one disk (d17) is detected in didlist of cluster but another disk (d9) is
not configured in didlist.

phys-mw2#metareplace -e gisfsmw/d21 /dev/did/dsk/d9s0


metareplace:phys-mw2: /dev/did/dsk/d9s0: No such device or address ---error message

So wefollow the bellow mentioned steps phys-mw1 and phys-mw2 server


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.
1. Only in phys-mw1 server
phys-mw1#su sa
SunMicrosystems Inc. SunOS 5.6 Generic August 1997
Youhave new mail.
phys-mw1:/home/sa>showserver-----------------------------Sybase database
UID PID PPID C STIMETTY TIME CMD
sybase 6007 6001 0 Oct17 ? 1550:30 /opt/sybase/bin/dataserver -d/gisdbmw/data3/mastere/gisdbmw/syblog/gisdbmw.lo
sybase 6517 6007 0 Oct17 ? 2002:43 /opt/sybase/bin/dataserverONLINE:1,0,0x66006099,0xc3800000,0x2b4b6000,0x1159
sybase 6017 6015 0 Oct17 ? 2:05 /opt/sybase/bin/backupservere/gisdbmw/syblog/gisdbmw_back.log -N25 -C20 -Sgis
sybase 6527 6521 0 Oct17 ? 1519:07 /opt/sybase/bin/dataserverONLINE:3,0,0x66006099,0xc3800000,0x2b4b6000,0x1159
sybase 6521 6517 0 Oct17 ? 1633:38 /opt/sybase/bin/dataserverONLINE:2,0,0x66006099,0xc3800000,0x2b4b6000,0x1159

phys-mw1:/home/sa>

Note:If you find any problem with Sybase database please contact with1-WAMPAPPteam.
Pleaserefer Remedy Incident: 292913

2. Verify the Web services .


phys-mw2:/home/sa>ps -ef | grep httpd
nobody 4260 4259 0 Oct17 ? 0:03 /usr/apache/bin/httpd -f/etc/apache/httpd.external.conf
root 4259 1 0 Oct17 ? 0:00 /usr/apache/bin/httpd -f/etc/apache/httpd.external.conf
nobody 4403 4350 0 Oct17 ? 0:00 /usr/apache/bin/httpd -f/etc/apache/httpd.contestable.conf
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

You might also like