aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2019-11-27 19:22:51 -0800
committerGitHub <noreply@github.com>2019-11-27 19:22:51 -0800
commit0b822a6fb546e642daaf81947a2f943f396e255b (patch)
tree638fb8a6a90824a20f73f80c1b09419a334cb5f4 /weed/command/mount_std.go
parent0d8a88c9a80af1812b89f92ee9ed2705fa2df6a5 (diff)
parent13b6f09fea37fc9c61fd71232ed6568f2e10b759 (diff)
downloadseaweedfs-0b822a6fb546e642daaf81947a2f943f396e255b.tar.xz
seaweedfs-0b822a6fb546e642daaf81947a2f943f396e255b.zip
Merge pull request #1142 from iliul/wip-fuse-mount
fuse: check mount point available before do runmount
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 6ca9bfdca..9fde502d6 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -12,15 +12,14 @@ import (
"strings"
"time"
- "github.com/chrislusf/seaweedfs/weed/security"
- "github.com/jacobsa/daemonize"
- "github.com/spf13/viper"
-
"github.com/chrislusf/seaweedfs/weed/filesys"
"github.com/chrislusf/seaweedfs/weed/glog"
+ "github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/util"
+ "github.com/jacobsa/daemonize"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
+ "github.com/spf13/viper"
)
func runMount(cmd *Command, args []string) bool {
@@ -88,12 +87,18 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
}
}
+ // Ensure target mount point availability
+ if isValid := checkMountPointAvailable(dir); !isValid {
+ glog.Fatalf("Expected mount to still be active, target mount point: %s, please check!", dir)
+ return false
+ }
+
mountName := path.Base(dir)
options := []fuse.MountOption{
fuse.VolumeName(mountName),
- fuse.FSName("SeaweedFS"),
- fuse.Subtype("SeaweedFS"),
+ fuse.FSName(filer + ":" + filerMountRootPath),
+ fuse.Subtype("seaweedfs"),
fuse.NoAppleDouble(),
fuse.NoAppleXattr(),
fuse.NoBrowse(),