Tuesday, August 17, 2010

Good Collection Of Questions

 Differentiate RAID & JBOD?
RAID: “Redundant Array of Inexpensive Disks”
Fault-tolerant grouping of disks that server sees as a single disk volume
Combination of parity-checking, mirroring, striping
Self-contained, manageable unit of storage
 

JBOD: “Just a Bunch of Disks”
Drives independently attached to the I/O channel
Scalable, but requires server to manage multiple volumes
Do not provide protection in case of drive failure


        What is the difference between RAID 0+1 and RAID 1+0
RAID 0+1 (Mirrored Stripped)
In this RAID level all the data is saved on stripped volumes which are in turn mirrored, so any disk failure saves the data loss but it makes whole stripe unavailable. The key difference from RAID 1+0 is that RAID 0+1 creates a second striped set to mirror a primary striped set. The array continues to operate with one or more drives failed in the same mirror set, but if drives fail on both sides of the mirror the data on the RAID system is lost. In this RAID level if one disk is failed full mirror is marked as inactive and data is saved only one stripped volume.
RAID 1+0 (Stripped Mirrored)
In this RAID level all the data is saved on mirrored volumes which are in turn stripped, so any disk failure saves data loss. The key difference from RAID 0+1 is that RAID 1+0 creates a striped set from a series of mirrored drives. In a failed disk situation RAID 1+0 performs better because all the remaining disks continue to be used. The array can sustain multiple drive losses so long as no mirror loses both its drives.
This RAID level is most preferred for high performance and high data protection because rebuilding of RAID 1+0 is less time consuming in comparison to RAID 0+1.


Define RAID? Which one you feel is good choice?
RAID (Redundant array of Independent Disks) is a technology to achieve redundancy with faster I/O. There are Many Levels of RAID to meet different needs of the customer which are: R0, R1, R3, R4, R5, R10, R6.
Generally customer chooses R5 to achieve better redundancy and speed and it is cost effective.


R0 – Striped set without parity/[Non-Redundant Array].
Provides improved performance and additional storage but no fault tolerance. Any disk failure destroys the array, which becomes more likely with more disks in the array. A single disk failure destroys the entire array because when data is written to a RAID 0 drive, the data is broken into fragments. The number of fragments is dictated by the number of disks in the drive. The fragments are written to their respective disks simultaneously on the same sector. This allows smaller sections of the entire chunk of data to be read off the drive in parallel, giving this type of arrangement huge bandwidth. RAID 0 does not implement error checking so any error is unrecoverable. More disks in the array means higher bandwidth, but greater risk of data loss
R1 - Mirrored set without parity.
Provides fault tolerance from disk errors and failure of all but one of the drives. Increased read performance occurs when using a multi-threaded operating system that supports split seeks, very small performance reduction when writing. Array continues to operate so long as at least one drive is functioning. Using RAID 1 with a separate controller for each disk is sometimes called duplexing.
R3 - Striped set with dedicated parity/Bit interleaved parity.
This mechanism provides an improved performance and fault tolerance similar to RAID 5, but with a dedicated parity disk rather than rotated parity stripes. The single parity disk is a bottle-neck for writing since every write requires updating the parity data. One minor benefit is the dedicated parity disk allows the parity drive to fail and operation will continue without parity or performance penalty.
R4 - Block level parity.
Identical to RAID 3, but does block-level striping instead of byte-level striping. In this setup, files can be distributed between multiple disks. Each disk operates independently which allows I/O requests to be performed in parallel, though data transfer speeds can suffer due to the type of parity. The error detection is achieved through dedicated parity and is stored in a separate, single disk unit.
R5 - Striped set with distributed parity.
Distributed parity requires all drives but one to be present to operate; drive failure requires replacement, but the array is not destroyed by a single drive failure. Upon drive failure, any subsequent reads can be calculated from the distributed parity such that the drive failure is masked from the end user. The array will have data loss in the event of a second drive failure and is vulnerable until the data that was on the failed drive is rebuilt onto a replacement drive.
R6 - Striped set with dual distributed Parity.
Provides fault tolerance from two drive failures; array continues to operate with up to two failed drives. This makes larger RAID groups more practical, especially for high availability systems. This becomes increasingly important because large-capacity drives lengthen the time needed to recover from the failure of a single drive. Single parity RAID levels are vulnerable to data loss until the failed drive is rebuilt: the larger the drive, the longer the rebuild will take. Dual parity gives time to rebuild the array without the data being at risk if one drive, but no more, fails before the rebuild is complete.


What are the advantages of RAID? 
“Redundant Array of Inexpensive Disks”
Depending on how we configure the array, we can have the
- data mirrored [RAID 0] (duplicate copies on separate drives)
- striped [RAID 1] (interleaved across several drives), or
- parity protected [RAID 5](extra data written to identify errors).
These can be used in combination to deliver the balance of performance and reliability that the user requires.


What is a Firewall?
Firewall is a protective boundary for a network and it prevents the unauthorized access to a network. Most of the Windows operating system such as Windows XP Professional has built-in firewall utilities. There are the large number of the third party firewall software and the basic purpose of all the firewall software and hardware is same i.e. to block the unauthorized user access to a network.

What is DNS and how it works? -Network admin interview
DNS stands for Domain name system and it translates (converts) the host name into the IP address and IP address into to the host name. Every domain and the computer on the internet is assigned a unique IP address. The communication on the internet and in the network is based on the IP addresses. IP addresses are in this format 10.1.1.100, 220.12.1.22.3, 1.1.1.1 etc. IP addresses can’t be remembered but the host names are easy to remember instead of their IP addresses.

What is DHCP? --Network admin interview questions
DHCP stands for Dynamic Host Configuration Technology. The basic purpose of the DHCP is to assign the IP addresses and the other network configuration such as DNS, Gateway and other network settings to the client computers. DHCP reduces the administrative task of manually assigning the IP addresses to the large number of the computers in a network.

Apache Interview Questions
1. On a fresh install, why does Apache have three config files - srm.conf, access.conf and httpd.conf? 
The first two are remnants from the NCSA times, and generally you should be ok if you delete the first two, and stick with httpd.conf.
2. What’s the command to stop Apache? - kill the specific process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop.
3. What does apachectl graceful do? - It sends a SIGUSR1 for a restart, and starts the apache server if it’s not running.
4. How do you check for the httpd.conf consistency and any errors in it? - apachectl configtest
5. When I do ps -aux, why do I have one copy of httpd running as root and the rest as nouser? - You need to be a root to attach yourself to any Unix port below 1024, and we need 80.
6. But I thought that running apache as a root is a security risk? - That one root process opens port 80, but never listens to it, so no user will actually enter the site with root rights. If you kill the root process, you will see the other kids disappear as well.
  7. Why do I get the message “… no listening sockets available, shutting down”? - In Apache 2 you need to have a listen directive. Just put Listen 80 in httpd.conf.
   8. What is ServerType directive? - It defines whether Apache should spawn itself as a child process (standalone) or keep everything in a single process (inetd). Keeping it inetd conserves resources. This is deprecated, however.
9. What is mod_vhost_alias? - It allows hosting multiple sites on the same server via simpler configurations.
10. What does htpasswd do? - It creates a new user in a specified group, and asks to specify a password for that user.
11. If you specify both deny from all and allow from all, what will bethe default action of Apache? - In case of ambiguity deny always takes 

Linux interview Questions,Faqs 
What text filter can you use to display a binary
How can you find configuration on Linux?

What utility can you use to automate rotation of logs?
What file should you examine to determine the
Where standard output is usually directed?
Which distro you prefer?
What is the minimum number of partitions you need
Explain about TAR Command?
What is LILO?
What are RPM’s?
Which Linux distros do you have experience with?
How can you see all mounted drives?
What command can you use to review boot messages?
What does ‘route’ command do?
What is the difference between TCP and UDP
What is the complete name of the default configuration
How you will uncompress the file?
What are the Advantages and disadvantages of

What utility should use to create a compressed
What is the most graceful way to get to run level
What is the difference between home directory
Set the Display automatically for the current new user?

What does the top command display?
Why have you chosen such a combination of products?
How does the boot process [init levels] work on Linux?
Display the Disk Usage of file sizes under each
What is the difference between an argument and an option/switch?
What is the name and path of the main system log?

Shell Scripting Interview Questions
What is Path variable?
What is MUTEX?
What are special characters?
How do you schedule a command to run at 4:00
What is the use of Path variable?
What is the need of including script interpreter
What does $# stand for?
What are environment variables?
What is the syntax of "grep" command?
How to create environment variables?
Explain how does text varies by the usage of single quotes

What is egrep?
How would you replace the n character in a file with some xyz?
What are the different shells available?
What are the additional egrep symbols?
What is the difference between a variable and value?
What is the use of "exec" command?
What is "umask"?
What is the use of "shift" command in passing parameters?
What is the difference between a 'thread' and a 'process'?
How will you list only the empty lines in a file?
What is the use of "test" command?
What is use of "cut" command?
How do you read arguments in a shell program - $1, $2 ..?
How to change our default shell?
How to print some text on to the screen?
What does it denotes in shell scripting if text
Write a shell script to identify the given string
How to customize the other shell?
What are the different methods available to
How to group the commands in shell scripting?

What is the difference between writing code
What is the difference between a shell variable
How to customize the existing shell?
What are the conditions for creating variables?
How to take input values from the user?
What is the syntax of "expr" command?
What are the three main forms of enabling
What is INODE?
What are the different kinds of loops available
What are the advantages of bash over all other shells?

When we login into our account which files are
How to include comments in your shell scripts?
What is the use of script interpreter in shell scripting?
What is the basic difference you find between

What are the Different types of shells?
When you login to a c shell, which script would
How to make user defined variables to available
How to modify the PATH variable and make it executable?
How to declare functions in UNIX shell script?

Unix interview Questions,Unix interview faqs
What is pid ?
What does a process mean ?
Explain UNIX System Kernel ?
What is a zombie ?

Explain ‘UNIX is a portable os' ?
What is the difference between a soft link and
WHAT is kernel ?
What happens when you execute a command ?
WHAT is the use of "fg" command ?
What is iostat ?
What is IPC ?
What is the procedure of "at" and crontab" commands ?
What are threads ?
What does the “route” command do ?
What is Fork swap ?
How do you remove a crontab file ?
How to recover a system whose root password has lost ?
What is a FIFO ?
How do you execute one program from within another ?
How to create hardlinks and softlinks on files ?
What is the difference between physical addresses
What is an inode ?
What is the significance of "su" command ?
How to list only the directories inside a directory ?
WHAT is the very first process created by kernel ?
What are Profilers ?
What is the command to edit contents of the file ?
What are the main families of threads ?
What is tar command ?
Which command is used to stop a running process in UNIX ?
How to view the hidden files in /etc directory ?
What is egrep ?

What is the command that will make the file "run.sh" executable ?
What is the use of uniq command ?
WHAT is the use of wild cards ?
What are default permissions for others in a file ?
What is netstat ?
Explain fork () system call ?
What is a Map ?
What do you understand by 'building block primitive' ?
What is 'inode' ?
What is a Daemon ?
What are the UNIX system calls for I/O ?
What are processor execution levels and priorities ?
How do you execute UNIX commands in VI editor ?
How to connect oracle database from UNIX
How do you find out all processes that are currently
What is Scheduling ?
What is the use of command 'wc' ?
How to get the operating system's information in UNIX ?
How to remove weird filenames ?
What are the files in /etc directory ?
What does inetd do ?
How to copy multiple files and directories into
What command will bring user back to their home
What are filters ?
What is a level 0 backup ?
How do you install Oracle software on UNIX ?
What is a Region ?
What is the difference between interrupts and exceptions ?
What is the use of pipes ?
Explain the Write permission on a UNIX directory ?
What is telnet ?
WHAT is the functionality of kernel in UNIX architecture ?
What is the syntax of grep command and What is its use ?
What is a file system ?
What are wild cards ?
What are the different commands used to view

What is a pipe ?
WHAT is the condition required for dead lock in UNIX system ?
What are the events done by the Kernel ?
What are the different kinds of threads ?
How do you log in to a remote UNIX box ?
WHAT are the uses of filters ?
How will you add a user account from command line ?
What is the use of "test" command in UNIX ?
What Command will remove a Directory in UNIX ?
Explain the execute permission on a UNIX directory ?
What is the command to kill a process ?
What scripting languages do you know ?
What is the difference between commands cmp and diff ?
WHAT is the use of nice command ?
How to rename files and folders ?
What is an incremental backup ?
What is vmstat ?
How do you create special files like named pipes
What is the difference between Swapping and Paging ?
What is Expansion swap ?
What is the difference between multi-tasking,
What command is used to replace the existing
What is the command to display space usage on
What is the difference between internal and
What is Critical section ?
How to identify whether a file is normal file or directory ?
What is RAID 1+0 ?
What UNIX command will control the default file
What about the initial process sequence while
What do you mean by nice value ?
Which command will you use to change the
How does a user get the current date, time in UNIX ?
What steps are required to perform a bare-metal recovery ?
Explain about fork() ?
What are the processes that are not bothered by the swapper ?
What is virtual machine ?
How do you move a process Which is running background to foreground ?
What is the basic difference between UNIX and
How does the user view the contents of a text file in UNIX ?
What is the command to list files in a directory in UNIX ?
What is the difference between > and >> operators ?
What is the function of grep command ?
How to redirect standard error to a file ?
WHAT is shell ?
What are the read or write or execute bits on a
How can you get or set an environment variable
What are the various schemes available in IPC ?
How do you know about running processes of a
What is the Command that will move a single file called "UNIX.txt"
How would you change all occurrences of a value using VI ?
What is Context switch ?
Which command is used to change group ?
WHAT are the different commands used to create files ?
How to put a job in background & bring it to foreground ?
What are the mount and unmount system calls ?
How to setup display for a remote system ?
How do you copy a directory with many files and
What is the command to remove directory with files ?
What does init do ?
What is the difference between relative path and
What is the difference between "cron" commands
How to delete a directory containing files and folders ?
What is the difference between grep & find ?
How would you change all occurrences of a value using VI ?
What is an advantage of executing a process in background ?
What is the advantage of each user having its
Write a command to find all of the files Which have
What Command is used to make a directory ?
What is the command to get help on a UNIX terminal ?
What are the different types of tar commands ?
WHAT is the use of "grep" command ?
How do you change your account's password ?
What does iostat do ?
How can a parent and child process communicate ?
What are various IDs associated with a process ?
How do you find path of a directory ?
What command a user use to view a long text file
What is the command to list all files in a directory,
What is setuid/setgid in relation to file permissions ?
What is the use of ‘tee’ command ?
WHICH command is used to identify the type of the file ?
What are the main differences between Apache 1.x and 2.x ?
What is the command to view contents of a large
What is the command to find out the difference
What does the second field denotes in UNIX file permissions ?
What are the differences between CUI and
WHAT is a profile ?
WHAT is the process id for kernel process ?
How does the inode map to data block of a file ?
What is the system calls used for process management ?
What is the main advantage of creating links to a
What command is used to execute system calls from exe ?
How do you execute a UNIX command in the background ?
What does mknod do ?
How to convert a hidden file to normal visible file ?
WHAT are the different operating systems available ?
WHAT happens when we create a file system ?
How do you list the files in an UNIX directory while
How are devices represented in UNIX ?
What do you mean by user area or user block ?
What is the difference between user mode and kernel mode ?
How to get a particular string as your prompt ?
What are raw sockets ?
What command would users use to see What file
How to copy file into directory in UNIX ?
What is the command to find out Which shell you are running ?

Explain the read permission on a UNIX directory ?
What are the process states in UNIX ?
What is the difference between paging and swapping ?
Explain about term 'de-mountable volumes' ?

Unix/Linux system admin interview questions
Q: How would you make the following SQL statement run faster? SELECT * FROM TABLEA WHERE COL1=’A’ AND COL2=’B’;
A: Make sure that COL1 and COL2 have indexes.
Find out which condition will return less values and use that as the first conditonal.

Q: What is Data Mining

A: Data Minig is the process of sifting through extremeley large amounts of Data to find trends or relevent information.

Q: Name the Seven layers in the OSI Model.

A: Appication, Presentation, Session, Transport, Network, Data Link, Phyiscal

Q: What is one way to view a unix network share on a Windows computer, within explorer
A: NFS, The Unix computer can be running a NFS Server Daemon.

Q: How would you find all the processes running on your computer.

A: Unix, is ps -ef or ps -aux depending on version.

Q: What is DHCP
A: DHCP is a way to dynamically assign IP address to computers. Dyanmic Host Configuration Protocol

Q: What is HTTP Tunneling
A: HTTP Tunneling is a security method that encryptes packets traveling throught the internet. Only the intended reciepent should be able to decrypt the packets. Can be used to Create Virtual Private Networks. (VPN)

Q: Scenario: You have 9 identical looking balls, however one ball is heavier than the others. You have two chances to use a balance. How do you find out which ball is the heaviest?
A: Split into groups of three, randomly choose two groups and use balance on them. If one group is heavier, then discard the other 6 balls. If the two groups are the same weight. The heavier ball must be in the group that was not on the scale. Now randomly choose two balls and test on balance. If they are the same weight, the heaviest ball is on one that was not tested. Else the heaviest ball is already known from the balance.

What is LILO? -Linux admin interview question
LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and hard drive to boot from.

What is a router? What is a gateway?
Routers are machines that direct a packet through the maze of networks that stand between its source and destination. Normally a router is used for internal networks while a gateway acts a door for the packet to reach the ‘outside’ of the internal network

Linux Administrator Interview questions
1)Advantages/disadvantages of script vs compiled program.
2)Name a replacement for PHP/Perl/MySQL/Linux/Apache and show main differences.
3)Why have you choosen such a combination of products?
4)Differences between two last MySQL versions. Which one would you choose and when/why?
5)Main differences between Apache 1.x and 2.x. Why is 2.x not so popular? Which one would you choose and when/why?
6)Which Linux distros do you have experience with?
7)Which distro you prefer? Why?
8)Which tool would you use to update Debian / Slackware / RedHat / Mandrake / SuSE ?
9)You're asked to write an Apache module. What would you do?
10)Which tool do you prefer for Apache log reports?
11)Your portfolio. (even a PHP guest book may work well)
12)What does "route" command do?
13)Differences between ipchains and iptables.
14)What's eth0, ppp0, wlan0, ttyS0, etc.
15)What are different directories in / for?
16)Partitioning scheme for new webserver. Why?