XL/objects: Initialize format.json outside of erasure. (#1640)

Fixes #1636

New format now generates a UUID and includes it along with
the order of disks. So that UUID is the real order of disks
and on command line user is able to specify disks in any order.

This pre-dominantly solves our dilemma.
```
{
   "format" : "xl",
   "xl" : {
      "version" : "1",
      "disk": "00e4cf06-5bf5-4bb5-b885-4b2fff4a7959",
      "jbod" : [
         "00e4cf06-5bf5-4bb5-b885-4b2fff4a7959",
         ....
         "c47d2608-5067-4ed7-b1e4-fb81bdbb549f",
         "a543293e-99f1-4310-b540-1e450878e844",
         "18f97cbe-529a-456a-b6d4-0feacf64534d"
      ]
   },
   "version" : "1"
}
```
This commit is contained in:
Harshavardhana
2016-05-20 02:22:22 -07:00
committed by Anand Babu (AB) Periasamy
parent f5dfa895a5
commit e4240aa58f
10 changed files with 348 additions and 175 deletions

View File

@@ -59,7 +59,7 @@ func (s *MySuite) TestXLAPISuite(c *C) {
c.Check(err, IsNil)
erasureDisks = append(erasureDisks, path)
}
objAPI, err := newXLObjects(erasureDisks...)
objAPI, err := newXLObjects(erasureDisks)
c.Check(err, IsNil)
return objAPI
}