Ejemplo n.º 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
Ejemplo n.º 2
0
Archivo: lvm.py Proyecto: 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