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.

40 lines
1.3 KiB

8 years ago
  1. package command
  2. type MountOptions struct {
  3. filer *string
  4. dir *string
  5. collection *string
  6. replication *string
  7. chunkSizeLimitMB *int
  8. }
  9. var (
  10. mountOptions MountOptions
  11. )
  12. func init() {
  13. cmdMount.Run = runMount // break init cycle
  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. mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 16, "local write buffer size, also chunk large files")
  19. }
  20. var cmdMount = &Command{
  21. UsageLine: "mount -filer=localhost:8888 -dir=/some/dir",
  22. Short: "mount weed filer to a directory as file system in userspace(FUSE)",
  23. Long: `mount weed filer to userspace.
  24. Pre-requisites:
  25. 1) have SeaweedFS master and volume servers running
  26. 2) have a "weed filer" running
  27. These 2 requirements can be achieved with one command "weed server -filer=true"
  28. This uses bazil.org/fuse, which enables writing FUSE file systems on
  29. Linux, and OS X.
  30. On OS X, it requires OSXFUSE (http://osxfuse.github.com/).
  31. `,
  32. }