mirror of
https://github.com/pgsty/minio.git
synced 2026-10-06 17:55:59 +03:00
Show the cause error in startup when directio is not supported (#9497)
This commit tries to create a file using direct i/o in the startup so the server returns quickly and avoid cryptic other errors.
This commit is contained in:
+1
-1
@@ -175,7 +175,7 @@ func getValidPath(path string) (string, error) {
|
||||
var rnd [8]byte
|
||||
_, _ = rand.Read(rnd[:])
|
||||
fn := pathJoin(path, ".writable-check-"+hex.EncodeToString(rnd[:])+".tmp")
|
||||
file, err := os.Create(fn)
|
||||
file, err := disk.OpenFileDirectIO(fn, os.O_CREATE, 0600)
|
||||
if err != nil {
|
||||
return path, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user