Server Topic
   >  Introduction to RAID
   >  Installing a RAID Software
   >  Creating RAID Partitions
   >  Creating the RAID Device
   >  Creating Logical Volumes
   >  Mounting Logical Volumes
   >  Auto Mounting RAID Arrays
   >  Testing a RAID1 Array
   >  Troubleshooting RAID1 Problems

 

Setting up RAID Partitions

Setting up RAID Partitions

The first step to setting up RAID 1, is to check you have at least two suitable devices available. For the sake of simplicity, I'm going to assume we have two 1Tb drives and that we want one single partition on one drive to mirror the other.

Use the following command to list the available devices:

sudo fdisk -l

This should yield a list of the devices attached to your system. We shall assume that the devices we wish to use are two identical devices on /dev/sdb and /dev/sdc and that the output from fdisk is as follows:

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xfd40e59e

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0e5dcf84

We now need to format /dev/sdb using:

sudo cfdisk /dev/sdb

A screen will display - select the "New" option:

New RAID Partition

We will accept the defaults to create a single partition over the whole disc - the new partition will be displayed in the window. Now, select the "Type" option:

Note: you can set up multiple partitions using the same method!

RAID Type Option

Type in "fd" (-for Linux RAID autodetect):

fd RAID Type Entered

The partition should now show as the correct type. select the "Write" option to save the configuration:

Write RAID Configuration

Finally, select the "Quit" option to exit cfdisk.

You will now need to re-run cfdisk and follow the same procedure for the remaining discs (-in our example, we'd just need to repeat it for /dev/sdc).

If all went well, you should see the partition listed when you re-run the sudo fdisk -l command:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976760001   fd  Linux raid autodetect
Partition 1 does not start on physical sector boundary.

References and Further Reading:


HomeSite IndexDesktop GuideServer GuideHints and TipsHardware CornerVideo SectionContact Us

 sitelock verified Firefox Download Button