How to use the NetDisk with Linux Software Raid

Concept

http://code.ximeta.com/cgi-bin/trac.cgi/attachment/wiki/HowToLinuxSoftwareRaid/xplat-linux.png?format=raw

Steps

A. Enable the registered NDAS hard disks with exclusive write mode

for s in 1 2 3 4 5 6 7 8 9 10;
do ndasadmin enable -s $s -o w;
done

B. Create the md device

mdadm --create -l5 -n9 /dev/md0 -c64 \
    /dev/ndas-00100001:0p1 \
    /dev/ndas-00100002:0p1 \
    /dev/ndas-00100003:0p1 \
    /dev/ndas-00100004:0p1 \
    /dev/ndas-00100005:0p1 \
    /dev/ndas-00100006:0p1 \
    /dev/ndas-00100007:0p1 \
    /dev/ndas-00100008:0p1 \
    /dev/ndas-00100009:0p1 

C. Create the file system with stripe size as {chunk size} * {number of data disk} (excluding parity disk)

mkfs -t ext3 /dev/md0 -Estride=$((64*8))

Note: you can create without stride option, but the performance would be degraded. You can create any kind of file system.

D. Mount the file system

mount -t ext3 /dev/md0 /mnt/your_mount_point

E. Edit /etc/fstab on your purpose

Etc

It is impossible to share the Linux Raid with multiple hosts in the same time by design of Linux Raid.

  • Read-only raid assembly
    • Linux Software raid doesn't support assemblying with read-only. it is in their todo list
    • Once linux software raid team provides the read-only assemblying, you can share the linux raid over multiple hosts/PCs (one in exclusive write mode, the others in read-only mode)
  • DDRaid
    • DDRaid is about sharing the raid between multiple hosts(PCs)
    • It is not matured yet, but could be a good solution with NDAS.
  • GFS/OCFS2 with raid
    • You can assemble the raid with GFS shared mode.
    • But it could break on the exceptional situation (a disk disconnection and so on) as the Raid system will modify the meta data without noticing the other host that shares the raid.
    • So GFS mode should be used with DDRaid.
  • XIMETA Raid
    • Ximeta provides the RAID that can be shared between multiple hosts.
    • For now, it can be shared in one-write-read/other-read-only mode.
    • Soon, we will provide the sharable raid.

Attachments