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.

39 lines
1.2 KiB

8 years ago
  1. package command
  2. type MountOptions struct {
  3. filer *string
  4. dir *string
  5. collection *string
  6. replication *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", "weed filer location")
  15. mountOptions.dir = cmdMount.Flag.String("dir", ".", "mount weed filer to this directory")
  16. mountOptions.collection = cmdMount.Flag.String("collection", "", "collection to create the files")
  17. mountOptions.replication = cmdMount.Flag.String("replication", "000", "replication to create to files")
  18. }
  19. var cmdMount = &Command{
  20. UsageLine: "mount -filer=localhost:8888 -dir=/some/dir",
  21. Short: "mount weed filer to a directory as file system in userspace(FUSE)",
  22. Long: `mount weed filer to userspace.
  23. Pre-requisites:
  24. 1) have SeaweedFS master and volume servers running
  25. 2) have a "weed filer" running
  26. These 2 requirements can be achieved with one command "weed server -filer=true"
  27. This uses bazil.org/fuse, which enables writing FUSE file systems on
  28. Linux, and OS X.
  29. On OS X, it requires OSXFUSE (http://osxfuse.github.com/).
  30. `,
  31. }