Handle disk not being attached to an array

This commit is contained in:
Adam Cecile 2016-09-12 17:16:06 +02:00
parent ff3687ab73
commit 1af2d222f9
1 changed files with 5 additions and 0 deletions

View File

@ -212,7 +212,12 @@ while controllerid <= controllernumber:
bad = True
if disk[0] == member:
print 'c'+str(controllerid-1)+'u'+str(arrayid)+'d'+str(i)+' | '+disk[2]+' '+disk[3]+' | '+disk[1]
# Remove from disks list
del diskinfo[i]
i += 1
# Some disks may not be attached to an array (ie: global hot spare)
for unattached_disk in diskinfo:
print 'c'+str(controllerid-1)+'uX'+'d'+str(i)+' | '+disk[2]+' '+disk[3]+' | '+disk[1]
controllerid += 1
if bad: