mount.go 995 B

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