README 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. This is a beta release of vblade, the virtual EtherDrive (R) blade.
  2. The vblade is a program that makes a seekable file available over an
  3. ethernet local area network (LAN) via the ATA over Ethernet (AoE)
  4. protocol.
  5. The seekable file is typically a block device like /dev/md0 but even
  6. regular files will work. When vblade exports the block storage over
  7. AoE it becomes a storage target. Another host on the same LAN can
  8. access the storage if it has a compatible aoe kernel driver.
  9. The Linux aoe driver for the 2.6 kernel is compatible if you use
  10. aoe-2.6-7 or newer. You can use older aoe drivers but you will only
  11. be able to see one vblade per MAC address.
  12. The following command should build the vblade program:
  13. make
  14. There is a "vbladed" script that daemonizes the program and sends its
  15. output to the logger program. Make sure you have logger installed if
  16. you would like to run vblade as a daemon with the vbladed script.
  17. ecashin@kokone vblade$ echo 'I have logger' | logger
  18. ecashin@kokone vblade$ tail -3 /var/log/messages
  19. Feb 8 14:52:49 kokone -- MARK --
  20. Feb 8 15:12:49 kokone -- MARK --
  21. Feb 8 15:19:56 kokone logger: I have logger
  22. Here is a short example showing how to export a block device with a
  23. vblade. (This is a loop device backed by a sparse file, but you could
  24. use any seekable file instead of /dev/loop7.)
  25. ecashin@kokone vblade$ make
  26. cc -Wall -c -o aoe.o aoe.c
  27. cc -Wall -c -o linux.o linux.c
  28. cc -Wall -c -o ata.o ata.c
  29. cc -o vblade aoe.o linux.o ata.o
  30. ecashin@kokone vblade$ su
  31. Password:
  32. root@kokone vblade# modprobe loop
  33. root@kokone vblade# dd if=/dev/zero bs=1k count=1 seek=`expr 1024 \* 4096` of=bd
  34. -file
  35. 1+0 records in
  36. 1+0 records out
  37. 1024 bytes transferred in 0.009901 seconds (103423 bytes/sec)
  38. root@kokone vblade# losetup /dev/loop7 bd-file
  39. root@kokone vblade# ./vblade 9 0 eth0 /dev/loop7
  40. ioctl returned 0
  41. 4294968320 bytes
  42. pid 16967: e9.0, 8388610 sectors
  43. Here's how you can use the Linux aoe driver to access the storage from
  44. another host on the LAN.
  45. ecashin@kokone ecashin$ ssh makki
  46. Last login: Mon Feb 7 10:25:04 2005
  47. ecashin@makki ~$ su
  48. Password:
  49. root@makki ecashin# modprobe aoe
  50. root@makki ecashin# aoe-stat
  51. e9.0 eth1 up
  52. root@makki ecashin# mkfs -t ext3 /dev/etherd/e9.0
  53. mke2fs 1.35 (28-Feb-2004)
  54. ...
  55. Creating journal (8192 blocks): done
  56. Writing superblocks and filesystem accounting information: done
  57. This filesystem will be automatically checked every 24 mounts or
  58. 180 days, whichever comes first. Use tune2fs -c or -i to override.
  59. root@makki ecashin# mkdir /mnt/e9.0
  60. root@makki ecashin# mount /dev/etherd/e9.0 /mnt/e9.0
  61. root@makki ecashin# echo hooray > /mnt/e9.0/test.txt
  62. root@makki ecashin# cat /mnt/e9.0/test.txt
  63. hooray
  64. Remember: be as careful with these devices as you would with /dev/hda!