README 3.1 KB

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