XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Large QCOW2 VDI on LVM SR fails to activate with make_chain_rw / Input/output error

    Scheduled Pinned Locked Moved XCP-ng
    2 Posts 2 Posters 16 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • samuelolavoS
      samuelolavo
      last edited by

      Hi,

      I am trying to understand whether I am hitting a bug, a known limitation, or a configuration issue when using a large QCOW2 VDI on an LVM SR.

      Environment

      I have an existing VM with several virtual disks.

      Most of the data disks are approximately 2 TiB and were created as VHD VDIs. They have been working correctly for a long time.

      Example:

      virtual-size: ~2 TiB
      image-format: vhd
      vdi_type: vhd
      

      Inside the guest, several of these disks are combined using LVM to provide a larger filesystem.

      The Xen Orchestra instance is built directly from source and kept up to date from the upstream source tree.

      The storage repository involved is an existing local LVM SR that has been in production for several years. It was not newly created for this test and has been used successfully with VHD VDIs over that period.

      I now need to add significantly more storage and would prefer to avoid continuing to add multiple ~2 TiB VHD disks.

      I therefore created a new 15 TiB virtual disk using the current Xen Orchestra build.

      The disk was automatically created as QCOW2:

      virtual-size: 16492674416640
      image-format: qcow2
      vdi_type: qcow2
      Storage Repository
      

      The VDI is stored on the existing local LVM SR.

      The SR has approximately:

      Total size: ~44 TiB
      Free after creating the new VDI: ~4 TiB

      There was sufficient free space before creating the new 15 TiB VDI.

      At the LVM level, the QCOW2 LV is present and has the expected size:

      QCOW2-<uuid> ~15.00 TiB
      Problem

      When the 15 TiB QCOW2 disk is attached to the VM, the VM fails to start.

      Xen Orchestra reports:

      SR_BACKEND_FAILURE_46

      The VDI is not available
      [opterr=['XENAPI_PLUGIN_FAILURE',
      'make_chain_rw',
      'CommandException',
      'Input/output error']]

      The same VM starts normally when this QCOW2 VDI is removed or detached.

      All the existing VHD disks on the same SR continue to work normally.

      Relevant SMlog output

      The Storage Manager detects the QCOW2 LV and can query its size.

      For example:

      blockdev --getsize64 /dev/<VG>/QCOW2-<uuid>

      succeeds.

      It also executes:

      qemu-img measure \
      -O qcow2 \
      --output json \
      -o cluster_size=65536 \
      --size 16492674416640
      

      successfully.

      The failure happens during VDI activation:

      BLKTAP2:<function VDI._activate_locked ...>:
      EXCEPTION <class 'XenAPI.Failure'>,

      ['XENAPI_PLUGIN_FAILURE',
      'make_chain_rw',
      'CommandException',
      'Input/output error']

      self._make_chain_rw()

      File "/opt/xensource/sm/LVMSR.py", line ..., in _make_chain_rw
      raise Failure(result['ErrorDescription'])
      Current VM disk layout

      Simplified layout:

      System disk VHD
      Home disk VHD

      ~2 TiB VHD
      ~2 TiB VHD
      ~2 TiB VHD
      ~2 TiB VHD
      ~2 TiB VHD
      ~2 TiB VHD
      ~2 TiB VHD
      ~2 TiB VHD

      15 TiB QCOW2 <-- new disk causing the failure

      The existing VHD disks work correctly.

      The problem only appeared after adding the large QCOW2 VDI.

      Questions

      Is a 15 TiB QCOW2 VDI on an existing local LVM SR expected to work reliably on current XCP-ng 8.3?

      Is mixing VHD and QCOW2 VDIs on the same VM and on the same SR fully supported?

      Could the fact that this is an older LVM SR created several years ago make any difference with the newer QCOW2 support?

      Does the following error correspond to any known QCOW2/LVM issue?

      make_chain_rw
      CommandException
      Input/output error

      Are there specific minimum versions of xapi, sm, blktap, or other storage components required for large QCOW2 VDIs?

      Would a different SR type be recommended for VDIs of this size, or should this configuration work normally?

      The Xen Orchestra instance is built from source and kept current, so I am mainly trying to determine whether the issue is on the XCP-ng/storage side rather than the XO side.

      I can provide additional anonymized SMlog, package versions, qemu-img output and LVM diagnostics if required.

      Thanks.

      dthenotD 1 Reply Last reply
      Reply Quote 1
      • dthenotD
        dthenot Vates 🪐 XCP-ng Team @samuelolavo
        last edited by

        @samuelolavo Hello,

        It is indeed linked to QCOW2.

        Is mixing VHD and QCOW2 VDIs on the same VM and on the same SR fully supported?

        Yes, it's supposed to work.

        Are there specific minimum versions of xapi, sm, blktap, or other storage components required for large QCOW2 VDIs?

        Yes, but we would prefer for people to be uptodate, we have been fixing things.
        But I don't think it's a problem for you at the moment.

        make_chain_rw is necessary for the master to make the QCOW2 LV RW at the VDI activation time. So it's likely linked to this particular QCOW2.

        make_chain_rw is executed on the master host and is logging in /var/log/SMlog, could you take a look at what it's erroring on?

        1 Reply Last reply
        Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post