Unix terminals and shells – 1 of 5

This is an awesome series of Linux basics and internals. Even after working for 10 years as Unix Admin I find some new concepts, which I did not heard for many years

Advertisements

Solaris Intervew FAQ

Welcome to all who are pursuing their career as Solaris Unix Admin. Objective of this page is to create a one stop link for those preparing for Solaris Unix Admin interviews. Why to wait lets start the questions and answers

1. How to find the boot disk in Solaris ?
Ans: #prtconf -vp|grep boot

2. How will you check the drivers in solaris ?
Ans: #modinfo
(module information)

3. How will you replicate a file system in solaris ?
Ans: #ufsdump 0uf – /dev/rdsk/c0t1d0s0 | (cd /newmount; ufsrestore rf -)
(you need to create mount point /newmount before this command)

4. How will you check solaris system is 64bit or 32 bit ?
#isainfo -kv

5. How will you install bootblk image in solaris ?
# /usr/platform/`uname -i`/lib/fs/ufs/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/dsk/c0t0d0s0

6. How will you replicate the partitions of one disk into other disk ?
#prtvtoc /dev/rdsk/c0t1d0s2|fmthard -s – /dev/rdsk/c1t1d0s2

7. How will you check hard disk errors in solaris ?
#iostat -En|grep -i hard

8. How will you enable auto boot from OS ?
#eeprom auto-boot?=true
to disable
#eeprom auto-boot?=false

9. How will you set alternate boot disk from OS ?
#eeprom “nvrmrc=devalias mirrordisk
(physical path can be obtained from #echo|format command)

10. How will you get cpu information of solaris server ?
#psrinfo -v
in solaris 10 #psrinfo -vp will give more information

11. What is the solaris equivalent command of top ?
#prstat

12. How will you check the dual path solaris ?

if powerpath is installed use poermt command

#powermt display dev=all

(you will find powermt in /etc/powermt path)

if veritas is installed and configured throgh vxdmp adm then use it

#vxdmpadm listctlr all

# vxdmpadm getsubpaths dmpnodename=c2t1d0s2

Now in solaris 10 mpathadm available with package SUNWmpathadm, you can configure multipaths using this tool also. If  its configured you can used

#/usr/sbin/mpathadm show lu /dev/rdsk/c4t6xxxxxs2

Replace boot disk VxVM Solaris

http://www.unixway.com/vm/veritasvm/failedbootdisk.html

ok devalias
vx-rootmirror            /pci@1f,4000/scsi@3/disk@1,0:a
vx-rootdisk              /pci@1f,4000/scsi@3/disk@0,0:a
ok boot vx-rootmirror
vxvm:vxconfigd: WARNING: Detaching plex rootvol-01 from volume rootvol
# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t1d0s2 sliced rootmirror rootdg online - - rootdisk rootdg failed was:c0t0d0s2# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t1d0s2 sliced rootmirror rootdg online - - rootdisk rootdg failed was:c0t0d0s2vxprint -ht Disk group: rootdg
dg rootdg default default 0 1035555399.1025.pegasus dm rootdisk - - - - NODEVICE dm rootmirror c0t1d0s2 sliced 3359 17690400 -
v rootvol - ENABLED ACTIVE 13423200 ROUND - root pl rootvol-01 rootvol DISABLED NODEVICE 13423200 CONCAT - RW

Replace the disk
Once new disk is identified in format command
Run vxdctl enable (this will scan the system and identifies the new disk)

# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 sliced - - error c0t1d0s2 sliced rootmirror rootdg online - - rootdisk rootdg failed was:c0t0d0s2

Vxdiskadm (option 4)
4 Remove a disk for replacement
and then option 5
5 Replace a failed or removed disk
# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 sliced rootdisk rootdg online c0t1d0s2 sliced rootmirror rootdg online
dm rootdisk c0t0d0s2 sliced 3359 17690400 - dm rootmirror c0t1d0s2 sliced 3359 17690400 -

After about an hour, all of the plexes have been synchronized,
and full operating system redundancy has been restored: