Somehow looks like the creation of the nbd device does not reliably trigger the partition scanning in kernel. The following work-around would at least here get past the problem:
--- /usr/bin/mount-image-callback 2016-09-01 22:07:51.000000000 +0200 +++ mount-image-callback 2016-09-28 11:46:29.404822620 +0200 @@ -321,6 +321,7 @@ debug 1 "unpartitioned disk." else debug 1 "partitioned disk." + blockdev --rereadpt $nbd fi ptnum=$nptnum fi
Somehow looks like the creation of the nbd device does not reliably trigger the partition scanning in kernel. The following work-around would at least here get past the problem:
--- /usr/bin/ mount-image- callback 2016-09-01 22:07:51.000000000 +0200 callback 2016-09-28 11:46:29.404822620 +0200
+++ mount-image-
@@ -321,6 +321,7 @@
debug 1 "unpartitioned disk."
else
debug 1 "partitioned disk."
+ blockdev --rereadpt $nbd
fi
ptnum=$nptnum
fi