Posts

Showing posts from September 8, 2010

RAID01 Vs RAID10

So what is the difference between RAID01 and RAID10 ? >>>>When we are dealing with RAID01 we are actually implementing RAID0 first then RAID1 on it. Ok little bit confused? Let me put it in this way RAID0 is nothing but stripeset writing of data and RAID1 is Mirring of data on to disks.For example lets take 8 disks, so first we are writing whole data on 4 disks then we are mirring it on to remaining disks. Where as in RAID10 we are first mirring disk and then striping data on mirrered disks In general RAID01 is "a mirrior of 2 strips" and RIAD10 is "a single strip on mirrered disks" So here one more question arises... which one is good? RAID10 is good, the difference is that the chance of system failure with two drive failures in a RAID 0+1 system with two sets of drives is (n/2)/(n - 1) where "n" is the total number of drives in the system. The chance of system failure in a RAID 1+0 system with two drives per mirror is 1/(...

Implementing RAID10 in Linux

RAID10 can be implemented by first implement RAID1(ie mirring) then implementing RAID0(stripeset on different disks) on it. Configuring RAID10 Step1:Get the info who many devices are participating, for example here we taken 4 disks(/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1). Step2:Implement RAID1 on four drives(taking 2 each) #mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd[ab]1 #mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[cd]1 Step3:Now implement RAID0 on two of RAID1 devices(/dev/md0,/dev/md1) #mdadm --create /dev/md2 --chunk=64 --level=0 --raid-devices=2 /dev/md[01] Step4:Format the RAID10 device with ext3 and mount the device #mke2fs -j /dev/md2 #mkdir /store #mount /dev/md2 /store Unconfiguring RAID10 Step1:Unmount the RAID device /dev/md2 #umount /dev/md2 or #umount /store Step2:Stop the RAID device #mdadm --manage /dev/md2 --stop #mdadm --manage /dev/md1 --stop #mdadm --manage /dev/md0 --stop Step3:Remove the Disks(/dev/sda1,/dev/sdb1,/dev/sdc1,/dev...

Configuring and Installing YUM server in RHEL4

If you are looking for YUM server in RHEL5 you can clickhere other wise just read on.. Recently I came across a strange issue.. ie implementing YUM(Yellow dog Updater and Modifier) server in RHEL4 :(. By the time of RHEL4 released there is no YUM server implementation.. so I did some research and collected some documentation on net and implemented YUM server in RHEL4 configuring YUM server in RHEL4 as follows.. Stpe1:Download following packages sqlite-2.8.16-1.2.el4.rf.i386.rpm python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm python-celementtree-1.0.2-1.2.el4.rf.i386.rpm yum-2.4.2-1.noarch.rpm yum-utils-0.3.1-1.fc4.noarch.rpm ( we need for repository) createrepo-0.3.1-1.noarch.rpm Stpe2: Install the above mention packages in the same sequence once you download them. rpm -Uvh sqlite-2.8.16-1.2.el4.rf.i386.rpm rpm -Uvh python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm rpm -Uvh python-urlgrabber-2.9.6-1.2...

Rsync Command ::: All Linux Admin Should Know

Recently I came accross rsync utility ... Its an awesome command it is a sub service under xinetd along with some other services such as tftp, rcp, rsh, rlogin, telnet etc.. Let us list advantages of this command then we will know how to configure it. Advantages of rsync : This tool will keep both the destination and source folder synced. rsync is fast, because it will not copy entire data every time it got synced, it just copes the date which got changed from previous copy. For security reasons, rsync will support ssh to transfer data between two machines. rsync is used to download RPM updated repository to local machine. And lot more advantages are there.. please share your valuable experiences here. Configuration : rsync Some points to be remembered when dealing with rsync This utility is the part of xinetd so there is no special package for this. When we are doing rsync between two systems, both the systems should be configured to allow rsync connecti...

Creating Virtual File System in Linux

Can we create a file system (i.e. formatting a drive/partition) with in a file system? Looks little bit strange is int it? So follow me I will show you how to create a virtual partition and file system within a partition. Step1 : Create a empty file with /dev/zero with size equal to 50Mb . #dd if=/dev/zero of=/temp/vf0 count=102400 Note : 1. By default "dd" command( d ataset d efinition) uses block of 512bytes so the size will be 102400*512=52 428 800=~50MB 2. /dev/zero is a device files which will be used create a file which conations "0" i.e. an empty file. Clipped output: [root@test6 ~]# dd if=/dev/zero of=/temp/vf0 count=102400 102400+0 records in 102400+0 records out [root@test ~]# ls -lh /temp/vf0 -rw-r--r-- 1 root root 50M Nov 7 12:08 /temp/vf0 Step2 : Create ext3 file system for this virtual partition. #mkfs -t ext3 /temp/vf0 Here it will ask "do you want to format the file or not"? , just say yes. Step3 : Now we have to ...

Info Related MBR and Taking its Backup

1.How to take the backup and restore MBR? Why do you require to take the backup of your MBR? Ans : MBR (Master Boot Recorder) is a vital part of your hard disk which contains booting information, without it its difficult to boot the system. Suppose you have windows and Linux duel boot on your machine and as you know windows is more prone to virus attacks. So it’s always better to backup your MBR to be in safe place. 2. How to take backup of your MBR? Ans : Using dd command ( d ataset d efinition). Here are the steps to take backup of you MBR and keep it in safe place to restore your system if it get corrupted. #dd if=/dev/hdx of=/safe/location bs=512 count=1 Let me explain the above command how it will work. “If” in the command is nothing but to specify Input File, here we are specifying our input file as hard disk(if the hard disk is /dev/hda it is primary master, so for general purpose I given 'x' ). “of” in the command is nothing but to specify Output File, ...