# RAID'ing files?  "mdadm: /tmp/node0 is not a block device."

## DingbatCA

Going off the deep end today.  Build up a few blank files and try to RAID them together.  Complains that the blank files are not block devices.  I know that.  Is there any way to get past this problem?

```

dd if=/dev/zero of=/tmp/node0 count=204800

mdadm --create --level=5 --raid-devices=4 /tmp/node0 /tmp/node1 /tmp/node2 /tmp/node3 /dev/md0

mdadm: /tmp/node0 is not a block device.

```

----------

## embobo

I'd guess you need to use losetup to present the file as a block device first.

----------

## DingbatCA

Close, but not portable, and may have problem when I am making 100's of files.  Any other ideas?

----------

## embobo

 *DingbatCA wrote:*   

> Close, but not portable, and may have problem when I am making 100's of files.  Any other ideas?

 

You realize mdadm isn't portable, right? If you need more than 256 files then you are probably trying to hammer a square peg into a round hole. Just make a large RAID device from partitions and carve them up into millions of logical volumes with lvm.

----------

## DingbatCA

bummer, is the 256 a limitation of the loop back or software RAID?

----------

