Saturday, February 27, 2010

Creating RAID device

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi



H A P P Y H O L I



3. Create RAID device


Here we will create and format the RAID device. We will assume that we are using RAID 5 configuration, as described in step 2, where we have defined device file to be /dev/md2. Now we will create the file and then format it. The commands for this step will be as follows:


# mkraid -R /dev/md2

# mkfs -j /dev/md2


Note : The mkraid command will delete all data from all the associated partitions.


4. Mounting RAID device


Lastly, we will have to mount the file system on this partition:


# mkdir /my_raid

# mount /dev/md2 /my_raid


Else, if we want to mount /home on our new RAID device, we can run following commands:


# mkdir /temp_home

# cp -r /home /temp_home ( recursively copying, i.e. backing up home directory )

# mount /dev/md2 /home

# cp -r /temp_home /home


If we want it to be mounted automatically each time the system starts, add the following entry in /etc/fstab file:


LABEL=/home /home ext3 defaults 1 2


Thursday, February 25, 2010

Configure RAID using /etc/raidtab..

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi

H A P P Y H O L I

Configure RAID using /etc/raidtab- continued..

RAID 1


To get ultimate redundancy, in this level, we will include one spare disk. Assuming that two partitions, in array, are /dev/sdb1 and /dev/sdc1. /dev/sdd1 is spare partition:


raiddev /dev/md1

raid-level 1

persistent-superblock 1

chunk-size 8

nr-raid-disks 2

nr-spare-disks 1

device /dev/sdb1

raid-disk 0

device /dev/sdc1

raid-disk 1

device /dev/sdc2

spare-disk 0


RAID 5


This level can be implemented with large number of partitions. Here we will assume that we have one spare disk partition along with three RAID partitions. The RAID array disk partitions are /dev/sda1, /dev/sdb1 and /dev/sdc1, while the spare disk partition is /dev/sdd1.


raiddev /dev/md2

raid-level 5

persistent-superblock 1

chunk-size 8

nr-raid-disks 3

nr-spare-disks 1

device /dev/sda1

raid-disk 0

device /dev/sdb1

raid-disk 1

device /dev/sdc1

raid-disk 2

device /dev/sdd1

spare-disk 0

Wednesday, February 24, 2010

Configure RAID using /etc/raidtab

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi



2. Configure RAID using /etc/raidtab


After creating RAID partitions, we will have to configure /etc/raidtab file, which is very simple to configure. For configuring any of RAID level we will have to edit this file only. There are few pre defined commands to use in this file, which are as follows:


Commands used in /etc/raidtab


Command Details


raiddev: File name of RAID device

raid-level: RAID level, generally 0, 1 or 5

persistent-superblock 1: to detect this RAID array

chunk-size: Amount of data in KB, to be read or written

nr-raid-disks: Number of disks assigned to this array

nr-spare-disks: Number of extra disks assigned to this array

device: RAID partition device name

raid-disk Number (starting with 0): assigned to the partition in RAID array

spare-disk Number (starting with 0): assigned to the reserve partition in RAID array


Examples of configuring /etc/raidtab for different RAID levels:


# vi /etc/raidtab (To edit raidtab file)


RAID 0


To configure this level we will assume that we have two partitions named as /dev/sdb1 and /dev/sdc1. We also assume that we want to setup a chunk size of 16 KB:


raiddev /dev/md0

raid-level 0

persistent-superblock 1

chunk-size 16

nr-raid-disks 2

nr-spare-disks 0

device /dev/sdb1

raid-disk 0

device /dev/sdc1

raid-disk 1

Monday, February 22, 2010

Create RAID On previous versions

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

Click here for all Free Linux Downloads



Blog address for Linux in Hindi


Create RAID on previous versions of RedHat Linux


1. Create RAID partition


We can create RAID partitions either at the time of, or after Red Hat Linux installation. Let us assume that we have three SATA hard disks: /dev/sda, /dev/sdb, and /dev/sdc. Of these, Red Hat Linux is installed on /dev/sda. (Here we have assumed three disks. While we also can use three RAID partitions instead, which we could create at the time of installation). Using partitions does not ensure survival of data in case of physical damage to the disk.


To start with, we must have two or more partitions of roughly the same size. Once we have sufficient partitions for our RAID array, we can use fdisk to change partition type, suitable for RAID ( i.e. fd ).


Note: Changing the partition type, can destroy all the currently stored data on this partition.


After creating the partitions for RAID, we will have to format them. For example:


# mkfs -t ext3 /dev/sdc1


Or,


# mkfs -j /dev/sdc1


Repeat the above process of formatting for all the RAID partitions.