Is there such a thing as software software RAID?

kodek64

n00b
Joined
Oct 26, 2007
Messages
35
Hi,

I'm looking at some kind of piece of software that would basically let me emulate a RAID array within an existing file system. Does such thing exist? Basically, it'd make two ISO-like files and use them as disks, and then either stripe them or mirror them.

Thanks.
 
Yes, you can do this in Linux. Now for the real question: Why?

Edit: Ohh, wait, I see what you really want. You want selective R0 on certain files. Then again, that still brings up the point: Why bother?
 
Yeah, that's what I imagined, but is there a way to do it in Windows? If not, how would I go about doing it in Linux?

I'd like to emulate raid 5 with some data to maintain some redundancy with a few files, but without having to repartition my drives and/or have to buy different ones.

I currently have a few drives that are all of different sizes, and most of them have too much data on them to move it around and repartition.

I already have a backup solution, but I want something that's on-the-fly, and an emulated raid environment would be exactly it.

Thanks.
 
how would I go about doing it in Linux?
In theory:
You would create at least three empty files of equal size, each on a different hard drive. Then associate a loop device with each file using the losetup utility. The array would be created by using mdadm on those loop devices. Finally, you would need to write a custom init script to handle the array activation, because the kernel would never see this file based RAID at boot.

I might play with this myself, just to see how well it works. Why don't you set this up, too, and we'll compare notes afterward.
 
I just did a RAID5 of loop devices, it works:
Code:
root@Knoppix:/media/sda2# dd if=/dev/zero of=disk1 bs=1M seek=1000 count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00439442 seconds, 239 MB/s
root@Knoppix:/media/sda2# dd if=/dev/zero of=disk2 bs=1M seek=1000 count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00445055 seconds, 236 MB/s
root@Knoppix:/media/sda2# dd if=/dev/zero of=disk3 bs=1M seek=1000 count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00438162 seconds, 239 MB/s
root@Knoppix:/media/sda2# losetup /dev/loop1 disk1
root@Knoppix:/media/sda2# losetup /dev/loop2 disk2
root@Knoppix:/media/sda2# losetup /dev/loop3 disk3
root@Knoppix:/media/sda2# modprobe md
root@Knoppix:/media/sda2# mdadm --create /dev/md0 -l 5 -n 3 /dev/loop1 /dev/loop2 /dev/loop3
mdadm: array /dev/md0 started.
root@Knoppix:/media/sda2# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 loop3[3] loop2[1] loop1[0]
      2049920 blocks super 1.0 level 5, 64k chunk, algorithm 2 [3/2] [UU_]
      [>....................]  recovery =  1.6% (17408/1024960) finish=7.6min speed=2176K/sec

unused devices: <none>
 
Back
Top