[libvirt-users] mkfs fails on qemu-nbd device

Tanmoy Sinha tanmoy.sinha at gmail.com
Thu Jun 27 10:52:27 UTC 2019


Hi All,

I am unable to figure out the issue here, when I try to create a filesystem
(ext4) on a virtual disk using qemu-nbd. This happens intermittently.

Following is the sequence of commands:-

$> qemu-img create -f qcow2 test.qcow2 30G


$> qemu-nbd --connect=/dev/nbd0 test.qcow2


$> *mkfs.ext4 /dev/nbd0*
* mkfs.ext4: Device size reported to be zero.  Invalid partition specified,
or*
*Thu Jun 13 14:44:24 2019 partition table wasn't reread after running
fdisk, due to*
*Thu Jun 13 14:44:24 2019 a modified partition being busy and in use.  You
may need to reboot*
*Thu Jun 13 14:44:24 2019 to re-read your partition table.*


Following is the version details:

root at localhost:~# qemu-img --version

qemu-img version 2.8.1(Debian 1:2.8+dfsg-6+deb9u7)

Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers


root at localhost:~# qemu-nbd --version

qemu-nbd version 0.0.1

Written by Anthony Liguori.


Copyright (C) 2006 Anthony Liguori <anthony at codemonkey.ws>.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


root at localhost:~# uname -a

Linux localhost 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13)
x86_64 GNU/Linux

Regards
Tanmoy Sinha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20190627/05a3f91f/attachment.htm>


More information about the libvirt-users mailing list