mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +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
@@ -122,9 +122,6 @@ func newXLObjects(disks []string) (ObjectLayer, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Runs house keeping code, like creating minioMetaBucket, cleaning up tmp files etc.
|
||||
xlHouseKeeping(storageDisks)
|
||||
|
||||
// Attempt to load all `format.json`.
|
||||
formatConfigs, sErrs := loadAllFormats(storageDisks)
|
||||
|
||||
@@ -138,6 +135,9 @@ func newXLObjects(disks []string) (ObjectLayer, error) {
|
||||
// Handles different cases properly.
|
||||
switch reduceFormatErrs(sErrs, len(storageDisks)) {
|
||||
case errUnformattedDisk:
|
||||
if err := initMetaVolume(storageDisks); err != nil {
|
||||
return nil, fmt.Errorf("Unable to initialize '.minio' meta volume, %s", err)
|
||||
}
|
||||
// All drives online but fresh, initialize format.
|
||||
if err := initFormatXL(storageDisks); err != nil {
|
||||
return nil, fmt.Errorf("Unable to initialize format, %s", err)
|
||||
@@ -153,6 +153,11 @@ func newXLObjects(disks []string) (ObjectLayer, error) {
|
||||
// FIXME.
|
||||
}
|
||||
|
||||
// Runs house keeping code, like t, cleaning up tmp files etc.
|
||||
if err := xlHouseKeeping(storageDisks); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Load saved XL format.json and validate.
|
||||
newPosixDisks, err := loadFormatXL(storageDisks)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user