mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 05:00:22 +03:00
posix: Return errDiskNotWritable during disk initialization. (#2048)
It can happen that minio server might not have writable permissions on the export paths command line. Fixes #2035
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
e5dd917c37
commit
d64c3fd464
@@ -85,8 +85,21 @@ func newFSObjects(disk string) (ObjectLayer, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Attempt to create `.minio`.
|
||||
err = storage.MakeVol(minioMetaBucket)
|
||||
if err != nil {
|
||||
switch err {
|
||||
// Ignore the errors.
|
||||
case errVolumeExists, errDiskNotFound, errFaultyDisk:
|
||||
default:
|
||||
return nil, toObjectErr(err, minioMetaBucket)
|
||||
}
|
||||
}
|
||||
|
||||
// Runs house keeping code, like creating minioMetaBucket, cleaning up tmp files etc.
|
||||
fsHouseKeeping(storage)
|
||||
if err = fsHouseKeeping(storage); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// loading format.json from minioMetaBucket.
|
||||
// Note: The format.json content is ignored, reserved for future use.
|
||||
|
||||
Reference in New Issue
Block a user