Tuesday, 10 July 2012

unix/linux System Admin Interview Questions And Answers 2



SUNDAY, FEBRUARY 6, 2011

unix/linux System Admin Interview Questions And Answers 2


Q: - What is the difference between ext2 and ext3 file systems?

The ext3 file system is an enhanced version of the ext2 file system.
The most important difference between Ext2 and Ext3 is that Ext3 supports journaling.
After an unexpected power failure or system crash (also called an unclean system shutdown), each mounted ext2 file system on the machine must be checked for consistency by the e2fsck program. This is a time-consuming process and during this time, any data on the volumes is unreachable.
The journaling provided by the ext3 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. The only time a consistency check occurs using ext3 is in certain rare hardware failure cases, such as hard drive failures. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the journal used to maintain consistency. The default journal size takes about a second to recover, depending on the speed of the hardware.
Q: - Any idea about ext4 file system?

The ext4 or fourth extended filesystem is a journaling file system developed as the successor to ext3. Ext4 filesystem released as a functionally complete and stable filesystem in Linux with kernel version 2.6.28.
Features of ext4 file system:-
1. Currently, Ext3 supports 16 TB of maximum file system size and 2 TB of maximum file size. Ext4 have 1 EB of maximum file system size and 16 TB of maximum file size.
[An EB or exabyte is 1018 bytes or 1,048,576 TB]
2. Fast fsck check than ext3
3 In Ext4 the journaling feature can be disabled, which provides a small performance improvement.
4. Online defragmentation.
5. Delayed allocation
Ext4 uses a filesystem performance technique called allocate-on-flush, also known as delayed allocation. It consists of delaying block allocation until the data is going to be written to the disk, unlike some other file systems, which may allocate the necessary blocks before that step.
Q: - How we create ext3 file system on /dev/sda7 disk?

# mkfs –j /dev/sda7
Q: - Can we convert ext2 filesystem to ext3 file system?
Yes, we can convert ext2 to ext3 file system by tune2fs command.
                tune2fs –j   /dev/<Block-Device-Name>
Q: - Is there any data lose during conversion of ext2 filesystem to ext3 filesystem? 

No
Q: - How we will create ext4 file system?

# mke2fs -t ext4 /dev/DEV
Q: - Explain /proc filesystem?

/proc is a virtual filesystem that provides detailed information about Linux kernel, hardware’s and running processes. Files under /proc directory named as Virtual files. Because /proc contains virtual files that’s why it is called virtual file system.
These virtual files have unique qualities. Most of them are listed as zero bytes in size. Virtual files such as /proc/interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system's hardware. Others, like the /proc/filesystems file and the /proc/sys/ directory provide system configuration information and interfaces.
Q: - Can we change files parameters placed under /proc directory? 

Yes
To change the value of a virtual file, use the echo command and a greater than symbol (>) to redirect the new value to the file. For example, to change the hostname on the fly, type:

echo www.nextstep4it.com > /proc/sys/kernel/hostname 
Q: - What is the use of sysctl command?

The /sbin/sysctl command is used to view, set, and automate kernel settings in the /proc/sys/ directory.
Q: - /proc/ directory contains a number of directories with numerical names. What is that?

These directories are called process directories, as they are named after a program's process ID and contain information specific to that process.
Q: - What is RAID?
RAID, stands for Redundant Array of Inexpensive Disks. RAID is a method by which same data or information is spread across several disks, using techniques such as disk striping (RAID Level 0), disk mirroring (RAID Level 1), and disk striping with parity (RAID Level 5) to achieve redundancy, lower latency, increased bandwidth, and maximized ability to recover from hard disk crashes.

Q: - Why should we use RAID?

System Administrators and others who manage large amounts of data would benefit from using RAID technology.
Following are the reasons to use RAID
-   Enhances speed
-   Increases storage capacity using a single virtual disk
-   Minimizes disk failure

1 comment: