Thursday, August 12, 2010

Linux Interview Questions:Disk management

 1) How to creat swap if you dont have free partation?
this is some what tricky question if you are new to Linux Administration
here is the command to create swap if you dont have free partation
before doing this you have switchoff the swap
swapoff -a
dd if=/dev/zero of=/root/swapfile bs=1k count=1024
swapon filename

2)How to see swap details?
   cat /proc/swap

3)How to see/get info about RAM in ur system
   cat /proc/meminfo

4)What is the difference between ext2 and ext3
 "journaling" is an add-on to a filesystem that records changes as they are made.
II)ext2 files system is fast
III)less disk writes
IV)ext2 file system in less stable/secure
V)ext2 file system required to run fsck command if the system get crashed

5)How to convert ext2 file system to ext3?
   tune2fs -j /dev/hda1
6)How convert ext3 file system to ext2
   tune2fs -O^has-journal /dev/hda1

7)What is default block/chunk size for PV

8)what is the command to update the diskquota on file system
   mount -o remount,rw /home

9)What is the partation type number for swap,RAID,LVM?

10)What is the default block site for ext2,ext3,LVM,RAID?

11)What is the difference between LVM1 and LVM2?

12)What is difference between RAID0,1,5?