Add initial version of heal, remove rebalance

This commit is contained in:
Harshavardhana
2015-07-14 22:40:04 -07:00
parent 6a64019659
commit 2553654e24
5 changed files with 90 additions and 82 deletions

View File

@@ -67,6 +67,15 @@ func New(diskPath string) (Disk, error) {
map[string]string{"Type": strconv.FormatInt(int64(s.Type), 10)})
}
// IsUsable - is disk usable, alive
func (disk Disk) IsUsable() bool {
_, err := os.Stat(disk.path)
if err != nil {
return false
}
return true
}
// GetPath - get root disk path
func (disk Disk) GetPath() string {
return disk.path