You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.5 KiB

  1. Getting started
  2. ===================================
  3. Installing Weed-Fs
  4. ###################################
  5. Download a proper version from `WeedFS download page <https://bintray.com/chrislusf/Weed-FS/weed/>`_.
  6. Decompress the downloaded file. You will only find one executable file, either "weed" on most systems or "weed.exe" on windows.
  7. Put the file "weed" to all related computers, in any folder you want. Use
  8. .. code-block:: bash
  9. ./weed -h # to check available options
  10. Set up Weed Master
  11. *********************************
  12. .. code-block:: bash
  13. ./weed master -h # to check available options
  14. If no replication is required, this will be enough. The "mdir" option is to configure a folder where the generated sequence file ids are saved.
  15. .. code-block:: bash
  16. ./weed master -mdir="."
  17. If you need replication, you would also set the configuration file. By default it is "/etc/weedfs/weedfs.conf" file. The example can be found in RackDataCenterAwareReplication
  18. Set up Weed Volume Server
  19. *********************************
  20. .. code-block:: bash
  21. ./weed volume -h # to check available options
  22. Usually volume servers are spread on different computers. They can have different disk space, or even different operating system.
  23. Usually you would need to specify the available disk space, the Weed Master location, and the storage folder.
  24. .. code-block:: bash
  25. ./weed volume -max=100 -mserver="localhost:9333" -dir="./data"
  26. Cheat Sheet: Setup One Master Server and One Volume Server
  27. **************************************************************
  28. Actually, forget about previous commands. You can setup one master server and one volume server in one shot:
  29. .. code-block:: bash
  30. ./weed server -dir="./data"
  31. # same, just specifying the default values
  32. # use "weed server -h" to find out more
  33. ./weed server -master.port=9333 -volume.port=8080 -dir="./data"
  34. Testing Weed-Fs
  35. ###################################
  36. With the master and volume server up, now what? Let's pump in a lot of files into the system!
  37. .. code-block:: bash
  38. ./weed upload -dir="/some/big/folder"
  39. This command would recursively upload all files. Or you can specify what files you want to include.
  40. .. code-block:: bash
  41. ./weed upload -dir="/some/big/folder" -include=*.txt
  42. Then, you can simply check "du -m -s /some/big/folder" to see the actual disk usage by OS, and compare it with the file size under "/data". Usually if you are uploading a lot of textual files, the consumed disk size would be much smaller since textual files are gzipped automatically.
  43. Now you can use your tools to hit weed-fs as hard as you can.