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.

37 lines
994 B

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