qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Format type of qemu NVMe virtual drive reverted back to its default (512 bytes block size) after performing hot plugout/plugin operation on that drive.
@ 2023-07-25 11:23 Ashutosh Sharma
  2023-08-03  9:44 ` Klaus Jensen
  0 siblings, 1 reply; 2+ messages in thread
From: Ashutosh Sharma @ 2023-07-25 11:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: peterx, k.jensen, philmd, armbru, mst, lukasz.gieryk,
	alex.williamson, helgaas, afaria

Hi,

I have a virtual system created using qemu 7.2. In that system, I
attached/hot plugged a virtual NVMe drive. This drive had a default
block size of 512 bytes.

admin@node-3:~$ sudo nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          ashudev-6f34a1cf_13  QEMU NVMe Ctrl
             1          34.36  GB /  34.36  GB    512   B +  0 B
7.1.92

After that, I formatted this drive with 4k block size and it formatted
successfully.

admin@node-3:~$ sudo nvme format /dev/nvme0n1 -f --lbaf 4
Success formatting namespace:1
admin@node-3:~$
admin@node-3:~$ sudo nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          ashudev-6f34a1cf_13  QEMU NVMe Ctrl
             1          34.36  GB /  34.36  GB      4 KiB +  0 B
7.1.92

Then, I just performed the hot plugout and then plugin operation on
that drive using qmp.execute's device_del and device_add cmd
respectively.

But, after that, the default block size of that drive reverted to 512 bytes.

admin@node-3:~$ sudo nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          ashudev-6f34a1cf_13  QEMU NVMe Ctrl
             1          34.36  GB /  34.36  GB    512   B +  0 B
7.1.92

So, I just wanted to know why the NVMe format type reverted back to
512 bytes, as I just performed the hot plugout/plugin operations only.
Drive's block size (format type) should not be changed upon
removal/insertion, right ? or am I missing something ?

Regards,
Ashutosh


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-03  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 11:23 Format type of qemu NVMe virtual drive reverted back to its default (512 bytes block size) after performing hot plugout/plugin operation on that drive Ashutosh Sharma
2023-08-03  9:44 ` Klaus Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).