README 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 on a Linux-based
  13. system:
  14. make
  15. For FreeBSD systems, include an extra parameter like so:
  16. make PLATFORM=freebsd
  17. There is a "vbladed" script that daemonizes the program and sends its
  18. output to the logger program. Make sure you have logger installed if
  19. you would like to run vblade as a daemon with the vbladed script.
  20. ecashin@kokone vblade$ echo 'I have logger' | logger
  21. ecashin@kokone vblade$ tail -3 /var/log/messages
  22. Feb 8 14:52:49 kokone -- MARK --
  23. Feb 8 15:12:49 kokone -- MARK --
  24. Feb 8 15:19:56 kokone logger: I have logger
  25. Here is a short example showing how to export a block device with a
  26. vblade. (This is a loop device backed by a sparse file, but you could
  27. use any seekable file instead of /dev/loop7.)
  28. ecashin@kokone vblade$ make
  29. cc -Wall -c -o aoe.o aoe.c
  30. cc -Wall -c -o linux.o linux.c
  31. cc -Wall -c -o ata.o ata.c
  32. cc -o vblade aoe.o linux.o ata.o
  33. ecashin@kokone vblade$ su
  34. Password:
  35. root@kokone vblade# modprobe loop
  36. root@kokone vblade# dd if=/dev/zero bs=1k count=1 seek=`expr 1024 \* 4096` of=bd
  37. -file
  38. 1+0 records in
  39. 1+0 records out
  40. 1024 bytes transferred in 0.009901 seconds (103423 bytes/sec)
  41. root@kokone vblade# losetup /dev/loop7 bd-file
  42. root@kokone vblade# ./vblade 9 0 eth0 /dev/loop7
  43. ioctl returned 0
  44. 4294968320 bytes
  45. pid 16967: e9.0, 8388610 sectors
  46. Here's how you can use the Linux aoe driver to access the storage from
  47. another host on the LAN.
  48. ecashin@kokone ecashin$ ssh makki
  49. Last login: Mon Feb 7 10:25:04 2005
  50. ecashin@makki ~$ su
  51. Password:
  52. root@makki ecashin# modprobe aoe
  53. root@makki ecashin# aoe-stat
  54. e9.0 eth1 up
  55. root@makki ecashin# mkfs -t ext3 /dev/etherd/e9.0
  56. mke2fs 1.35 (28-Feb-2004)
  57. ...
  58. Creating journal (8192 blocks): done
  59. Writing superblocks and filesystem accounting information: done
  60. This filesystem will be automatically checked every 24 mounts or
  61. 180 days, whichever comes first. Use tune2fs -c or -i to override.
  62. root@makki ecashin# mkdir /mnt/e9.0
  63. root@makki ecashin# mount /dev/etherd/e9.0 /mnt/e9.0
  64. root@makki ecashin# echo hooray > /mnt/e9.0/test.txt
  65. root@makki ecashin# cat /mnt/e9.0/test.txt
  66. hooray
  67. Remember: be as careful with these devices as you would with /dev/hda!