示例#1
0
 def _initpvs_removeHolders():
     """Remove holders for all devices."""
     for device in devices:
         try:
             devicemapper.removeMappingsHoldingDevice(
                 os.path.basename(device))
         except OSError as e:
             if e.errno == errno.ENODEV:
                 raise se.PhysDevInitializationError("%s: %s" %
                                                     (device, str(e)))
             else:
                 raise
示例#2
0
文件: lvm.py 项目: xin49/vdsm
 def _initpvs_removeHolders():
     """Remove holders for all devices."""
     for device in devices:
         try:
             devicemapper.removeMappingsHoldingDevice(
                 os.path.basename(device))
         except OSError as e:
             if e.errno == errno.ENODEV:
                 raise se.PhysDevInitializationError("%s: %s" %
                                                     (device, str(e)))
             else:
                 raise