• J
    storage: Fix virStorageBackendDiskDeleteVol for device mapper · 8cdff0b9
    John Ferlan 提交于
    Commit id 'df1011ca' modified virStorageBackendDiskDeleteVol to use
    "dmsetup remove --force" to remove the volume, but left things in an
    inconsistent state since the partition still existed on the disk and
    only the device mapper device (/dev/dm-#) was removed.
    
    Prior to commit '1895b421' (or '1ffd82bb' and '471e1c4e'), this could
    go unnoticed since virStorageBackendDiskRefreshPool wasn't called.
    However, the pool would be unusable since the /dev/dm-# device would
    be removed even though the partition was not removed unless a multipathd
    restart reset the link. That would of course make the volume appear again
    in the pool after a refresh or pool start after libvirt reload.
    
    This patch removes the 'dmsetup' logic and re-implements the partition
    deletion logic for device mapper devices. The removal of the partition
    via 'parted rm --script #' will cause udev device change logic to allow
    multipathd to handle removing the dm-* device associated with the partition.
    8cdff0b9
configure.ac 94.0 KB