Revision 0caf6485 lib/bdev.py
b/lib/bdev.py | ||
---|---|---|
595 | 595 |
i += 1 |
596 | 596 |
if i == 256: |
597 | 597 |
logger.Error("Critical: Out of md minor numbers.") |
598 |
return None
|
|
598 |
raise errors.BlockDeviceError("Can't find a free MD minor")
|
|
599 | 599 |
return i |
600 | 600 |
|
601 | 601 |
|
... | ... | |
1022 | 1022 |
if match: |
1023 | 1023 |
return int(match.group(1)) |
1024 | 1024 |
logger.Error("Error: no free drbd minors!") |
1025 |
return None |
|
1026 |
|
|
1025 |
raise errors.BlockDeviceError("Can't find a free DRBD minor") |
|
1027 | 1026 |
|
1028 | 1027 |
@classmethod |
1029 | 1028 |
def _GetDevInfo(cls, minor): |
... | ... | |
1296 | 1295 |
return result |
1297 | 1296 |
|
1298 | 1297 |
minor = self._FindUnusedMinor() |
1299 |
if minor is None: |
|
1300 |
raise errors.BlockDeviceError("Not enough free minors for DRBD!") |
|
1301 | 1298 |
need_localdev_teardown = False |
1302 | 1299 |
if self._children[0]: |
1303 | 1300 |
result = self._AssembleLocal(minor, self._children[0].dev_path, |
Also available in: Unified diff