[PLUG] RAID for remote filesystems

Matt Alexander lowbassman at gmail.com
Tue Oct 11 02:29:10 UTC 2005


I've basically accomplished what I wanted by using the loop device. Another
option that I played with briefly, but should also work, is by using the
Network Block Device.

Here's a brief tutorial:

I have 4 remote filesystems mounted. One is using sshfs, one is using Samba
from a Windows server, and 2 are using NFS from two different NetApp filers.

I then create a 1G file on each mount point and also one on my local file
system...

dd if=/dev/zero of=/sshfs/matt0 bs=1M count=1024
dd if=/dev/zero of=/samba/matt1 bs=1M count=1024
dd if=/dev/zero of=/nfs1/matt2 bs=1M count=1024
dd if=/dev/zero of=/nfs2/matt3 bs=1M count=1024
dd if=/dev/zero of=/home/matt/matt4 bs=1M count=1024

I then create a loop device for each file...

losetup /dev/loop0 /sshfs/matt0
losetup /dev/loop1 /samba/matt1
losetup /dev/loop2 /nfs1/matt2
losetup /dev/loop3 /nfs2/matt3
losetup /dev/loop4 /home/matt/matt4

I then create a RAID5 array from the loop devices...

mdadm --create /dev/md0 --level=5 --raid-devices=5 /dev/loop0 /dev/loop1
/dev/loop2 /dev/loop3 /dev/loop4

I then create a filesystem and mount it...

mkfs.ext3 /dev/md0
mount /dev/md0 /mnt/matt



More information about the PLUG mailing list