Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description: Skip newer sfdisk's check using the BLKRRPART ioctl
Newer sfdisk versions (>= 2.26) issue a BLKRRPART ioctl to check if a device is in use prior to partitioning it. However, the BLKRRPART ioctl may fail for a number of other reasons, including when a device is allocated as non-partitionable using alloc_disk(1). Since DRBD and LVM devices are allocated as non-partionable, sfdisk will always think they're busy and fail. Since we're dealing with DRBD and LVM devices mostly, we need to work our way around this and pass `--no-reread` if sfdisk supports it.
- Loading branch information