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.

38 lines
995 B

  1. package main
  2. import (
  3. )
  4. type MountOptions struct {
  5. filer *string
  6. dir *string
  7. }
  8. var (
  9. mountOptions MountOptions
  10. )
  11. func init() {
  12. cmdMount.Run = runMount // break init cycle
  13. cmdMount.IsDebug = cmdMount.Flag.Bool("debug", false, "verbose debug information")
  14. mountOptions.filer = cmdMount.Flag.String("filer", "localhost:8888", "weedfs filer location")
  15. mountOptions.dir = cmdMount.Flag.String("dir", "", "mount weed filer to this directory")
  16. }
  17. var cmdMount = &Command{
  18. UsageLine: "mount -filer=localhost:8888 -dir=/some/dir",
  19. Short: "mount weed filer to a directory as file system in userspace(FUSE)",
  20. Long: `mount weed file system to userspace.
  21. Pre-requisites:
  22. 1) have a weed file system running
  23. 2) have a "weed filer" running
  24. These 2 requirements can be achieved with one command "weed server -filer=true"
  25. This uses bazil.org/fuse, whichenables writing FUSE file systems on
  26. Linux, and OS X.
  27. On OS X, it requires OSXFUSE (http://osxfuse.github.com/).
  28. `,
  29. }