qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [SPDK] How to setup a QEMU system disk by using SPDK?


From: Bob Chen
Subject: Re: [Qemu-block] [SPDK] How to setup a QEMU system disk by using SPDK?
Date: Tue, 5 Jun 2018 13:47:42 +0800



2018-06-05 11:47 GMT+08:00 Bob Chen <address@hidden>:


2018-06-05 2:58 GMT+08:00 Harris, James R <address@hidden>:


On 6/4/18, 5:52 AM, "SPDK on behalf of Stefan Hajnoczi" <address@hidden on behalf of address@hidden> wrote:

    On Mon, Jun 04, 2018 at 03:46:16PM +0800, Bob Chen wrote:
    > Hi, guys
    >
    > I have setup a SPDK lvol as a data disk, and run QEMU with it, as per the
    > vhost documents instructed.
    >
    > Then I exposed a empty lvol to host nbd, and used `dd` to copy a existing
    > raw disk into lvol, which contains a guest OS. But the guest was not able
    > to boot.
    >
    > Was there any step that I missed?

    Please post your QEMU command-line, spdk command-line, and the error
  message that you got.

I suspect this is because all SPDK logical volumes are exposed with 4KB logical block size.  IIRC, Seabios legacy boot doesn’t support 4KB logical block devices.  UEFI boot should work but we don’t have automated tests set up for that yet.

I will have a try for UEFI boot-loader. 
 

I think SPDK logical volumes could be exposed with 512 byte logical block size, if the underlying block device has a 512 byte logical block size.  Using 4KB LBA simplified the implementation a bit and all metadata has to use 4KB for atomicity.  But talking with Ben we don’t see any reason 512 byte for read/write/unmap operations wouldn’t work.  We may have to use feature bits though so that this change in behavior only applies to newly created logical volumes.

Bob – I’m curious if you can boot your VM with the SPDK logical volume as a secondary disk?

 Yes, we could. Although we were able to see the device in the VM, that disk with the guest OS inside still couldn't be mounted. Seemed like read-only or corrupted.

Because SPDK by far does not provide a method to import or export volume metadata to a external file, we came up with this thought and managed to copy data by `dd` and nbd. Not very straight forward...


Good news, UEFI works! Now Qemu can boot on the SPDK system disk successfully.

What we are expecting next is a more portable way to import/export volume.

 


-Jim


_______________________________________________
SPDK mailing list
address@hidden
https://lists.01.org/mailman/listinfo/spdk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]