mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 11:09:12 +08:00
mount: create mount root on filer
fix https://github.com/seaweedfs/seaweedfs-csi-driver/issues/127
This commit is contained in:
parent
14546f0ad8
commit
0606b59a3e
@ -241,6 +241,14 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||
DisableXAttr: *option.disableXAttr,
|
||||
})
|
||||
|
||||
// create mount root
|
||||
mountRootPath := util.FullPath(mountRoot)
|
||||
mountRootParent, mountDir := mountRootPath.DirAndName()
|
||||
if err = filer_pb.Mkdir(seaweedFileSystem, mountRootParent, mountDir, nil); err != nil {
|
||||
fmt.Printf("failed to create dir %s on filer %s: %v\n", mountRoot, filerAddresses, err)
|
||||
return false
|
||||
}
|
||||
|
||||
server, err := fuse.NewServer(seaweedFileSystem, dir, fuseMountOptions)
|
||||
if err != nil {
|
||||
glog.Fatalf("Mount fail: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user