All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg <lego12239@yandex.ru>
To: qemu-devel@nongnu.org
Subject: qemu-nbd trouble
Date: Sun, 20 Dec 2020 22:48:25 +0300	[thread overview]
Message-ID: <20201220194825.GA25878@legohost> (raw)

Hi.

mkfs.ext4 on nbd device cause:

Discarding device blocks: failed - Input/output error

message.

The actions:

~# qemu-img create -f raw test.img 10G
Formatting 'test.img', fmt=raw size=10737418240
~# qemu-nbd -f raw -c /dev/nbd0 test.img
~# fdisk /dev/nbd0
...[PARTITION A DISK]...
~# fdisk -l /dev/nbd0
Disk /dev/nbd0: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe75e6795

Device      Boot Start      End  Sectors Size Id Type
/dev/nbd0p1       2048 20971519 20969472  10G 83 Linux
~# mkfs.ext4 /dev/nbd0p1 
mke2fs 1.45.2 (27-May-2019)
Discarding device blocks: failed - Input/output error
Creating filesystem with 2621184 4k blocks and 655360 inodes
Filesystem UUID: 442620a3-0f00-432b-884e-0f14d76a993a
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 
~# dmesg | tail
...[CUT]...
[64297.914937]  nbd0: p1
[64306.284714] block nbd0: Other side returned error (5)
[64306.284722] blk_update_request: I/O error, dev nbd0, sector 34816 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0


With qcow2 format i get the same problem. With losetup instead of qemu-nbd there is no errors.

kernel - 5.4.82(4.19.132 get the same error)
qemu - 5.0.0

-- 
Олег Неманов (Oleg Nemanov)


                 reply	other threads:[~2020-12-20 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201220194825.GA25878@legohost \
    --to=lego12239@yandex.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.