parted crashed with drbd devices

Bug #1286056 reported by Christoph
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VMBuilder
New
Undecided
Unassigned

Bug Description

In the disk.py on line 302 following happens:

# parted --script /dev/drbd4 mklabel msdos
# LANG=C strace -o out.log -ff parted --script /dev/drbd4 mkpart primary ext2 63s 1000
Warning: The resulting partition is not properly aligned for best performance.
Error: Error informing the kernel about modifications to partition /dev/drbd4p1 -- Invalid argument. This means Linux won't know about any changes you made to /dev/drbd4p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)

If I "strace" it, I have saw that:
ioctl(3, BLKPG, {BLKPG_ADD_PARTITION, flags=0, datalen=152, {start=32256, length=999968256, pno=1, devname="/dev/drbd4p1", volname=""}}) = -1 EINVAL (Invalid argument)
write(1, "Error: Error informing the kerne"..., 258) = 258
write(1, "Error: Failed to add partition 1"..., 52) = 52

DRBD can't work with partitions. But I use vmbuilder with --raw= options.
After I add the line with "ignore_fail=True" option, it works. (see patch).

Also it works with loop devices, but that is not consistent.

Revision history for this message
Christoph (chr-istoph) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.