You are not logged in.

#1 2010-03-24 21:34:01

Nixxx
Member
From: Poland
Registered: 2009-08-01
Posts: 85

FakeRAID 0 + Windows 7 + Arch

Hi All. I have created software RAID 0 using BIOS (VIA chipset). Then I've installed Windows 7 on the partition and left some space for Arch ext 4 installation. I'm unable to make Arch Live CD to see one RAID 0 array. Typing fdisk -l shows two separate disks. I've done:
-modprobe raid0
-modprobe dm-mod
-mdadm --assemble /dev/md0 /dev/sda /dev/sdb shows error

Please help because I'can't use my favourite distro sad

Moderator edit: clarified your topic title a bit (hardware/software RAID or FakeRAID are different beasts altogether).

Last edited by .:B:. (2010-03-26 08:46:42)

Offline

#2 2010-03-24 23:11:56

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: FakeRAID 0 + Windows 7 + Arch

Setting RAID from a BIOS is not something I would qualify as software RAID. There are three implementations of RAID:
- Hardware RAID, using a RAID controller card with it's own processor (expensive). The OS sees this as a disk controller and the RAID array as a single disk. RAID array dependant on  the controller.
- FakeRAID, using a controller (add-in card or onboard) without it's own processor. Utilized the host CPU for calculations, the OS sees this as a disk controller and the RAID array as a single disk. Inexpensive, often found on cheap RAID controller cards and motherboards. Array depends on the controller to use and on the host CPU to do the actual thinking (e.g. parity calculation)
- Software RAID, the OS itself governs the RAID. The OS sees the individual disks and implements RAID algorithms the read/write data.  The OS (and therefor the host CPU) is used for all calculations regarding the I/O.

What you are using it probably fakeRAID.
mdadm is a software RAID piece of kit, it uses individual disks/partitions to form arrays. What you want to use is dmraid, it does have some drivers to support fakeRAID (e.g. the Intel Matrix Controller).
So figure out what controller you are using and see if it is supported. After that you want to look into dmraid, not mdadm, to use your fakeRAID array in Linux.

Another question: Why RAID0?
Are you often copying/moving large sets of data (say... 500MB and up)? Or are you using this as a disk for your OS, apps, music, etc etc?

Offline

#3 2010-03-25 10:08:58

Nixxx
Member
From: Poland
Registered: 2009-08-01
Posts: 85

Re: FakeRAID 0 + Windows 7 + Arch

Ok I've used fakeRAID method, intaled the system but i'm unable to figure out how to install a GRUB - the "root" line in menu.lst is empty, so I'm trying to set (hdx,y) - x,y=0,2,3 etc. The system always says that he is unable to find root directory. Any ideas?

Offline

#4 2010-03-25 12:43:28

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: FakeRAID 0 + Windows 7 + Arch

Have you checked out the Arch wiki page on RAID? I tried to get boot to work on RAID and ended up giving up. While the Wiki page is good, I think it is a little scattershot and I'm just not sure how much of it you really need, but unfortunately I couldn't get it to work for me so I really couldn't fix it.

http://wiki.archlinux.org/index.php/Ins … AID_or_LVM

I just ended up using a small hard drive for my boot drive and using the 1tb RAID drives as the data drives.

But besides that, I would suggest *not* using fakeRAID. Software RAID is much more flexible, not tying you to a particular card.

Offline

#5 2010-03-25 16:38:38

Nixxx
Member
From: Poland
Registered: 2009-08-01
Posts: 85

Re: FakeRAID 0 + Windows 7 + Arch

Yeah but how to use software RAID (no created by BIOS) with Windows aboard? I think that's too complicated for me.
@Ultraman - After i created RAID0 i've noticed improvement. I have two older ones SATA Segate Barracuda (7200.9 and 7200.10) and for single disk the read speed is 60 ~ 64 MB/s average. With RAID0 it reaches 115 MB (also average).

Offline

#6 2010-03-25 17:41:20

ruffedgz
Member
From: Michigan
Registered: 2009-07-23
Posts: 54

Re: FakeRAID 0 + Windows 7 + Arch

Even though RAID0 is good for reading/writing large amounts of data, it can improve your overall hard drive performance as seen in Nixxx's post above.

To try and answer your question, I wanted to know:

1. After completing the RAID0, did you install Windows first or are you trying to install Arch first?
2. Are you trying to install GRUB before installing any OS or after one of the OS' has been installed?

I was thinking about doing a RAID0 later on with my 'fakeRAID' or using a software RAID.

If you are not sure if it was done correctly, I would try and boot into a distro like Arch or Ubuntu via USB to make sure it can see the newly created HDD.


Arch linux i686 | Dell XPS m1530 | Intel Core 2 Duo 2 GHz | 3 GB RAM | 250GB HDD

Offline

#7 2010-03-26 07:34:41

Nixxx
Member
From: Poland
Registered: 2009-08-01
Posts: 85

Re: FakeRAID 0 + Windows 7 + Arch

1. I gave up with dual boot temporarily, first want to try with only Arch aboard
2. boot Arch live CD
3. with fakeRAID I've created the matrix: via_ddhghdbghf visible by Arch installer as one 600 GB HDD (2x300)
3. I've partitioned and installed the system on via_ddhghdbghfp1 in /dev/mapper/
4. the last step of Arch installation is boot manager which fails because of unability to locate root directory. i don't know how to set correctly "root" in menu.lst file

Offline

#8 2010-03-27 02:17:14

ruffedgz
Member
From: Michigan
Registered: 2009-07-23
Posts: 54

Re: FakeRAID 0 + Windows 7 + Arch

OK, this good. It seems you are using LVM with your installation (don't know but I am guessing) so I would read this wiki page a bit: http://wiki.archlinux.org/index.php/Lvm#Important

#4 of the 'important section' will probably be the best for you.


Arch linux i686 | Dell XPS m1530 | Intel Core 2 Duo 2 GHz | 3 GB RAM | 250GB HDD

Offline

#9 2010-03-31 17:32:28

Nixxx
Member
From: Poland
Registered: 2009-08-01
Posts: 85

Re: FakeRAID 0 + Windows 7 + Arch

Ok i will try to create the RAID 0 by mdadm (without BIOS). The "Installing with Software RAID or LVM" article in ArchWiki is quite clear but does not refer to RAID 0 so I have some questions

1. How to set stripe size (8,16,32 or 64 K) ?
2. Will GRUB work with RAID 0?
3. To create it should I type (i have 2 hdd, I don't want SWAP and /boot): mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1

Last edited by Nixxx (2010-03-31 20:33:39)

Offline

#10 2010-03-31 17:57:02

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: FakeRAID 0 + Windows 7 + Arch

1. You can leave the stripe size at the default, it will perform fine. If you really want to know if there is much difference, benchmark it. But as long as you use at least 64k for RAID0, it will be alright. Current mdadm (3.x) uses 512k stripe size as default for RAID5, I think it does the same for RAID0. That is a performance balanced sweetspot in current SATA drives.

2. You cannot boot off software RAID0 afaik. So you will have to use a seperate /boot partition to be able to boot the kernel. You could optionally make /boot run in RAID1, it's only 32MB or so after all.

3. Because you will need a /boot, you will have to partition for it. Why do you no want a seperate swap? It's recommended to do so. If you have real reasons not to, I would like to hear them because it interests me.
Partitioning could be e.g.:
- sda1 : 32MB   (for /boot)
- sda2 : 2GB  (for swap, but feel free to vary the size. I have 2GB swap and 4GB RAM, I use pm-suspend and sometimes pm-hibernate, the latter uses my swap, normally it is untouched)
- sda3 : the rest of your drive (might be smart to keep 8MB unpartitioned at the end to accommodate for variations between drive models, it's only 8MB after all, peanuts!, and it is enough for this purpose)
Make sure you set the partition type to 'fd', this makes it easier to assemble the array on bootup.

Partition /dev/sdb the exact same way. Easiest and fastest way to do that is simply copy the partition table of sda if you are using the same model of disks. Accomplished by storing the part-table of sda in a file we shall call 'table' and writing that to sdb.

# sfdisk -d /dev/sda > table
# sfdisk /dev/sdb < table

You could also do this directly without using the 'table' file, but this is the way I was taught.

Next you can tell mdadm to create the RAID by issuing:

mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda3 /dev/sdb3

You can check if it went alright and is looking OK by checking out /proc/mdstat (do cat /proc/mdstat)
After this has been done, it is a good idea to have mdadm create you a mdadm.conf file containing information of your array. One easy command for that:

mdadm --detail --scan > /etc/mdadm.conf

Next, make sure you add the "mdadm" HOOK in the /etc/mkinitcpio.conf file. This will enable your boot-image to assemble the RAID automatically using the information in the /etc/mdadm.conf file.
This hook has to be set after your drive interfaces (e.g. pata or sata), but before 'filesystems'. Example:

HOOKS="base udev autodetect sata mdadm filesystems"

If you do this from the install CD, excellent. Because the kernel and the boot-image get created after you have filled /etc/mdadm.conf and tweaked mkinitcpio.conf. Otherwise you would have to tell mkinitcpio to rebuild the image to get the 'mdadm' hook built in there.

That should get you started. wink

Oh and still: I think using RAID0 on drive which hold the OS is a bad idea. There is no speed gain at all (you could even be slower, because theoretically seek time doubles!), only an increased chance of losing your data due to disk failure.
If you work with very big files, video editing for example, RAID0 can provide gains. But in such a case it's a better idea to only use RAID0 over a seperate partition that you utilize as a seperate 'work' partition.

Last edited by Ultraman (2010-03-31 18:01:39)

Offline

#11 2010-03-31 19:52:33

Nixxx
Member
From: Poland
Registered: 2009-08-01
Posts: 85

Re: FakeRAID 0 + Windows 7 + Arch

@Ultraman
1. First of all many thanks for quick and detailed response man smile

2. Why RAID 0? I've compared the performence with my present RAID 0 to previous nonRAID system on Windows 7 and the performrnce is significant. Windows starts faster (32 stripe size), games are installing faster (form virtual CD), games are loading faster, large photos opening faster. I've did also many performence tests which confirmed the adventage of RAID0. The access time equals 13 ms and remains the same as for the singe drive.

3. As far as i know the stripe size is quite important when it is about performence. Using software RAID buid in to my BIOS i can set it from 4 K to 64. My current 32K fits perfectly to smal systems files and works also great with larger ones. The overall average speed reaches doble speed of single drive so it means that it was set correctly. In the net you can find many tests proving that seting a stripe size to small or to large effects performence in a bad meaning of this word.

4. The SWAP is a legacy of old times when the ammounts of RAM were significantly lower. Nowadays when you have more then 1 GB of RAM the swap is unnecesarly because all operations have enough room to be processed in RAM. To imagine the diffrence in speed you can just compare the bandwidht of RAM to CPU with bandwidth from HDD to CPU. It's like GB/s vs MB/s. I've just tested the latest Arch+KDE 4.4+2 GB RAM without SWAP and it worked perfect.

5. Security – you're totally right about the risk of loosing data but in my case it does not play a role. All my private stuff i keep additionaly on external HDD and computer in my job.

6. I went little big to far so going back to creating RAID on Arch I will test it on the nearest weekend. Just three question more to be sure
- as I understood the „/" and „/boot" partitions must be created on each drive?
- before creating a RAID shoud I load raid0 module - modprobe raid0?
- Is the LVM configuration necesarly? I don't really get the LVM role when it is about RAID

Last edited by Nixxx (2010-04-01 00:20:20)

Offline

#12 2010-03-31 21:11:36

ruffedgz
Member
From: Michigan
Registered: 2009-07-23
Posts: 54

Re: FakeRAID 0 + Windows 7 + Arch

Nixxx wrote:

@Ultraman
- as I understood the „/" and „/boot" partitions must be created on each drive?
- before creating a RAID shoud I load raid0 module - modprobe raid0?
- Is the LVM configuration necesarly? I don't really get the LVM role when it is about RAID

From my understand using the software RAID, you will have to set up partitions first (using sfdisk or fdisk) then setup the RAID by loading the module and following the examples set on the wiki page. The same goes for LVM but you don't need to use LVM along with RAID (I have setup machine with just a RAID setup but those were all with a RAID controller ... aka real RAID ... big_smile)

I like LVM myself because of the nice ways to manage the volumes within one partition. Adding, extending or deleting becomes very easy with LVM.

As for the question about the stripe size, you will have to set that when you are doing the 'mke2fs' part of that new RAID device so for example:

mdadm -C /dev/md0 -a yes  -l 0 -n 4 /dev/partititon locations here
mke2fs -j -b 4096 -E stride=16 /dev/md0

The option '-E stride=16' is what you want to change to 32 to make it the same as what you had on your BIOs setup.

Hope this helps!

Last edited by ruffedgz (2010-03-31 21:13:00)


Arch linux i686 | Dell XPS m1530 | Intel Core 2 Duo 2 GHz | 3 GB RAM | 250GB HDD

Offline

#13 2010-04-01 12:12:21

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: FakeRAID 0 + Windows 7 + Arch

Nixxx wrote:

@Ultraman
1. First of all many thanks for quick and detailed response man smile

No problem smile

2. Why RAID 0? I've compared the performence with my present RAID 0 to previous nonRAID system on Windows 7 and the performrnce is significant. Windows starts faster (32 stripe size), games are installing faster (form virtual CD), games are loading faster, large photos opening faster. I've did also many performence tests which confirmed the adventage of RAID0. The access time equals 13 ms and remains the same as for the singe drive.

Sweet, a guy that did his homework. Okay excellent. I have used RAID0 myself and did not notice any improvement in loading Windows. Most games did install and load faster, linear writes and reads is what RAID0 is good at.

3. As far as i know the stripe size is quite important when it is about performence. Using software RAID buid in to my BIOS i can set it from 4 K to 64. My current 32K fits perfectly to smal systems files and works also great with larger ones. The overall average speed reaches doble speed of single drive so it means that it was set correctly. In the net you can find many tests proving that seting a stripe size to small or to large effects performance in a bad meaning of this word.

Yup, stripe size is important. I used 64 and 128K for my drives, linear performance was doubled in both cases. Didn't matter much for random i/o over here.
RAID0 is not greatly affected by variations in stripe size, given that you don't go too low (<32k i guess) or overboard with it. I did some benches with RAID5, stripe size has more influence there. Bigger stripe sizes tend to improve read speed, but decrease writes. I found 512K to be a nice balance here, which also happened to be the current default of mdadm 3.x for RAID5. I don't know if the default stripe size for RAID0 also changed to 512K or remained on 64K with mdadm 3, because I haven't build a RAID0 array with mdadm3 yet, only 2.6.9 wink But you will find out when you make one without specifying the stripe size.

4. The SWAP is a legacy of old times when the ammounts of RAM were significantly lower. Nowadays when you have more then 1 GB of RAM the swap is unnecesarly because all operations have enough room to be processed in RAM. To imagine the diffrence in speed you can just compare the bandwidht of RAM to CPU with bandwidth from HDD to CPU. It's like GB/s vs MB/s. I've just tested the latest Arch+KDE 4.4+2 GB RAM without SWAP and it worked perfect.

Yup, it's safe to go without swap. Mine is untouched like I said, but I use it for hibernation. I don't miss 2GB on my 320GB RAID1 array at all, so I keep swap around to be on the safe side if it is -ever- needed and to hibernate without having to trouble myself with using a file for that (lazy... wink ).

5. Security – you're totally right about the risk of loosing data but in my case it does not play a role. All my private stuff i keep additionaly on external HDD and computer in my job.

"Backups" is indeed the magic word here smile
I have a third 320GB disk in my PC that holds a 120GB partition for Windows7, for purposes of occasionally playing a game that doesn't run or would require effort to run on Linux, and the other 200GB I use as a backup partition, holding a backup of my /home and other stuff I care about. And the same stuff also gets copied to my server which holds 3x 1.5TB in RAID5.

6. I went little big to far so going back to creating RAID on Arch I will test it on the nearest weekend. Just three question more to be sure
- as I understood the „/" and „/boot" partitions must be created on each drive?

"/" , yes. For example, 2 disks, a partition of same size on both. The partitions (/dev/sda2 and /dev/sdb2) are used by mdadm to create /dev/md0 (or w/e number), when using raid-level 0 /dev/md0 becomes the size of those partitions combined.
"/boot" doesn't have to be on both disks. But it can make things easier.
First of all, ease of partitioning. You partition one disk and copy the layout to the other using sfdisk. No hassle with getting those partitions sized exactly the same.
Second, you could use RAID1 over the two partitions that play /boot. /dev/sda1 and /dev/sdb1 as a RAID1 array. If you also install GRUB (or any other bootloader you might fancy) in the MBR of the second disk, you can boot off both disks. In your case this "advantage" is a bit meaningless, because if one of your disks goes faulty you would have lost your root partition already, making your system unable to boot since it would miss it's root partition. But in my case, one disk can fail and I can simply boot off the other disk without having to touch anything like Boot Order in my BIOS.
So in your case you don't have to do this, but you will 32MBs of free space anyway on the second disk, because the RAID0 partition has to be the same size as the one on the first disk. So this is more a: Why not?

- before creating a RAID shoud I load raid0 module - modprobe raid0?

Yep, forgot about that one. Maybe it gets loaded automatically, but I'm not sure about that. I always load the corresponding raid module before creating an array.

- Is the LVM configuration necesarly? I don't really get the LVM role when it is about RAID

No, it's not a requirement. You can create a filesystem on a md device itself.
LVM allows you to partition the md device and it allows resizing of them as well, so you can dynamically assign space. If you don't need or want that, you can do without and just create a filesystem on the md device which will give you a single big pool of storage. Which can be grown (by adding a drive to the array) or shrunk (when using more than 2 disks, by taking one away).

ruffedgz wrote:

As for the question about the stripe size, you will have to set that when you are doing the 'mke2fs' part of that new RAID device so for example:

mdadm -C /dev/md0 -a yes  -l 0 -n 4 /dev/partititon locations here
mke2fs -j -b 4096 -E stride=16 /dev/md0

The option '-E stride=16' is what you want to change to 32 to make it the same as what you had on your BIOs setup.

Hope this helps!

You might be misreading the example here.
Stride size calculation should be looked at from a filesystem blocks perspective. The number of blocks that fit inside a chunk (=stripe size). When using a stripe size (chunk size) of 64K, and filesystem block size of 4K (default), the stride is calculated by looking at how many filesystem blocks fit in a chunk. In this case that would be 64 / 4 = 16.
If Nixxx is going to use a stripe size (chunk size) of 32K, the stride size should be: 32 / 4 = 8.

Last edited by Ultraman (2010-04-01 12:31:22)

Offline

#14 2010-04-01 23:18:28

ruffedgz
Member
From: Michigan
Registered: 2009-07-23
Posts: 54

Re: FakeRAID 0 + Windows 7 + Arch

Ultraman wrote:

You might be misreading the example here.
Stride size calculation should be looked at from a filesystem blocks perspective. The number of blocks that fit inside a chunk (=stripe size). When using a stripe size (chunk size) of 64K, and filesystem block size of 4K (default), the stride is calculated by looking at how many filesystem blocks fit in a chunk. In this case that would be 64 / 4 = 16.
If Nixxx is going to use a stripe size (chunk size) of 32K, the stride size should be: 32 / 4 = 8.

That is totally correct and I forgot about that. Thanks for clearing that up.

I totally enjoyed reading your post Ultraman as I haven't played enough with the software RAID but this is one of my next projects later this year when I buy more HDD for my desktop computer and try out the software RAID. RAID5 is always my favorite but I never like the n - 1 part of it but thats what happens wink


Arch linux i686 | Dell XPS m1530 | Intel Core 2 Duo 2 GHz | 3 GB RAM | 250GB HDD

Offline

Board footer

Powered by FluxBB