You are on page 1of 35

Explain the boot process?

Boot process divided 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,serial No, architecture type, memory
and Ethernet address and it will load the 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 the necessary
devices modules to mount the root partition to continue the booting process.

Init Phase : It will started by executing of /etc/init program and start other process reading the
/etc/inittab files, as the directory in the /etc/inittab files.

What is the difference between init 1 and init s ?


If you switch from multiuser mode to init s and switch it back to multiuser mode.then remote useres automatically
reconnects to the system.
where as in the case of init 1. they have to reconnect manully means they have to relogin

Explain about init phases


There are 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

Explain rc script and run level


Rc script : check and mount the file system, start and stop the various process.
Run level: Base on the init phases 8 run level

Which file will take place while booting.


# /etc/inittab

Explain /etc/inittab files


It will 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 line in /etc/inittab

Explain /etc/system file


It will 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

1
Is it possible to edit the corntab using vi
It is not recommended but it is possible by editing
# vi /var/spool/cron/crontabs/root

The command to edit the crontab is


#crontab -e

Is it possible to create swap in new harddisk without format


No without label the drive, you can't do anything
How will you comment error line in /etc/system file
# Vi /etc/system
(To comment the error line in /etc/system files, we have to use *)

Explain inode
It contain the information of the files and directory
Like ( date, home directory, rights, modified date, etc)

How many file to modify the host name to be changed without rebooting the system.
There are 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

How do u change ipaddress in solaris 10


Change ipaddess in following files
#/etc/hosts
#/etc/inet/ipnodes

Where the ip address will be stored


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

Which file maintain the kernel


# /etc/path_to_inst

This will be quite complicative, because kernel is the core of the operating system, its an image of the
OS. whereas /etc/path_to_inst are the drivers are stored for the enabled hardware.

How will see the kernel version


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

How will see the hostname


#nodename
#hostname

How will compare 2 host patches


Through ftp copy the copied files and use dd command to compare both the host patches.
use the command called "diff"

Difference between probe-scsi-all and probe-scsi


OK probe-scsi-all: it will show all the scsi devices connected internal and external
OK probe-scsi: it will show only internal scsi devices connected

2
How to find the hardware configuration
OK banner --> from the open boot prompt
# prtconf
# sysdef
# /use/platform/sun4u/sbin/prtdiag

How will you find the number of hard disk


# format
#dmesg --> this will not give the correct answer
#sysdef
#iostat En --> it wont show the Fibre channel
OK show-devs --> it will show the device scsi bus channel
OK probe-scsi-all --> This will deteck all the scsi bus channel, it will show CD-ROM/DVD-ROM also

How to create core dump and crash dump


#coreadm
global core file pattern:
init core file pattern: core
global core dumps: disabled
per-process core dumps: enabled
global setid core dumps: disabled
per-process setid core dumps: disabled
global core dump logging: disabled
To disable per-process core file creation, use: coreadm -d process
This will modify the /etc/coreadm.conf which is read at boot when /etc/init.d/coreadm is executed from
a runtime control script. To make permanent changes to coreadm, do not edit the /etc/coreadm.conf
file, use the coreadm command.

Procedure for Firmware upgrade


Shutdown root cron on csslu377 servers
#./etc/init.d/cron stop

Reset the system controller from the console.


# resetsc -y

Upgrade the firmware on the system controller


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

Escape to lom> and reset the SC:


lom> resetsc -y

Upgrade the firmware on the system boards:


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

Shutdown the Operating System.


#shutdown i0 g0 y

This may take a while for the server to come up


> poweroff
> poweron

Which file to be configuring the logs messages (like: /var/adm/message etc)


#/etc/syslog.conf

3
How will see the version of the patches
# showrev p
# patchadd P

How will check patches installed


# showrev p --> This is the correct one
# patchadd P
# patchrm : to remove the patch
# patchad d (patch no ) : to install the patch

How will you view the packages?


#pkginfo | more

When user logging in which file will take place


.profiles

Default path for patches


# /var/sadm/patch

How many fields in passwd, shadow and group files


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

Syntax for useradd commad


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

As a user how he can change is passwd with root privilege.

Setuid to set on /usr/bin/passwd command

What is default permission of /etc/passwd , /etc/shadow files


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

What is default permission of files and directory?


file: 644
directory: 755

What is UMASK
UMASK is a Unix environment variable, which automatically sets file permissions on newly created files,
Default value is 022

How to find the kernel bit version or architecture


# isainfo kv

How to set the time zion


# /etc/default/init
TZ=

Expalin soft link and hard link


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

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

4
Explain setuid, setgid and stickybit
Setuid : When setuid permission set on a executable file, user who access the file is
granted access permission of the owner of the file.
# find / -prem 4000

setgid : Permission similar to setuid, The process is changed to owner of the file.
# find / -prem 2000

Stickybit : It is a special permission that protect the files within a public writable directory
Stickybit permission set the shared directory, user can create a files or directory
But only by owner of the directory can modify or delete.
# find / -prem 1000

How to set passwd never expire for a user


#passwd x 1 (username)
To lock an account simply type: passwd -l user_login_name

Now check the status of the account: passwd -s user_login_name

To unlock the user account... passwd -u user_login_name


passwd -s user_login_name

How to enable and disable the dtlogin


(dtlogin script:Solaris do not use startx command. It comes with dtlogin script located in /etc/init.d directory.
It is a display manager for the X Window System)

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

How to change the hostname and Ethernet address in single command


# /usr/sbin/sys-unconfig

How do you add the disk without reboot the server?


# devfsadm c disk

How to delete abc files using find command


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

What is difference between g G while creating useradd?


Small g is primary group
Capital G is for secondary group

We have edit the /etc/passwd file and modify a user forget to give the shell will user able to
loging?
If Passwd f option given In which files it will update.

How many filed in /etc/vfstab


7 fileds

After creating swap file update the same to /etc/vfstab what will be the fstype.
temfs

How will you clear the soft error on disk


# format  analyst & verify  test

How to modify the user from ragu to prasad


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

5
How will you find out enough memory?
# /use/platform/sun4u/sbin/prtdiag
# prtconf | grep i mem

What command can be used in running a background process?


# nohup ( comment ) &

How will you rectify the root passwd in solaris


Boot through cdrom 1/3 cd in single user mode.
Ok boot cdrom-s
# mount F ufs /dev/rdsk/c0t0d0s0 /mnt
# cd mnt
#set TERM=vt100
#export TERM --> 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.)

Explain inode
It contain the information of the files and directory
Like ( date, home directory, rights, modified date, etc)

If the system panic or system not booting


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

How will 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)

To test send mail:


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

What are printer daemon


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

What is the protocol supported by NFS


UDP and TCP

To find the OBP environment variable


OK printenv

Explain FSCK
Utility for checking and repairing the files system inconsistence due to abnormal shutdown.
It has 5 phases
Phase 1 : Check block and size
Phase 2 : Check pathname
Phase 3 : Check connectivity
Phase 4 : Check reference count

6
Phase 5 : Check cylinder group

What is the difference between dsk and rdsk


DSK: Block level devices
RDSK: Raw level device or character level device
If super block corrupted how to recover
# newfs N /dev/rdsk/c0t0d0s6
Then run the fsck utility using alternative super block
# fsck F ufs o b=32 /dev/rdsk/c0t0d0s6

How to create swap file


#mkfile 20m /filename
#swap a /filename
#swap l ( to view and swap file)
#swap d ( to delete the swap file)

What is difference between Hard and Soft mount?


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

Soft mount:It allows automatic unmounting if the filesystem is idle for a specified timeout
period. It is mainly used for network filesystems like NFS It can be configured
using Autofs and the network filesystem can be soft mounted.

How to boot the solaris system in 64 0r 32 bit kernel


For 64 bit
# eeprom boot-file=/kernel/sparc9/unix
or
OK printenv boot-file
OK settenv boot-file kernel/sparc9/unix

For 32 bit
# eeprom boot-file=/kernel/unix
or
OK printenv boot-file
OK settenv boot-file kernel/unix

How to find the boot path in solaris


# prtconf vp | grep bootpath
or
# eeprom
How to bring the process to offline or online
# psradm f (no of the process)
# psradm a n ( no of the process)

How to check the no of the processor available


# psrinfo v

How will you check the process for particular user


# ps U oracle or #ps fu oracle | grep smon

How do you check the no of user logged into the system


# who

Not able to unmount the files its say busy


#fuser -kxuc <filesystem name> to terminate all the process
#umount /prasad

7
How do you check the run level
# who r

In which file port Nos are defined


# /etc/service
How to enable the telnet or ftp session for one host
Edit the /etc/hosts.allow (it will have list of host to access) -> This will show the user list on that host.-
/etc/hosts.deny (it will have list of host to access deny)-> This will show the user list on that host.-
/etc/services file

If telnet not working, what are the thing to be checked


Ping test, service enable or not in (/etc/inetd.conf), NIS problem
If telnet is not working, first of all you will not be get connected, login through console access and then
find out with ps -ef | grep telnetd or Kill -1 <pid_inetd>

What is nice and renice command do


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

Tell me the port for Telnet, ftp,nis,ssh,nfs


Telnet = 23, ftp = 21, ssh = 22, nfs = 2049, nis = 749

How will you restart the inetd process?


# Pkill HUP inetd

What are thing you must ensure to provide security the system
1. Latest patches
2. Access to the system:
/etc/default/login
sshd.config
3. Limited su access
4. Stop unnecessary service at run level
/etc/inetd.config : finger, discard, daytime,charger,tftp,spary & etc

What is nslookup
To find the hostname and ip address
To resolve the hostname into ip and ip into hostname

How to 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 the interface along with the ipaddress
during boot time.

How to configure the virtual ip address


Infinity virtual 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 the interface along with the ipaddress
during boot time.

Which service assign port no dynamically


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

8
How to find the network card speed
# ndd get /dev/hme link_speed
1 = 100mbps, 0 = 10mbps
How to modify network card speed
# ndd set /dev/hme instance 0
# ndd get /dev/hme link_status
# ndd get /dev/hme link_mode
To modify
# 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=full duplex
10=half duplex
0=
1= autoneg
2
root on BUILD kirkbiz06 # ndd -set /dev/bge3 adv_autoneg_cap 0
root on BUILD kirkbiz06 # ndd -get /dev/bge3 link_speed
100
root on BUILD kirkbiz06 # ndd -get /dev/bge3 link_status
1
root on BUILD kirkbiz06 # ndd -get /dev/bge3 link_duplex
2
root on BUILD kirkbiz06 # ndd -get /dev/bge3 link_autoneg
0
root on BUILD kirkbiz06 # ndd -set /dev/bge3 adv_autoneg_cap 1
root on BUILD kirkbiz06 # ndd -get /dev/bge3 link_duplex
2
root on BUILD kirkbiz06 # ndd -get /dev/bge3 link_autoneg
1
root on BUILD kirkbiz06 #

What are the NFS daemon in server & client


Server Daemons Client Daemons
1 mountd statd
2.nfsd lockd
3.nfslogd
4.statd
5.lockd
The following daemons play a critical 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.
How to start / stop the nfs server
# /etc/init.d/nfs.server start
# /etc/init.d/nfs.server stop
9
What are performance tool used
Iostat ,vmstat , prstat , sar ,netstat, top

How will you check the disk performance?


# iostat xctd 4 5
If a disk shows consistently high reads/writes along with , the percentage busy (%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 following action needs to be taken

How to find out the shared file system from server and client
Server : # share & dfmount
Client : # showmount e (hostname) and dfshares

What are the daemons in nis server.


rpc.yppasswdd
Ypxfrd
rpc.ypupdated

What are processing daemon in nis


Ypserv
Ypbind

Created a fs without largefilesuppot


bash-3.00# mkfs -F vxfs -o nolargefiles /dev/vx/rdsk/mydg/oravol
version 6 layout
204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
largefiles not supported
bash-3.00# mount -F vxfs /dev/vx/dsk/mydg/oravol /mnt
bash-3.00# mount -p | grep mnt
mnttab - /etc/mnttab mntfs - no
/dev/vx/dsk/mydg/oravol - /mnt vxfs - no rw,suid,delaylog,nolargefiles,ioerror=mwdisable

Modify property through fsadm -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 - no rw,suid,delaylog,largefiles,ioerror=mwdisable

How will you restrict one node from ssh service

#vi /etc/ssh/sshd_config

PermitRootLogin no or Yes

# dumpadm.conf
# Configuration parameters for system crash dump.
# Do NOT edit this file by hand -- 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

10
-r-xr-xr-x 62 root bin 10044 Jan 23 2005 savecore
lrwxrwxrwx 1 root other 6 Mar 29 2006 savepnpc -> ./save
$ pwd

SDS

Explain RAID0, RAID1, RAID3,


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

Concatenation: Concatenation is joining of two or more disk slices to add up the disk space.
Concatenation is serial in nature i.e. sequential data operations are performed serially on first disk then
second disk and so on. Due to serial nature new slices can be added up without having to take the
backup of entire concatenated volume, adding slice and restoring backup.
Striping: Spreading of data over multiple disk drives mainly to enhance the performance by
distributing data in alternating chunks - 16 k interleave across the stripes. Sequential data operations
are performed in parallel on all the stripes by reading/writing 16k data blocks alternatively form the
disk stripes.
Mirroring: Mirroring provides data redundancy by simultaneously writing data on to two sub mirrors of
a mirrored device. A submirror can be a stripe or concatenated volume and a mirror can have three
mirrors. Main concern here is that a mirror needs as much as the volume to be mirrored.
RAID 5: RAID 5 provides data redundancy and advantage of striping and uses less space than
mirroring. A RAID 5 is made up of at least three disks, which are striped with parity information written
alternately on all the disks. In case of a single disk failure the data can be rebuild using the parity
information from the remaining disks.

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


No of Hard Devices No of State Database Replicas to created
One Three, all on one slice
Two-four Two on each drive
Five or more One on each drive

Were will be the configuration for metadevice


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

How to grow disk size in SDS


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

Increase the filesystem by 10Gb


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

To find the free space on soft partition


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

How to find the disk controller


#cfgadm

Creating New 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
11
# ls -la ora13data
# mount /dev/md/dsk/d111 /ora13data
#df -k

What is luxadm probe used


#luxadm probe

Found Enclosure(s):
SUNWGS INT FCBPL Name:FCloop Node WWN:50800200001bcf28
Logical Path:/dev/es/ses0
Logical Path:/dev/es/ses1

Found Fibre Channel device(s):


Node WWN:50020f200000d250 Device Type:Disk device
Logical Path:/dev/rdsk/c8t60020F200000D28D3E7768C80008F620d0s2
Node WWN:50020f200000d28d Device Type:Disk device
Logical Path:/dev/rdsk/c8t60020F200000D28D3E77593A00008EA9d0s2

SMS800 Failed Disk Notes

This information was obtained from Sunsolve


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

This example is for replacing c1t0d0 on SMSLU104


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

Delete disk metadevices:


#metaclear d30
#metaclear d31

Verify there are no existing metadevices:


#metastat p | grep c1t0d0

Remove metadb replicates on failed disk:


#metadb i
#metadb d c1t0d0s7

Verify there are no replicas:


#metadb | grep c1t0d0

Save the disk partition table from the surviving disk:


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

Required for v880, not sure about other HW:


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

Run devfadm cleanup


#/usr/sbin/devfsadm C c disk
This should remove device paths for this disk. Verify via:
#ls ld /dev/dsk/c1t0d*
This should return no devices.

The new disk should now be inserted.


Refresh device names:
# devfsadm

12
or
# /usr/sbin/luxadm insert_device <enclosure_name,sx>
luxadm insert_device /dev/rdsk/c1t49d0s2
where sx 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
name and slot number.
Use the following to find the slot number:

# luxadm display <enclosure_name>


To find the <enclosure_name> use:
# luxadm probe
Run "ls -ld /dev/dsk/c1t1d*" to verify that the new device paths have
been created.

Update hardware device numbers:


At the end of metastat command output are the hardware device numbers. After replacement the
metadevadm command should be run to update the new device number.

#metadevadm u c1t0d0

Write vtoc to replacement disk:


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

Create new meta devices:


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

Attach mirrors:
#metattach d0 d30
#metattach d1 d31

Add metadbs to replacement disk:


#metadb a c 3 c1t0d0s7

Check that metadbs are correct:


The lower case lettered flags may not appear until the server is rebooted. For sms800 there need to
be six total metadbs. Three on each of the root mirrored disk.

# metadb
flags first blk block count
a m 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 of the sync:


#metastat | grep i sync

Comment chk-vols into root cron if needed.

Receiving following io error on /scratch ls /scratch


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

Found trans device d5 having problem

13
Following file systems are 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/d14 1001382 117016 874353 12% /appl/TEST
/dev/md/meter/dsk/d6 11329080 681210 9514970 7% /ora1data/METR
/dev/md/meter/dsk/d10 5664168 1651 5096107 1% /ora1index/METR
/dev/md/meter/dsk/d22 2002021 10 1981991 1% /oraredo/METR
/dev/md/meter/dsk/d26 1887813 20 1699013 1% /redoarch/METR

Step 1
[root drcs1] ksh$
[root drcs1] ksh$ metastat -s meter d18
meter/d18: Trans
State: Hard Error
Size: 4087280 blocks
Master Device: meter/d17
Logging Device: 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 of meter/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/d22


meter/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 of meter/d5


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

meter/d1: Submirror of meter/d5


State: Okay
Size: 132240 blocks
Stripe 0:

14
Device Start Block Dbase State Hot Spare
c1t4d0s6 0 No Okay

Step 2:- Analyzed both the disk and no error found disks are okay.

21. c1t3d4 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>


22. c1t4d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>

analyze> test
Ready to analyze (won't harm data). This takes a long time,
but is interruptable with CTRL-C. Continue? yes

pass 0 - pattern = 0xc6dec6de


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

Step 3:- Take the output of metadevice 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 c1t4d0s0 c1t4d1s0 c1t4d2s0 c1t4d3s0 c1t4d4s0 c1t5d0s0 -i 256b
meter/d10 -t meter/d9 meter/d5
meter/d9 -m meter/d7 1
meter/d7 1 3 c1t3d1s0 c1t3d2s0 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 with some 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 c1t4d0s0 c1t4d1s0 c1t4d2s0 c1t4d3s0 c1t4d4s0 c1t5d0s0 -i 256b
meter/d1 1 1 c1t4d0s6
[root drcs1] ksh$

Step 5: 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 -

Step 6: Unmount all the following file systems


#umount /appl/TEST
#umount /ora1data/METR
#umount /ora1index/METR

15
#umount /oraredo/METR
#umount /redoarch/METR
Check df k whether the file system are umounted

Step7:- Clearing all the trans device from d5


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

[root drcs1] ksh$ metaclear -s meter d10


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

Step 8:- Find all the Trans device configuration has cleared
[root drcs1] ksh$ metastat -s meter -p

Step 9:- Mirror meter/d5 with meter/d3


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

Step 10:- Attache the mirror device meter/d5 with sub mirror meter/d1
[root drcs1] ksh$ metattach meter/d5 meter/d1
meter/d5: submirror meter/d1 is attached

Step 11:- Create all the trans device of d5


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

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


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

Step 12:- Mount all the following file systems


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

Most Important:- Verification and confirmation

Check df k whether the file system are mounted


Check all the trans device is presentmetastat -s meter p
Check any error is exist metastat -s meter any hard error
Check all the file system specifically using ls lrt
Confirmed with user and close the call.

How to do the disk cloning on solaris


Here is the procedure
install the disk
you can do this few ways, let's the scenario be, the disk is already attached and its been label through
format.
primary disk is u r c1t0d0s2
#dd if=/dev/dsk/c1t0d0s2 of=/dev/dsk/c1t1d0s2 bs=256k
This will take time, depends on the size of the primary disk
verfy the clone disk has a clean filesystem, for that
#fsck -y /dev/rdsk/c1t1d0s0
To verify that mount the clone disk
#mount /dev/dsk/c1t1d0s0 /mnt
change the /etc/vfstab to point to the clone device

16
#vi /mnt/etc/vfstab
After making changes, boot the clone disk -----Done

Backups
How will you take ufsdump and ufsrestore in a sing command line?
# ufsdump 0f - /dev/rdsk/c0t0d0s6 | (cd /mnt/prasad ufsrestore xf -)

To check the status of the media inseted on the tape drive


# mt /dev/rmt/0 status

Syntex to execute a ufsdump


# ufsdump 0uf /dev/rmt/1

Difference between ufs and tar commnad


ufsdump
1. Used for complete file system backup.
2. It copies every thing from regular files in a file system to special character and block
device files.
3. It can work on mounted or unmounted file systems.

Tar:
1. Used for single or multiple files backup.
2. Can't backup special character & block device files.
3. Works only on mounted file system.

How copy all the files to new filesystem


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

What is different between crontab and at command?


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

What is difference between incremental backup and differential backup?


Incremental: Only those files will be included which have been changed since the last backup.
Differential: Only those files will be included which have been changed since the last Full backup

How many ufsdump level


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

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

Options in 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

17
How will you comment error line in /etc/system file
# Vi /etc/system (To comment the error line in /etc/system files, we have to use *)

How will you come to know wheather hme 0r eri or to configuring the network card.
Base on Ethernet card
Disaster recovery steps if OS corrupted
Ok boot cdrom s
# newfs /dev/rdsk/c0t0d0s0
# mkdir a
# mount /dev/dsk/c0t0d0s0 /a
# cd a
# ufsrestore rf /dev/rmt/0
# rm restoresymtable
# cd /usr/platform/uname-m/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0
# cd /
# umount /a
# fsck /dev/rdsm/c0t0d0s0
# init 6

from the OK prompt, execute


OK> boot -r

How may will you find the process id and disk utilizations.
# pr

What is an alternative to the top command on Solaris?


# prstat a

Is it possible to edit the corntab using vi


It is not recommended but it is possible by editing
# vi /var/spool/cron/crontabs/root
The command to edit the crontab is
#crontab -e
How will you restrict the users from login when system in heavy load

Is it possible to create swap in new harddisk without format


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

Cannot open '/etc/path_to_inst'"


System can not find the /etc/path_to_install file .It might be missing or corrupted and needs to be
rebuild.
To rebuild this file boot the system with -ar option :
ok>boot -ar
Press enter to select default values for the questions asked during booting and select yes to rebuild
/etc/path_to_install
The /etc/path_to_inst on your system does not exist or is empty. Do you want to rebuild this file [n]? y
system will continue booting after rebuilding the file.

What are filed in vfstab


device to mount
device to fsck
mount point
FS type
fsck pass
mount at boot
mount options

How to check the sudo user

18
# sudo l

How edit the sudo


#/usr/local/sbin/visudo

Veritas
How to find the demo?
#Ps ef |grep vxvm

How to find the versions?


pkginfo -l VRTSvxvm

What are the daemons in VERITAS?


Vxconfigd
Vxiod
Vxrelocd

How to add disk on a rootdg


# vxdg -g rootdg adddisk newroot=c2t2d0

How to create a new dg


#vxdg init dgname disk=c2t2d0

How to mirror a root disk


Initialize a new disk
#devfsadm
#format (to label the disk)
#vxdctl enable
#vxdiskadm
Select option (2) to encapsulation
Reboot the server or
#vxencap Ac -g rootdg f sliced rootdisk=c0t0d0
After reboot
#vxdisksetup i diskname (c0t1d0)
#vxdg g rootdg adddisk rootnew=c1t0d0
#vxprint list
#vxrootmir rootnew

How to remove the mirrored root disk


#vxplex g bootdg o rm dis plexname
#vxdg g bootdg rmdisk mirror_disk_name
#vxdiskunsetup mirror_disk_name
Remove mirror disk, and replace.
#devfsadm Cv
#vxdctl int
#vxdctl enable
layout the new partitions on disk
#vxdisksetup i c0t1d0
#vxdg g bootdg adddiks rootmirror=c0t1d0
#vxrootmir rootmirror
for each other volume
#vxassist g bootdg mirror volname

Disk to recover
#vxrecover sn g dgname newdiskname
How to Unencapsulating root disk
Run the following command to prevent VxVM from starting up after reboot:
touch /etc/vx/reconfig.d/state.d/install-db
19
Detach second mirror
# vxplex -o rm dis opt-02 rootvol-02 swapvol-02 usr-02 var-02
unencapsulate a root disk that
#/etc/vx/bin/vxunroot
Reboot system #init 6
How to remove the root mirror disk permanently
#vxunroot
Reboot the system (it will remove the entries of VXVM from /etc/systems & Filesystem from /etc/vfstab)
Remove the plexes of the rootnew
#vxplex dis rootvol-02 (remove the plexes of the rootnew)

How to start the vxvm


#vxiod set 10
#vxconfigd m disable
#vxdct enable
Veritas will start

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


# prtvtoc -s /dev/rdsk/c2t2d0s2

Delete the rootalt volume from the new root disk.


# cd /
# umount /mnt
# vxvol stop rootalt
# vxplex dis rootvol-02 (Disassociate the plex from the volume and remove the volume.)
# vxedit rm rootalt
# vxsd dis newroot-01 (Disassociate the sub-disk from the plex and remove the plex.)
# vxedit rm rootvol-02

Mirror all the other volumes from the current root disk to the new root disk.Do not mirror swap volumes. Swap slices
will be created on the new disk manually. In this example, the volumes to mirror are var and opt.
# vxassist -g rootdg mirror var newroot
# vxassist -g rootdg mirror opt newroot

To find out the number of the disk available on veritas

#vxdisk -o alldgs list | more

How ill you create a subdisk and plexus


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

How you will identify that how may DG creation a particular VXVM version support
root on BUILD kirkcmis3 # vxdctl support
Support information:
vxconfigd_vrsn: 21
dg_minimum: 10
dg_maximum: 120
kernel: 15
protocol_minimum: 40

20
protocol_maximum: 60
protocol_current: 0

How will you recover the destroyed DG (devdg)


root on 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_62s2 char=/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
Defined regions:
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
Multipathing information:
numpaths: 1
vpath128c state=enabled

root on BUILD kirkcmis3 # cd /etc/vx/cbr/bk/ (the default repository for DG information)


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

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

Diskgroup devdg configuration restoration started ......

Installing volume manager disk header for c1t1d0s2 ...


Installing volume manager disk header for c1t2d0s2 ...
Installing volume manager disk header for c1t3d0s2 ...
Installing volume manager disk header for c1t4d0s2 ...
Installing volume manager disk header for c1t5d0s2 ...
Installing volume manager disk header for c1t6d0s2 ...
-
devdg's diskgroup configuration is restored (in a precommitted state).
Diskgroup can be accessed in read only and can be examined using
vxprint(1m) in this state.

Run:
21
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


Committing configuration restoration for diskgroup devdg ....

devdg's diskgroup configuration restoration is committed.


Once the configuration is restored, the volumes can be started, and the file systems that reside on
those volumes can be mounted.

How you will check the Free Space in the DG?



root on BUILD kirkcmis3 # vxassist -g devdg maxsize
Maximum volume size: 26624 (13Mb)

How will you check the Master node in VCS



root on BUILD kirkcmis3 # vxdctl -c mode
mode: enabled: clustered_state (Cluster inactive, Cluster active - role not set, cluster active - MASTER,
cluster active SLAVE)

How will you create the shared Disk group.



root on BUILD kirkcmis3# vxdg -s init sharedg share01=c3t0d4s2

I am Unable to create the share DG



What error messages the command is displaying?
A: Disk group sharedg: cannot create: Disk group version doesn't support feature; see
the vxdg upgrade command

Check the PROTOCOLVERSION


# vxdctl protocolversion
Cluster running at protocol 40
To upgrade the protocol version to the latest available version run vxdctl upgrade on the master
node:

How to export and import


Before the export or import, need to unmount the volume and stop the volume
#vxvol g dgname stopall
Export a disk group:
vxdg deport <dg name>
vxdg -h <hostame> deport <dgname> to export to another host
Import a disk group:
vxdg import <dg name>
vxdg -C to clear hostid of old host (When failing over in DR situation)
vxdg -fC to clear hostid of old host and forcing diskgroup online

What are the steps to be follow to add a disk in veritas & before add the disk what are the
steps to be follow
Before adding the disk,
take an output from the format command.
take an output of vxdisk list
after the disk is added, do the following:
#devfsadm
22
#format --> label the disk
#vxdctl enable
#vxdiskadm choose the option 1 and then it will ask you the diskgroup once it has been added it will
ask for the encapsulation, say no then it will ask the device name, assign the name, that's it,
#vxdisk list, this will tell the status of the newly added disk as online
How ill you remove the subdisk and plexus
to dissociate a subdisk try
vxsd dis disk##-##

remove a subdisk by
vxedit rm disk##-##

How will you grow a disk space whitout disturbs


#vxresize

How to find the VERITAS License?


After installing VERITAS, one should confirm with VERITAS license keys
#vxlicense p or #vxlicrep -g

How to install veritas license


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

How to create a new volume


Detect new disks
#devfsadm
#vxdiskadm - select option 1 to add new disks (Initialize new disks and add it to disk group appdg )
# vxassist g appdg make snetprd01 55g (create volume in appdg as snetprd01)
#mkfs F vxfs o largefiles /dev/vx/rdsk/appdg/snetprd01 (creating file system for the volumes
snetprd01)
# cd / (creating directories for snetprd01 )
#mkdir snetprd01
#chown oracle /snetprd01 (change the ownership to oracle for snetprd01 directories )
#vi /etc/vfstab
#mount /snetprd01
#df k
#mount p
#vxdisk list
##vxprint g appdg

How to remove the volume


Restore the previous /etc/vfstab
#cp /etc/vfstab.0702 /etc/vfstab
# umount /snetprd01 (Unmounting the files)
#rmdir /snetprd01 (Remove the mount points)
#vxvol g appdg stop snetprd01 (Stopping the volumes snetprd01 from appdg)
#vxedit g appdg v rm snetprd01 (removing volumes from disk group)
# df k
#vxprint -g appdg

Explain shrinking the disk


Shrinking the disk is nothing but reducing the allocated volume size

What is shrinking and how to shrink a volume?

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

Path fro multipathing.


/kernel/drv/scsi_vhci.conf
Approach 2 Veritas Snap Procedure

This approach can be used for both first time complete refresh and ongoing mirroring
process

Step 1: Create a VERITAS snap in the same


server at source system

Approach 2 Veritas Snap Procedure

Step 3: NFS mount the Mirror volume to the


remote server
Step 4: Make a copy of snap in the remote
server

Procedure for Snapshot Volume

24
1. Should know the volume name
2. Give new temporary snapshot volume name
3. Find the disk available space to copy the snapshot volume.

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

To display information about DB1, DB2 and DB3


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

Create a snapshot volume:- (Execute the below command to take snapshot)


# vxassist g <give the dg name> -b snapstart DB1 snapdb1
# vxassist g <give the dg name> -b snapstart DB1 snapdb2
# vxassist g <give the dg name> -b snapstart DB1 snapdb3

Verify snapshot is completed: ( it will show 2 number of plex for the volume)
# vxprint g <give the dg name> snapdb1
# vxprint g <give the dg name> snapdb2
# vxprint g <give the dg name> snapdb3

Detach the temporary snapshot and associated to new volume name


# vxassist g <give the dg name> snapshot snapdb1-02 snap-db1
# vxassist g <give the dg name> snapshot snapdb2-02 snap-db2
# vxassist g <give the dg name> snapshot snapdb3-02 snap-db3

Check the file system using fsck command


#fsck y /dev/vx/rdsk/<give the dg name> snap-db1
#fsck y /dev/vx/rdsk/<give the dg name> snap-db2
#fsck y /dev/vx/rdsk/<give the dg name> snap-db3

Make a temporary directory and mount the file system


#mkdir /prasadly
# mount /dev/vx/rdsk/<give the dg name> snap-db1 /prasadly

Edit the /etc/dfs/dfstab file and just added this entry:

# vi /etc/dfs/dfstab
share F nfs o rw= <server name> / snap-db3
share F nfs o rw= <server name> / snap-db3
share F nfs o rw= <server name> / snap-db3

Mount the file system to client or you can put the entre in /etc/vfstab on client side.

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

25
----------------End-----------------
If you want to take backup 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/<give the dg name> snap-db1

/ora1data/CUSMARP2 file system not able to mounted on veritas

Solution:-
veritas volume 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

How to recovering an unstartable mirrored volume


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

How to recovering an unstartable volume with a disable in the recover state


#vxmend g 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

How to forcibly restarting the disable volume


#vxvol g dgname o bg f start volume

How will you check reattachment is possible with out performing.


#vxreattach c

To find the file system version


#modinfo | gre vx

How to bring the existing data disk into VERITAS volume manger control.
Through Encapsulations method
26
How to change the mirror status from 0:1 to 0:5 and how?
#vxassist g dgname v volume name relayout layout=strip

Were the veritas disk information store.


#/kernel/drv/sd.cf

How to find the plex, sub disk, Volume group, disk status, free spaces, disk controller,
Volume controller?
Displays info about plexes
#vxprint -lp
#vxprint -l plex_name

Displays info about subdisks


# vxprint -st
#vxprint -l disk##-##

show disk iops over 10 seconds...


#ssaadm display -p c#

Traces all i/o on a volume..


#vxtrace vol

To report disk stats


#vxstat -d

Displays the free space on the disks


#vxdg free

Display the disk crontroller


#vxprint list
#vxprint -Aht

Tells you how much you can grow a volume by


#vxassist maxgrow vol

In VERITAS How to recover the mirror disk with data.

How to increase the size of the file system?


# df k ( dentify the VERITAS group and volume name of /myhr on EXU407 )
# vxassist g appdg maxsize (check for the free space available in the group appdg on EXU407 )
# vxprint thA g appdg (Check if /myhr is mirrored)
# mount p (check the file system of /myhr )
# cp p /etc/vfstab/etc/vfstab.070223 ((take backup of /etc/vfstab file )
you can increase the size of teh file system by using solaris volume manager
# vxresize F vxfs g rootdg myapps +5g (increase the size of /myapps by 5gb)

How to increase the size of the file system?


# vxresize F vxfs g rootdg myapps +5g (decrease the size of /myapps by 5gb)
#df -k
#vxresize b F vxfs ora03vol +70gb
What is encapsulation?
This is used to bring the disk under volume manager , which are already present in the system with
data but without volume manager . Data on these disks are not disturbed and if these disks meets
certain volume manager requirements these are added under volume manager

What is the difference between the VERITAS 3.0 and VERITAS 4.0?

27
In VERITAS 3.0 , the root dg is present by default
In VERITAS 4.0, the root dg has to be created manually
In Vertias 4.0 cdsdisk has introduced which means, in any os it can be exported

How to mirror a root dg? With eg


#vxrootmir

How to rename the old root disk. In this example, rootdisk is being renamed as rootold.
# vxedit -g rootdg rename rootdisk rootold

How to Encapsulate the new root disk (c2t2d0).


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

How to mirror and unmirror a disk?


#vxassist mirror prasadly disk05 disk06
uses disks5 and 6 ro make a mirror on volume called prasadly
#vxassist make prasadly 50m layout=mirror
makes a 50Mb mirror using any 2 disks

How to remove a disk group?

#vxdg destroy <disk group>

How to display the volume configuration information?


#vxprint -l rootdg

What is the command to identify master node on vcs


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

What is the nature of VCS?


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

What is the physical device to check the 2 nodes connect in cluster


Physical fiber cable which is connect to the 2 nodes is called a HOTBEAT

What is a resource?
Resource are h/w or s/w which work together to provide service to client in a client/server environment
It is monitored and controlled by vcs.

What is a service group?


It is a set of items (resource) working together to provided service (application, files and printer) to
client. Failure of one critical item in the service group will cause the entire group to fail over to another
system.

What is HA?
It is 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 the same configuration, if one
fails the other will take care the resources

How far VCS supports?


VCS supports more than 32 nodes.

What are the protocols in VCS


VRTSLLT (low latency) & VRTSGAB (Global autom)

28
How to clear the failing flag?
#vxedit set failing=off mydg02
#vxdisk list

How to create a snapshot mirror


snapstart starts creating a online snapshot mirror of the volume using the available disk space . The
snapshot is completed with vxassist snapshot command when offline snapshot volume is created with a
userdefined name.

Command Syntax: vxassist snapstart volume_name

To create a snapshot mirror of a volume called vol8, type

#vxassist snapstart vol8

How to bring the Disk into diskgroup on veritas.


Force a lip event on the hbas so they will re-login in Storage
luxadm e forcelip /dev/cfg/c5
luxadm e forcelip /dev/cfg/c7

Enable the disk devices.


vxdctl enable
vxdisk o alldgs list

initialize newdisk
vxdisksetup i <diskname>
Add disk to disk group
vxdg g oradg adddisk oradg05= <diskname>
vxdg g oradg adddisk oradg06= <diskname>

Verify free disk space


vxassist g oradg maxsize

How to create a snapshot volume

Command Syntax

vxassist snapshot volume_name new_volume_name

To create a snapshot volume of vol8, type:

#vxassist snapshot vol8 snapvol8

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

What are the types of cluster configuration?


1. Horizontal configuration
2. Vertical configuration

Command to find the VCS status


#hastatus sum

What are the minimum hardware requirements for cluster configuration?


Storage boxes 1

29
Node Cluster 2
Minimum 2 nodes, 2 etherned address, shared disk and HA applications (ex) oracle

What is the purpose of ha daemons in VCS servers?


Ha daemons are used to start/stop services in VCS servers

How to check the communication between 2 nodes?


Heart beat checks the communication between 2 nodes.
What is a heart-beat?
It is a script that checks the communication between nodes.
Heart-beat is a communication which can be set at the time of creating a system in a cluster, which can
send and receive signal through that designed port.
to check the heartbeat use the command gabconfig -a

What are the two types of service groups?


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

How to unconfigure llt and gab


#lltconfig U
#gabconfig -U
#hastop

How to start llt and gab


#lltconfig c
#gabconfig c -x
#hastart

How to start one node cluster.


Ok boot x

How to stop one node cluster exclusively


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

Were the vcs logs will be


#/var/VRTSvcs/log/engine_A.log

What are configuration files and to configure it in VCS


Configuration files:
Notes :- Before configuring VCS make sure the local_mac_address =true.
#eeprom local_mac_address?=true ( on both the nodes)

# /etc/llthosts (specify the node names)


(eg) 0 sun 1
1 sun 2

#/etc/llttab (specify the node names)


Set-node 0
Link qfe0 /dev/qfe:0 _ ether _ _
Link qfe1 /dev/qfe:1 _ ether _ _
set_cluster 10
Start

#/etc/gabtab (specify the node names)


/sbin/config c n 2

Path to be set = /etc/profile


#PATH=$PATH:/opt/VRTS/bin:/sbin:/opt/VRTSllt
#export PATH

30
#/etc/VRTSvcs/conf/config/main.cf
#/etc/VRTSvcs/conf/config/sysname
How to 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)

How to Switch service group between nodes


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

How to Freeze svcgroup, (disable onl. & offl.)


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

How to unfreeze the svcgroup, (enable onl. & offl.)


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

What is the command to check the connectivity between 2 nodes


Get the mac address from both the nodes
#getmac /dev/qfe:0
Sv from server side
Cv from client side

#./dlpiping sv /dev/qfe:0 macaddresss


#./dlpiping cv /dev/qfe:0 macaddresss

How to stop the VCS


#hastop local
#hastop local evaculate  100% shutdown the system
#hastop loca force without shutting down the application,only vcs can be down (hadaemon)

What are the service group dependence?


4types
Online local
Online remote
Online global
Offline global

How to delete a service group


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

How to add a group


#haconf makerw
#hagrp add groupname
#hagrp modify groupname systemList add node1 node2
#haconf dump -makero

If a main.cf files corrupted how will you rectify


#hastop all
Create a config file
#dtpad /etc/VRTSvcs/bin/sysname
#mkdir /etc/VRTSvcs/bin/sysname/config
#cp types.cf config
#cd config
#dtpad main.cf
#vi main.cf
Include types.cf
Cluster mycluster

31
System node1
System node2
Snmp mycluster
#hacf verify .
#hacf cftocmd .
#hastart
#hastatus sum

How to backup the VCS configuration Files


After configuration of the cluster VCS creates the following files on each node participating in the cluster
configuration
/etc/llthosts
/etc/llttab
/etc/gabtab
/etc/VRTSvcs/conf/config/main.cf
/etc/VRTSvcs/conf/config/types.cf
To take the back up of the cluster configuration files of all the node do the following procedure
 Go to the directory /opt/VRTS/bin
 Stop the cluster at all nodes
# hastop -all
 Fire the Backup Command
# hasnap -backup
want to dump VCS configuration before proceeding? : y
Name : snap.bak (name of the file in which Backup has to be taken up )
. (dot) ( as terminator)
do you want each file to backup to be confirmed (y/n): n ( choose the option)
Backup will be created in the directory /var/VRTSvcs/hasnap/data/repository/vcs

Now Start the Cluster on this terminal first by using the following command and use same
commands on each node
# hastart -force

How to restoring the Cluster configuration

Stop the cluster at all nodes


# hastop -all
start the process of restoring
# 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

T3 Storage
1)Vol add volname data undn raid n standby undn
2)Vol stat
3)Vol init volname data
4)Vol mount vol name
5)Vol list
6)Mkdir /dev/es
7)Luxadm insert
8)if above solaris 7 exclude the steps 6 & 7
9) format and partition .

How many controllers in 3510 storage.


4 channels
2 controllers

32
What is WWN on storage
World wide number _______________continues_____________________
To view the LUNs on a Solaris host, you need to use cfgadms
For example if you remove SB3 board on 6800 server for replaceing faulty memory or
faulty CPU
cfgadm -c unconfigure N0.SB3 ------For unconfigure 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 --for confirming removed or not
/N0/SB3/P2/B1/d2
cfgadm -c configure N0.SB3 ---After replacing to configure the same board
SSAADM:- ssaadm command is now link to the luxadm command

LUXADM:-
The Luxadm program is an administrative command that manages both the sun storage A5000 and
SPARC storage array disk arrays, Lunadm performa a variety of control and query task, depending on
the command-line arguments 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 cluster before running the above
command.

To confirm that the protocol version has been updated, the following can be run:
# vxdctl protocolversion
Cluster running at protocol 50

How will you check the status of LLT


#lltstat nvv

How will you check the status of GAB


#gabtab a

How to run dignostic for system board and processor board


Ok show-post-result

How to dettach the volum from veritas


#vxassist -F

Differance between 3.0 & 4.0 verision


before 3 roodisk should be named as rootdg itself ..after 4.0 you can name it as any thing u want

What is Multipathing
Multipathing is the use of redundant storage network components responsible for transfer of data between the server
and storage. ...Multipathing allows for two or more data paths to be simultaneously used for read/write operations,
enhancing performance by automatically and equally dispersing data access across all the available paths.

Splitbrain : If the private network fails there will not be connectivity between the nodes,
Qourm device will take place in this senario, Quarm devie have the information of both
the nodes. It will distroy one of the 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
one partition can exist with such a majority). After a node loses the race for quorum, that node panics.

To solve this probel


33
# vi llttab
Node

Seeding; It is use to protect the cluster in pre-existing network, One seeding system can run vcs
Automatic seeding #gabconfig c n < no of nodes>
Manual seeding #gabconfig c x

Amnesia: Guarantees that when a cluster is booted, it has at least one node that was a member of the
most recent cluster membership (and thus has the latest configuration data).

Jeopardy Defined
The design of VCS requires that a minimum of two heartbeat-capable channels be available between nodes to protect
against network failure. When a node is missing a single heartbeat connection, VCS can no longer discriminate
between a system loss and a loss of the last network connection. It must then handle loss of communications on a
single network differently from loss on multiple networks. This procedure is called "jeopardy." As mentioned
previously, low latency transport (LLT) provides notification of reliable versus unreliable network communications to
global atomic broadcast (GAB). GAB uses this information, with or without a functional disk heartbeat, to delegate
cluster membership. If the system heartbeats are lost simultaneously across all channels, VCS determines the system
has failed. The services running on that system are then restarted on another. However, if the node was running with
one heartbeat only (in jeopardy) prior to the loss of a heartbeat, VCS does not restart the applications on a new node.
This action of disabling failover is a safety mechanism that prevents data corruption.

I/O Fencing SCSI III Reservations - I/O Fencing (VxFEN) is scheduled to be included in the VCS 4.0 version. VCS
can have parallel or failover service groups with disk group resources in them. If the cluster has a split-brain, VxFEN
should force one of the subclusters to commit suicide in order to prevent data corruption. The subcluster which
commits suicide should never gain access to the disk groups without joining the cluster again. In parallel service
groups, it is necessary to prevent any active processes from writing to the disks. In failover groups, however, access to
the disk only needs to be prevented when VCS fails over the service group to another node. Some multipathing
products will be supported with I/O Fencing.

The cluster 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--stop failed
Group: pspd-rg phys-pspd2 Offline
=======================================================================
For clearing the STOP_FAILED flag ---- -c is for clear flag, -h for nodename, -j for
resource name, -f for error flag.

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


(if more then one resource showing error use this command every resource and then go to
next step)

For Bring down the resource group ----- (If bring down the resource group STOP_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 #
=======================================================================
To bring up the resource group--
root@phys-pspd1 # scswitch -Z -g pspd-rg
=======================================================================

34
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 Online Online
Resource: pspd-oralisten-res phys-pspd2 Offline Offline

SUN CLUSTER offline cluster resources on smslu131


verify resources are online on tgui1-svc
# scstat

Take all resources offline


# scswitch F g smsweb-rg

verify resources are offline on both tgui1 & tgui2


# scstat

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


# scstat

switch resources online on smslu131


#scswitch Z g smsweb-rg

verify resources are online on tgui1-svc


#scstat

verify resources are online on tgui1-svc


# scstat

Comunicate to OPS to ignore the alerts on this servers - phys-hhdc1 & phys-hhdc2.
ii) Switch back the resource group "hhda-rg" from phys-hhdc1 to 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

switch resources from smslu131 to smslu132


# scswitch z g smsweb-rg h tgui2-svc

verify resources are online on tgui2-svc


# scstat

switch resources from smslu131 to smslu132


# scswitch z g smsweb-rg h tgui1-svc

verify resources are online on tgui1-svc


# scstat

35