Linked Search

Saturday, July 16, 2011

System Admin Questions 2

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.linuxexpertise.blogspot.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

Q: - What is the difference between hardware RAID and Software RAID?

The hardware-based RAID is independent from the host. A Hardware RAID device connects to the SCSI controller and presents the RAID arrays as a single SCSI drive. An external RAID system moves all RAID handling "intelligence" into a controller located in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI controller and appears to the host as a single disk.
Software RAID is implemented under OS Kernel level. The Linux kernel contains an MD driver that allows the RAID solution to be completely hardware independent. The performance of a software-based array depends on the server CPU performance and load.

Q: - What are the commonly used RAID types?

RAID 0
RAID 1
RAID 5

Q: - Explain RAID 0?
RAID level 0 works on “striping” technique. In RAID 0 the array is broken down into strips and data is written into strips. RAID 0 allows high I/O performance but provides no redundancy. RAID 0 Array Size is equal to sum of disks in array. If one drive fails then all data in the array is lost.

Q: - Explain RAID 1?
RAID Level 1 is based on Mirroring technique. Level 1 provides redundancy by writing identical data to each member disk of the array. The storage capacity of the level 1 array is equal to the capacity of one of the mirrored hard disks in a Hardware RAID or one of the mirrored partitions in a Software RAID. RAID 1 provides redundancy means good protection against disk failure. In RAID 1 write speed is slow but read speed is good.

Q: - Explain RAID 5?
RAID Level 5 is based on rotating parity with striping technique. RAID-5 stores parity information but not redundant data (but parity information can be used to reconstruct data). The storage capacity of Software RAID level 5 is equal to the capacity of the member partitions, minus the size of one of the partitions if they are of equal size. The performance of RAID 5 is based on parity calculation process but with modern CPUs that usually is not a very big problem. In RAID 5 read and write speeds are good.

Q: - Which kernel module is required for Software RAID?
“md” module


Q: - which utility or command is used for creating software RAID’s for RHEL5?
mdadm

Q: - Can we create software RAID during Linux installation?
Yes, we can create Software RAID during Linux Installation by “Disk Druid”

Q: - What is the role of chunk size for software RAID?
Chunk size is very important parameter on which RAID performance based.
We know stripes go across disk drives. But how big are the pieces of the stripe on each disk? The pieces a stripe is broken into are called chunks. To get good performance you must have a reasonable chunk size.
For big I/Os we required small chunks and for small I/Os we required big chunks.

Q: - What is SWAP Space?
Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.

Q: - What are the steps to create SWAP files or Partition?
- Create swap partition or file
- Write special signature using “mkswap
- Activate swap space by “swapon –a” command
- Add swap entry into /etc/fstab file

Q: - How you will create swap file of size 4 GB and explain swap file entry in /etc/fstab file?
Use “dd” command to create swap file.
dd if=/dev/zero  of=/SWAPFILE  bs=1024  count=4
mkswap /SWAPFILE
swapon –a
Entry into /etc/fstab file.
/SWAPFILE   swap   swap   defaults   0   0

Q: - Tell me the steps to remove the swap file?
Firstly disable the swap file by “swapoff” command.
Remove Swap file entry from /etc/fstab file.
Now remove the swap file by “rm” command.

Q: - What can we do with “parted” command or utility?
- View the existing partition table
- Add partitions from free space or additional hard drives
- Change the size of existing partitions

Q: - How we will check free space on drive /dev/sda with parted command?
#parted /dev/sda
print


For More Questions click here...