mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
show error if backend is mis-configured
Some checks failed
go: build dev binaries / cleanup (push) Has been cancelled
docker: build dev containers / build-dev-containers (push) Has been cancelled
End to End / FUSE Mount (push) Has been cancelled
go: build binary / Build (push) Has been cancelled
Ceph S3 tests / Ceph S3 tests (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been cancelled
Some checks failed
go: build dev binaries / cleanup (push) Has been cancelled
docker: build dev containers / build-dev-containers (push) Has been cancelled
End to End / FUSE Mount (push) Has been cancelled
go: build binary / Build (push) Has been cancelled
Ceph S3 tests / Ceph S3 tests (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been cancelled
related to https://github.com/seaweedfs/seaweedfs/discussions/6472
This commit is contained in:
parent
95357df8dd
commit
be15fee8e7
@ -52,7 +52,9 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
|
||||
v.noWriteCanDelete = true
|
||||
v.noWriteOrDelete = false
|
||||
glog.V(0).Infof("loading volume %d from remote %v", v.Id, v.volumeInfo)
|
||||
v.LoadRemoteFile()
|
||||
if err := v.LoadRemoteFile(); err != nil {
|
||||
return fmt.Errorf("load remote file %v: %v", v.volumeInfo, err)
|
||||
}
|
||||
alreadyHasSuperBlock = true
|
||||
} else if exists, canRead, canWrite, modifiedTime, fileSize := util.CheckFile(v.FileName(".dat")); exists {
|
||||
// open dat file
|
||||
|
@ -1,6 +1,7 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/backend"
|
||||
@ -60,7 +61,10 @@ func (v *Volume) HasRemoteFile() bool {
|
||||
|
||||
func (v *Volume) LoadRemoteFile() error {
|
||||
tierFile := v.volumeInfo.GetFiles()[0]
|
||||
backendStorage := backend.BackendStorages[tierFile.BackendName()]
|
||||
backendStorage, found := backend.BackendStorages[tierFile.BackendName()]
|
||||
if !found {
|
||||
return fmt.Errorf("backend storage %s not found", tierFile.BackendName())
|
||||
}
|
||||
|
||||
if v.DataBackend != nil {
|
||||
v.DataBackend.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user