[Discuss] samba devices and RAID

pw p.willis at telus.net
Fri Nov 10 12:51:04 PST 2006


hello,

Is it possible to use two SMB devices as a software
RAID set? For example if there are 2 x 2TB NAS devices
on the network, can I mirror one to the other using RAID?

I was thinking of having two disk image files
mounted as loops

ie:

#mount NAS drives that contain the disk images as files

mount -t smbfs -o username=yadda,password=tadda //NAS1/share /smb1
mount -t smbfs -o username=yadda,password=tadda //NAS2/share /smb2
mount -t smbfs -o username=yadda,password=tadda //NAS3/share /smb3


#mount the disk images as loop devices

mount -o loop=/dev/loop0 /smb1/disk-image fs
mount -o loop=/dev/loop1 /smb2/disk-image fs
mount -o loop=/dev/loop2 /smb3/disk-image fs


And then use those loop devices as devices for the
mirrored raid.

vi /etc/raidtab

<i>

raiddev /dev/md0
         raid-level      1
         nr-raid-disks   2
         nr-spare-disks  1
         persistent-superblock 1
         device          /dev/loop0
         raid-disk       0
         device          /dev/loop1
         raid-disk       1
         device          /dev/loop2
         spare-disk      0

<esc><wq>

mkraid /dev/md0


Stupid idea? Any thoughts?


Peter



More information about the Discuss mailing list