mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-17 17:26:06 +01:00
mount: name the disk after the mounted path (#10958)
* mount: name the disk after the mounted path Finder and Explorer labelled every mount with the filer address, so two mounts from one filer were indistinguishable. Use the mounted path's last segment, the way df already shows it, and keep the filer address only for a whole-tree mount. * mount: let a given mount option override the default The options from -o were placed before the ones this mount derives, so a volname or iosize given on the command line lost to the derived value. Append them last, matching the Windows adapter. * mount: document what labels the disk
This commit is contained in:
1 parent
627b5e9d59
commit
7658305c76
5 files changed
+78
-3
No files matched your search
@@ -134,7 +134,6 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||
// mount fuse
|
||||
fuseMountOptions := &fuse.MountOptions{
|
||||
AllowOther: *option.allowOthers,
|
||||
Options: option.extraOptions,
|
||||
MaxBackground: maxBackground,
|
||||
CongestionThreshold: congestionThreshold,
|
||||
MaxWrite: 1024 * 1024 * 2,
|
||||
@@ -180,9 +179,12 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||
fuseMountOptions.Options = append(fuseMountOptions.Options, "novncache")
|
||||
}
|
||||
fuseMountOptions.Options = append(fuseMountOptions.Options, "slow_statfs")
|
||||
fuseMountOptions.Options = append(fuseMountOptions.Options, "volname="+serverFriendlyName)
|
||||
fuseMountOptions.Options = append(fuseMountOptions.Options, "volname="+volumeName(*option.filer, filerMountRootPath))
|
||||
fuseMountOptions.Options = append(fuseMountOptions.Options, fmt.Sprintf("iosize=%d", ioSizeMB*1024*1024))
|
||||
}
|
||||
// Last, so an option given on the command line wins over the default
|
||||
// this mount picked for it.
|
||||
fuseMountOptions.Options = append(fuseMountOptions.Options, option.extraOptions...)
|
||||
|
||||
if option.writebackCache != nil {
|
||||
fuseMountOptions.EnableWriteback = *option.writebackCache
|
||||
|
||||
Reference in new issue
Block a user