diff --git a/cmd/fs-v1.go b/cmd/fs-v1.go index 8e7057c48..6519070ce 100644 --- a/cmd/fs-v1.go +++ b/cmd/fs-v1.go @@ -112,6 +112,9 @@ func NewFSObjectLayer(fsPath string) (ObjectLayer, error) { var err error if fsPath, err = getValidPath(fsPath); err != nil { + if err == errMinDiskSize { + return nil, err + } return nil, uiErrUnableToWriteInBackend(err) } diff --git a/cmd/posix.go b/cmd/posix.go index 60eb9a59b..17c68ddda 100644 --- a/cmd/posix.go +++ b/cmd/posix.go @@ -224,7 +224,7 @@ func checkDiskMinTotal(di disk.Info) (err error) { // used for journalling, inodes etc. totalDiskSpace := float64(di.Total) * 0.95 if int64(totalDiskSpace) <= diskMinTotalSpace { - return errDiskFull + return errMinDiskSize } return nil } diff --git a/cmd/posix_test.go b/cmd/posix_test.go index 03d0ec23e..f3f208cef 100644 --- a/cmd/posix_test.go +++ b/cmd/posix_test.go @@ -1948,7 +1948,7 @@ func TestCheckDiskTotalMin(t *testing.T) { FSType: "XFS", Files: 9999, }, - err: errDiskFull, + err: errMinDiskSize, }, } diff --git a/cmd/storage-errors.go b/cmd/storage-errors.go index f1ae19122..95ff92f3c 100644 --- a/cmd/storage-errors.go +++ b/cmd/storage-errors.go @@ -76,6 +76,9 @@ var errBitrotHashAlgoInvalid = errors.New("bit-rot hash algorithm is invalid") // errCrossDeviceLink - rename across devices not allowed. var errCrossDeviceLink = errors.New("Rename across devices not allowed, please fix your backend configuration") +// errMinDiskSize - cannot create volume or files when disk size is less than threshold. +var errMinDiskSize = errors.New("The disk size is less than the minimum threshold") + // hashMisMatchError - represents a bit-rot hash verification failure // error. type hashMismatchError struct {