So last week I finally got around to re-formatting my system. I had been running a dual-boot with Ubuntu 7.04 and Windows XP for a while, but had finally reached that point after so much playing around with new software and settings that it was time for a fresh start. This time however I decided to try something new. The motherboard I have, a somewhat dated Asus p4c800-e Deluxe, has a built-in RAID controller (Promise 20378 RAID / FastTrak 378). Since I’ve never tried using raid before, and I had a couple of drives that were similar in size, I decided to give it a shot.
- A separate RAID controller (“Hardware RAID”)
- Built-in Motherboard controller (“fakeRAID” or “SATA RAID”)
- Linux Software RAID
- Raid0
- Raid1
- Raid5
etc.,
Since the RAID controller I have is built-in to the motherboard, I decided to try and setup a FakeRaid array. Software RAID would have been possible too, but I wanted something that Windows could run on as well. I had no critical data on my machine, and was only looking to get a boost in performance, so I chose to go with RAID level 0.
So here goes…
- Setup a Raid0 Array between two 300 GB drives (A single 600 GB array) using the Onboard Controller (Promise Fasttrak 378) software.
- Install Windows XP (have to load the drivers from a floppy disk during the install for the array to be detected).
- Attempt to shrink the NTFS partition currently filling the entire array in order to make room for Ubuntu.
- At first I try Gparted Live! And the regular Ubuntu Live! CD but neither are able to recognize the raid partition. After reading around a little more I find out that you have to manually install RAID support (dmraid) before doing any partitioning. I Load the dmraid packages as per this guide and Ubuntu can now see the raid array! (Yay- Almost there!)
- Run ntfsresize to resize the partition.
ubuntu@ubuntu:/mnt$ sudo ntfsresize -s 100000000000 /dev/mapper/pdc_deibjeiej1 ntfsresize v1.13.1 (libntfs 9:0:0) Device name : /dev/mapper/pdc_deibjeiej1 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 600165745152 bytes (600166 MB) Current device size: 600165748224 bytes (600166 MB) New volume size : 99999994368 bytes (100000 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 30049 MB (5.0%) Collecting resizing constraints ... Needed relocations : 1369630 (5611 MB) WARNING: Every sanity check passed and only the dangerous operations left. Make sure that important data has been backed up! Power outage or computer crash may result major data loss! Are you sure you want to proceed (y/[n])? y Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Relocating needed data ... 100.00 percent completed Updating $BadClust file ... Updating $Bitmap file ... Updating Boot record ... Syncing device ... Successfully resized NTFS on device '/dev/mapper/pdc_deibjeiej1'. You can go on to shrink the device for example with Linux fdisk. IMPORTANT: When recreating the partition, make sure that you 1) create it at the same disk sector (use sector as the unit!) 2) create it with the same partition type (usually 7, HPFS/NTFS) 3) do not make it smaller than the new NTFS filesystem size 4) set the bootable flag for the partition if it existed before Otherwise you won't be able to access NTFS or can't boot from the disk! If you make a mistake and don't have a partition table backup then you can recover the partition table by TestDisk or Parted's rescue mode. - Run fdisk to try and re-create the partition table– doh! This is where the real problems begin. Examining the RAID array with fdisk gives some strange results:
ubuntu@ubuntu:/mnt$ sudo fdisk /dev/mapper/pdc_deibjeiej1 The number of cylinders for this disk is set to 72965. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/mapper/pdc_deibjeiej1: 600.1 GB, 600165748224 bytes 255 heads, 63 sectors/track, 72965 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes This doesn't look like a partition table Probably you selected the wrong device. Device Boot Start End Blocks Id System /dev/mapper/pdc_deibjeiej1p1 ? 13578 119522 850995205 72 Unknown Partition 1 does not end on cylinder boundary. /dev/mapper/pdc_deibjeiej1p2 ? 45382 79243 271987362 74 Unknown Partition 2 does not end on cylinder boundary. /dev/mapper/pdc_deibjeiej1p3 ? 10499 10499 0 65 Novell Netware 386 Partition 3 does not end on cylinder boundary. /dev/mapper/pdc_deibjeiej1p4 167628 167631 25817+ 0 Empty Partition 4 does not end on cylinder boundary. Partition table entries are not in disk order
Running Gparted is not much help either:

.
.
.
After several failed attempts at creating the the desired partition table (I have to be especially careful if I don’t want to corrupt my Windows install), I finally got it right! Even with the Ubuntu alternate install CD, fdisk still gave me a bunch of nonsense initially (Since when did I install Novel Netware?!). Rather than try to determine the reason why fdisk is giving such strange output though I decide to do the right lazy thing and just delete all that garbage. /shrug… It worked in the end so I guess it wasn’t anything important.
To work in sectors, I divided the number of bytes by 512. So the entire drive which was 600165748224 bytes consisted of 1172198727 sectors. To make the job easier, I did the calculations beforehand to see how many sectors were in 100Gb, 50Gb, 2Gb, etc– those are the sizes I need to use for creating the partitions.
ubuntu@ubuntu:~$ sudo /sbin/fdisk /dev/dm-1
The number of cylinders for this disk is set to 72965.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): u
Changing display/entry units to sectors
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders, total 1172198727 sectors
Units = sectors of 1 * 512 = 512 bytes
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/dm-1p1 ? 218129509 1920119918 850995205 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/dm-1p2 ? 729050177 1273024900 271987362 74 Unknown
Partition 2 does not end on cylinder boundary.
/dev/dm-1p3 ? 168653938 168653938 0 65 Novell Netware 386
Partition 3 does not end on cylinder boundary.
/dev/dm-1p4 2692939776 2692991410 25817+ 0 Empty
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Partition number (1-4): 2
Command (m for help): d
Partition number (1-4): 3
Command (m for help): d
Selected partition 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-1172198726, default 63):
Using default value 63
Last sector or +size or +sizeM or +sizeK (63-1172198726, default 1172198726): +195312500
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders, total 1172198727 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/dm-1p1 63 195312563 97656250+ 83 Linux
Command (m for help): a
Partition number (1-4): 1
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders, total 1172198727 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/dm-1p1 * 63 195312563 97656250+ 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First sector (195312564-1172198726, default 195312564):
Using default value 195312564
Last sector or +size or +sizeM or +sizeK (195312564-1172198726, default 1172198726): +683593750
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders, total 1172198727 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/dm-1p1 * 63 195312563 97656250+ 83 Linux
/dev/dm-1p2 195312564 878906314 341796875+ 83 Linux
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): L
0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / .
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3 75 PC/IX
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 0
Type 0 means free space to many systems (but not to Linux). Having partitions of type 0 is probably unwise. You can delete a partition using the `d' command.
Changed system type of partition 2 to 0 (Empty)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 3
First sector (195312564-1172198726, default 195312564):
Using default value 195312564
Last sector or +size or +sizeM or +sizeK (195312564-1172198726, default 1172198726): +195312500
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First sector (195312627-390625064, default 195312627):
Using default value 195312627
Last sector or +size or +sizeM or +sizeK (195312627-390625064, default 390625064): +3906250
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First sector (199218941-390625064, default 199218941):
Using default value 199218941
Last sector or +size or +sizeM or +sizeK (199218941-390625064, default 390625064): +97656250
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First sector (296875255-390625064, default 296875255):
Using default value 296875255
Last sector or +size or +sizeM or +sizeK (296875255-390625064, default 390625064):
Using default value 390625064
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders, total 1172198727 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/dm-1p1 * 63 195312563 97656250+ 7 HPFS/NTFS
/dev/dm-1p2 195312564 878906314 341796875+ 0 Empty
/dev/dm-1p3 195312564 390625064 97656250+ 5 Extended
/dev/dm-1p5 195312627 199218877 1953125+ 83 Linux
/dev/dm-1p6 199218941 296875191 48828125+ 83 Linux
/dev/dm-1p7 296875255 390625064 46874905 83 Linux
Command (m for help): t
Partition number (1-7): 5
Hex code (type L to list codes): 0
Type 0 means free space to many systems (but not to Linux). Having partitions of type 0 is probably unwise. You can delete a partition using the `d' command.
Changed system type of partition 5 to 0 (Empty)
Command (m for help): t
Partition number (1-7): 6
Hex code (type L to list codes): 0
Type 0 means free space to many systems (but not to Linux). Having partitions of type 0 is probably unwise. You can delete a partition using the `d' command.
Changed system type of partition 6 to 0 (Empty)
Command (m for help): t
Partition number (1-7): 7
Hex code (type L to list codes): 0
Type 0 means free space to many systems (but not to Linux). Having partitions of type 0 is probably unwise. You can delete a partition using the `d' command.
Changed system type of partition 7 to 0 (Empty)
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders, total 1172198727 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/dm-1p1 * 63 195312563 97656250+ 7 HPFS/NTFS
/dev/dm-1p2 195312564 878906314 341796875+ 0 Empty
/dev/dm-1p3 195312564 390625064 97656250+ 5 Extended
/dev/dm-1p5 195312627 199218877 1953125+ 0 Empty
/dev/dm-1p6 199218941 296875191 48828125+ 0 Empty
/dev/dm-1p7 296875255 390625064 46874905 0 Empty
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.
Syncing disks.
ubuntu@ubuntu:~$ sudo /sbin/fdisk /dev/dm-1
The number of cylinders for this disk is set to 72965.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/dm-1: 600.1 GB, 600165748224 bytes
255 heads, 63 sectors/track, 72965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/dm-1p1 * 1 12158 97656250+ 7 HPFS/NTFS
/dev/dm-1p2 12158 54710 341796875+ 0 Empty
/dev/dm-1p3 12158 24316 97656250+ 5 Extended
/dev/dm-1p5 12158 12401 1953125+ 0 Empty
/dev/dm-1p6 12401 18480 48828125+ 0 Empty
/dev/dm-1p7 18480 24316 46874905 0 Empty
Command (m for help): q
This website is awesome!!! The organization is great.
I really like the colors too.
so how is the performance increase? is it noticeable? I’ve never tried RAID before but always been curious.
Thanks Heather
Jon- To be honest I didn’t really notice any major performance increase. I did not go as far to do any benchmarking however, and I didn’t really use the system all that much before wiping the drives, so it’s certainly possible there was a performance increase. If you do want to try raid with Linux, I would recommend using Software RAID instead of SATA raid– it’s much easier to get going and supposed to perform better as well. Software raid of course has it’s pitfalls as well, but for simple set-ups, it is not that bad.
Step 1:
Use FAT32 not NTFS……
Is It possible to specify that Windows xp use fat32 instead of NTFS during an installation?