mirror of
https://github.com/minio/minio.git
synced 2025-04-28 21:58:01 -04:00
Incorrect error message for insufficient volume fix (#6099)
Reply back with appropriate error message when the server is spawn with volume of insufficient size (< 1GiB). Fixes #5993.
This commit is contained in:
parent
8bd7a19d50
commit
ea76e72054
@ -112,6 +112,9 @@ func NewFSObjectLayer(fsPath string) (ObjectLayer, error) {
|
|||||||
|
|
||||||
var err error
|
var err error
|
||||||
if fsPath, err = getValidPath(fsPath); err != nil {
|
if fsPath, err = getValidPath(fsPath); err != nil {
|
||||||
|
if err == errMinDiskSize {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return nil, uiErrUnableToWriteInBackend(err)
|
return nil, uiErrUnableToWriteInBackend(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ func checkDiskMinTotal(di disk.Info) (err error) {
|
|||||||
// used for journalling, inodes etc.
|
// used for journalling, inodes etc.
|
||||||
totalDiskSpace := float64(di.Total) * 0.95
|
totalDiskSpace := float64(di.Total) * 0.95
|
||||||
if int64(totalDiskSpace) <= diskMinTotalSpace {
|
if int64(totalDiskSpace) <= diskMinTotalSpace {
|
||||||
return errDiskFull
|
return errMinDiskSize
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -1948,7 +1948,7 @@ func TestCheckDiskTotalMin(t *testing.T) {
|
|||||||
FSType: "XFS",
|
FSType: "XFS",
|
||||||
Files: 9999,
|
Files: 9999,
|
||||||
},
|
},
|
||||||
err: errDiskFull,
|
err: errMinDiskSize,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,9 @@ var errBitrotHashAlgoInvalid = errors.New("bit-rot hash algorithm is invalid")
|
|||||||
// errCrossDeviceLink - rename across devices not allowed.
|
// errCrossDeviceLink - rename across devices not allowed.
|
||||||
var errCrossDeviceLink = errors.New("Rename across devices not allowed, please fix your backend configuration")
|
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
|
// hashMisMatchError - represents a bit-rot hash verification failure
|
||||||
// error.
|
// error.
|
||||||
type hashMismatchError struct {
|
type hashMismatchError struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user