ganeti / instance-debootstrap

Debootstrap instance OS (migrated from http://git.ganeti.org/?p=instance-debootstrap.git;a=summary)
GNU General Public License v2.0
4 stars 13 forks source link

Description: Skip newer sfdisk's check using the BLKRRPART ioctl #3

Closed apoikos closed 6 years ago

apoikos commented 6 years ago

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.