FakeRAID on ubuntu using dmraid

Setup:
RAID1 with two – 1TB Caviar Black disks. Configured the RAID SET from the RAID MENU, installed RAID drivers in Windows. On booting Ubuntu, disks are not being recognized.
Mainboad: M4A88TD-V EVO/USB3

Install dmraid to detect the FakeRaid

$sudo apt-get -y install dmraid

Checking for the module 

$sudo lsmod | grep raid
dm_raid45              75532  0
xor                     4685  1 dm_raid45

Ensure to select the following during RAID SET creation in the BIOS menu.

"Gigabyte boundary" to "NO" and "Fast Init" to "NO" 

Activated the raid

$sudo dmraid -ay
RAID set "pdc_gdiiehcgj" was activated
$ sudo dmraid -tay
pdc_gdiiehcgj: 0 1953394048 mirror core 2 131072 nosync 2 /dev/sdb 0 /dev/sdc 0 1 handle_errors

List all discovered RAID devices

$sudo dmraid -r
/dev/sdc: pdc, "pdc_gdiiehcgj", mirror, ok, 1953394048 sectors, data@ 0
/dev/sdb: pdc, "pdc_gdiiehcgj", mirror, ok, 1953394048 sectors, data@ 0

Display properties of RAID sets

$sudo dmraid -s
*** Active Set
name   : pdc_gdiiehcgj
size   : 1953394048
stride : 128
type   : mirror
status : ok
subsets: 0
devs   : 2
spares : 0

Creating partitions on the RAID-SET

$sudo fdisk /dev/mapper/pdc_gdiiehcgj
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb768a91d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/mapper/pdc_gdiiehcgj: 1000.1 GB, 1000137752576 bytes
255 heads, 63 sectors/track, 121593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb768a91d

                    Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-121593, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-121593, default 121593): 60796.5

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (60797-121593, default 60797):
Using default value 60797
Last cylinder, +cylinders or +size{K,M,G} (60797-121593, default 121593):
Using default value 121593

Command (m for help): p

Disk /dev/mapper/pdc_gdiiehcgj: 1000.1 GB, 1000137752576 bytes
255 heads, 63 sectors/track, 121593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb768a91d

                    Device Boot      Start         End      Blocks   Id  System
/dev/mapper/pdc_gdiiehcgj1               1       60796   488343838+  83  Linux
/dev/mapper/pdc_gdiiehcgj2           60797      121593   488351902+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Activating the newly created partitions now

$ sudo dmraid -ay
RAID set "pdc_gdiiehcgj" was activated
RAID set "pdc_gdiiehcgj1" was activated
RAID set "pdc_gdiiehcgj2" was activated

Testing for writing speed on the newly created FakeRAID partitions:

Copying an ISO from another HDD to EXT4 partition(pdc_gdiiehcgj1) from within Linux:

iso copy in to ext4

Copying the same ISO to the NTFS partition(pdc_gdiiehcgj2) from within Linux:

iso copy in linux to ntfs

Copying the same ISO to NTFS partition(pdc_gdiiehcgj2) from within Windows:

iso copy in windows

Conclusion: As it can be seen from the screenshots:

  • Copy rate was around 127MB/s when copying to an EXT4 on Linux.
  • Copy rate was around 28MB/s only when copying to a NTFS partition on Linux.
  • Copy rate was around 126MB/s when copying to the NTFS on Linux.

 

9 thoughts on “FakeRAID on ubuntu using dmraid”

  1. I have seagate expansion hard disk of 1 TB capacity.
    When I connect d cable it doesn’t mount and shows an error! Saying unable to mount
    Check wether d disk is soft/hard RAID .
    I AM NOT UNDERSTANDING What to do
    Please help me by mailing me d solution.
    I am using dual boot ubuntu 9.10 & ubuntu 12.04.
    I have important data on it.

    1. You can get a structure using fdisk -ls if you could boot up your system using a live cd. Could you check if you’re mounting the right partition. As for the software/hardware RAID, you may use sudo cat /proc/mdstat to check for software RAID and for Hardware raid, I would suggest that you check your bios first if your drives have been configured in the RAID mode.

Leave a Reply

Your email address will not be published. Required fields are marked *