Posts

Showing posts from November, 2014

Solaris Zone(Containers) – Interview Questions

Here I would like to share interview questions regarding Solaris zones which will be normally asked for L2 level candidates in Solaris interviews. Now a days virtualization plays very important role in infrastructure market to reduce the data center space,power and utilizing hardware potentially. The virtualization goal is that utilizing the hardware without scarifying the application performance and reducing  the operational cost.  We will see some of the interview questions and its answer here.Stay tuned. Q 1.What are virtualization technologies  are supported by oracle ? A.  Please go through the oracle virtualization technologies  to understand various oracle virtualization products. Q 2. What is difference between global zone and non-global zone ?  A. Base Solaris operating system is called global zone.(Directly installed on phys...

How to configure the Guest domains on LDOM ?

Image
Guest domain is a top level virtual machine which we can create using the control domain. Guest domain will not perform any administrative operation on ldom but runs its own operating system  on it.Once you have completed the Oracle VM for SPARC tutorial 1 ,then you can start following  this article.We will see how we can create a new guest domain and allocate the resources to it. Oracle VM for SPARC Tutorial: Installation and Configuring the Primary domain Creating Guest Domains   (You Are Here) Configuring I/O Domain Dynamically adding/removing Resources Live Migration for Guest Domains Adding ISO image to Multiple Guests Configuration Backup & Restore Removing the LDOM and Services Creating the new Guest Domain 1. Login to the control domain which we have already configured . (Refer Oracle VM for SPARC tutorial 1  ) 2. You need to find out how much resources are available in the system.Use ldm list-devices -a command to get those d...

How do you troubleshoot if VCS cluster is not starting ?

Image
How do you start VCS cluster if its not started automatically after the  server reboot?  Have you ever faced such  issues ? If not just see how we can fix these kind of issues on veritas cluster. I have been asking this questions on the Solaris interviews but most of them are fail to impress me by saying some unrelated things with VCS stuffs. If you know the basic of veritas cluster, it will be so easy for to troubleshoot in real time and easy to explain on interviews too. VCS troubleshooting Scenario:  Two nodes are clustered with veritas cluster and you have rebooted one of the server. Rebooted node has come up but VCS cluster was not started (HAD daemon). You are trying to start the cluster using “hastart” command , but its not working.How do you troubleshoot ? Here we go. 1.Check the cluster status after the server reboot using “hastatus” command. # hastatus -sum |head Cannot connect to VCS engine 2.Trying to start the cluster using hasta...

Unix tip: Rescuing files from lost+found

The lost+found directory included in (Unix) file systems is usually empty. Only used when fsck doesn't know what to do with files that have lost their place in the file system, they stand as a temporary holding place for those rare instances in which fsck can't put everything back together after file systems have become corrupt in some way. If you see files in lost+found, you can expect them to look rather unusual. Take these files found on a Solaris 9 system after a panic and a subsequent fsck: -rw-r--r-- 1 johndoe staff 1576 Apr 22 11:26 #00805349 -rw-r--r-- 1 johndoe staff 4363 Apr 22 11:26 #00805350 -rw-r--r-- 1 johndoe staff 4566 Apr 22 11:26 #00805351 The names of these files were lost before fsck tried to piece things back together. The directory that had originally contained the salvaged files was, for some reason, not recoverable. And, since filenames are stored in directory files and nowhere else on ufs file systems, what we are able to recover fo...

Script to collect data before any change on UNIX system

#!/usr/bin/ksh # Purpose : Script to collect data before any change on UNIX system # #-------------------------------------------------------------------- # PATH=$PATH:/usr/contrib/bin HOMEROOT=`grep "^root:" /etc/passwd|cut -d: -f6` v=$(uname -s) case $v in   HP-UX) VENDOR=HP ;;   SunOS) VENDOR=Sun ;;   OSF1)  VENDOR=Compaq ;;   Linux) VENDOR=Linux ;;   AIX) VENDOR=IBM ;; esac # TIME=`date +%d_%m:%H_%M` # mkdir $HOMEROOT/CRQ/collected_data_$TIME # # Commands that can run on any flavour # ps -ef > $HOMEROOT/CRQ/collected_data_$TIME/ps.txt ps -ef|grep pmon > $HOMEROOT/CRQ/collected_data_$TIME/pmon.txt who > $HOMEROOT/CRQ/collected_data_$TIME/who.txt uptime > $HOMEROOT/CRQ/collected_data_$TIME/uptime.txt netstat -nvr >  $HOMEROOT/CRQ/collected_data_$TIME/netstatnr.txt netstat -ni >  $HOMEROOT/CRQ/collected_data_$TIME/netstatni.txt netstat -n >  $HOMEROOT/CRQ/collected_data_$TIME/netstatn.txt ntpq -p > $HOMEROOT/CRQ/coll...

Script to tune TCP parameters

#!/sbin/sh # # Script to tune TCP parameters. # #This Script should be placed in /lib/svc/method/site . /lib/svc/share/smf_include.sh # look if this host is backend system, because the tcp_time_wait_interval should be set to 20000 only on backend systems host=`uname -n` hostname_part=`echo ${host} | /usr/local/bin/egrep "^de2be|^dlbe|^rbe|^dnbe"` if [ "$hostname_part" != "" ] then         Interval=60000 else         Interval=60000 fi case "$1" in         'start')                 # Set optimized values                 echo "Tuning TCP/IP stack"                 /usr/sbin/ndd -set /dev/tcp tcp_fin_wait_2_flush_interval 675000       ...

Replace failed mirrored internal disk in AIX

The following procedure should be used to replace a failed internal (boot) disk on AIX 5 or higher, with software mirroring. (Note: in these examples, hdisk0 and hdisk1 are doubly-mirrored internal disks and members of rootvg; hdisk1 has failed) 1. Identify the failed disk by analyzing the errpt logs. Confirm the failure using lspv by checking if "PV State" is "Missing". 2. Break the mirror and remove the device from AIX: # unmirrorvg rootvg hdisk1 # reducevg rootvg hdisk1 # rmdev -l hdisk1 -d 3. Confirm that the device is no longer present using lspv. 4. Replace the disk drive, letting the new device take the same device name (hdisk1). 5. Add the new device into rootvg: # extendvg rootvg hdisk1 6. Re-mirror the volume group. No additional arguments are required to doubly-mirror the two internal disks. # mirrorvg rootvg 7. Re-add the boot image to the new internal disk: # bosboot -ad hdisk1 8. Re-add the new disk to the bootlist and confirm it is present: # bootlis...

Two ways to create mksysb images in AIX

1) create on NIM server command: nim -o define -t mksysb -a server=master -a source=<server name> -a mk_image=yes -a location=<location of the store image> <mksysb image name> This will create the mksysb image of the client server and define it on the NIM server. Example: nim -o define -t mksysb -a server=master -a source=edppbuslvd01 -a mk_image=yes -a location=/nim/mksysb/edppbuslvd01_6100-04-03-05112010 edppbuslvd01_6100-04-03-05112010 server =master: server to store image, in this case is master source =edppbuslvd01: the source of the image, which is client location : the location of the stored mksysb image 2) create on client machine and then copy to NIM server and define on NIM server, or NFS mount the filesystem from NIM server on the client server. let say you successfully NFS mount nim server filesystem on the client machine as /mnt. mksysb -ieX /mnt/edppbuslvd01_6100-04-03-05112010 -e: exclude the filesystem/dir that defined on /e...

Using find command

The command find is used to search a given directory for a file or a given expression mentioned in the command. we can also do necessary actions on the output files using xargs Some important options:      -xdev                                          Stay on the same file system (dev in fstab).     -exec cmd {} \;                            Execute the command and replace {} with the full path     -iname                                 ...

Sendmail Configuration in AIX

Daemon : sendmail To start the daemon : # startsrc -s sendmail -a "-bd -q30m" where bd - To start the sendmail as a SMTP mail relay router q - Is the interval in which the sendmail daemon processes the saved messages To start the daemon automatically after the system boot: a. # vi /etc/rc.tcpip b. Uncomment the below line start /usr/lib/sendmail "$src_running" "-bd -q${qpi}" To display the status of the daemon : # lssrc -s sendmail # ps -ef | grep sendmail To stop the daemon : # stopsrc -s sendmail # kill -1 `cat /etc/sendmail.pid` Configuration File: /etc/sendmail.cf - Where the hostname, Relay server name,... are stored. Alias File : /etc/aliases - Where the group(alias) to member mapping is stored. To Add the hostname in the sendmail configuration : a. Vi /etc/sendmail.cf b. Change "#DwYourHostName" to "Dw{hostname of local server}" c. # refresh -s sendmail To Add the mail (relay) server in the sendmail configuration : a. Vi /...

FC adapter firmware update in AIX

Image
The steps that are needed to be followed for FC adapter firmware update in AIX is show below    1) To check how many FC adapters are there, same can be used for (datapath) also lsdev –Cc adapter pcmpath query adapter(SDDPCM) or datapath query adapter(for SDD Device drivers) 2) To check Firmware Level of FC adapter lscfg –vpl fcs0   check for Z9 from above,Which is TS1.91A5   3) To find out what is the latest firmware level for FC adapter. Take part number from , lscfg –vpl fcs0      which is 03N7069 and search in google as below, The URL to find out firmware for above part number is http://support.bull.com/ols/product/platforms/escala/firmware/dev/fc/files/lp10000/df1000fa.191a5.html We need to check the below info from above URL Check part number from below which is affected or not check for firmware level and  here in this server we have latest firmware level 4) If...