ONTAP does not support online extend for iSCSI and FCP

Bug #1874134 reported by Arthur Nascimento Santos
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Arthur Nascimento Santos

Bug Description

With the bug #1765182, it was assumed that the ONTAP didn't support the online extend, so a change was implemented [0] to prevent the volume to stay in error_extending status and log a message on cinder scheduler.

Actually, the ONTAP supports the online extend as shown below. The increasing of the size for a lun has limitations on ONTAP. For versions < 9.5 the limit for a resize is based on the initial geometry of the LUN and its limit is approximately 10 times the original size [1]. For versions >= 9.5 the limit is 16TB regardless of its original size [2] after the first resize.

# Environment

- Devstack on Master Branch
- Ubuntu 18.04
- ONTAP NetApp Release 9.6P2

stack@47-throne-dev-openstack:~$ nova list
+--------------------------------------+------+--------+------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+---------------------------------------------------------+
| 4899dcd9-18ef-4a59-ada1-98782d078fb1 | srv1 | ACTIVE | - | Running | private=fd9c:4b65:c6c9:0:f816:3eff:fe91:7306, 10.0.0.26 |

+--------------------------------------+------+--------+------------+-------------+---------------------------------------------------------+
stack@47-throne-dev-openstack:~$ cinder list
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| 4c2c2c9a-4e18-44f3-b034-5b0f27172a13 | in-use | vol1 | 1 | netappiscsi | false | 4899dcd9-18ef-4a59-ada1-98782d078fb1 |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
stack@47-throne-dev-openstack:~$ cinder extend vol1 2
stack@47-throne-dev-openstack:~$ cinder list
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| 4c2c2c9a-4e18-44f3-b034-5b0f27172a13 | in-use | vol1 | 2 | netappiscsi | false | 4899dcd9-18ef-4a59-ada1-98782d078fb1 |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
stack@47-throne-dev-openstack:~$ cinder extend vol1 64
stack@47-throne-dev-openstack:~$ cinder list
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| 4c2c2c9a-4e18-44f3-b034-5b0f27172a13 | in-use | vol1 | 64 | netappiscsi | false | 4899dcd9-18ef-4a59-ada1-98782d078fb1 |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+

- ONTAP NetApp Release 9.4P1

stack@47-throne-dev-openstack:~$ cinder list
+--------------------------------------+--------+------+------+--------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+--------------+----------+--------------------------------------+
| 298c192d-856b-4da5-b755-ad826dc13aed | in-use | vol2 | 1 | netappiscsi2 | false | 2072c0e9-0ad4-4154-b63c-f5a6ad2de1f3 |
+--------------------------------------+--------+------+------+--------------+----------+--------------------------------------+
stack@47-throne-dev-openstack:~$ cinder extend vol2 64
stack@47-throne-dev-openstack:~$ cinder list
+--------------------------------------+-----------------+------+------+--------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------------+------+------+--------------+----------+--------------------------------------+
| 298c192d-856b-4da5-b755-ad826dc13aed | error_extending | vol2 | 1 | netappiscsi2 | false | 2072c0e9-0ad4-4154-b63c-f5a6ad2de1f3 |
+--------------------------------------+-----------------+------+------+--------------+----------+--------------------------------------+

- c-vol log for 9.4
Apr 20 19:59:21.744314 47-throne-dev-openstack cinder-volume[25517]: ERROR cinder.volume.manager cinder.exception.VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Volume volume-298c192d-856b-4da5-b755-ad826dc13aed cannot be resized from 1073741824 to 68719476736, because would exceed its max geometry 68718428160 while not being detached.

[0] https://opendev.org/openstack/cinder/commit/792eea0a12bd97f69294ad0570ac330a3f1fe423
[1] https://docs.netapp.com/ontap-9/index.jsp?topic=%2Fcom.netapp.doc.dot-cm-cmpr-920%2Flun__resize.html
[2] https://docs.netapp.com/ontap-9/index.jsp?topic=%2Fcom.netapp.doc.dot-cm-sanag%2FGUID-E27C32B4-136F-41E2-99B8-0A9D9BE461D0.html

Revision history for this message
Lucio Seki (lseki) wrote :

A newly created LUN on ONTAP has a max-resize limit that varies according to
its initial size. For instance, a LUN with initial size of 1GB has max-resize
of 64GB.

ONTAP is unable to directly resize a LUN beyond its max-resize. For instance,
an 1GB LUN cannot be directly extended to 65GB.

When such an extend operation is requested, ONTAP Cinder driver performs the
sub-clone-resize operation, which is done in 3 steps:
1. Create a new LUN with the desired size
2. Copy the data from the old LUN to the new LUN
3. Replace the old LUN with the new LUN

The step 3. would disconnect the LUN from any instance it's attached to. So the
driver prevents this by raising an exception and leaving the Cinder volume in
error_extending state [0].
That's why online extend feature is not supported by ONTAP Cinder driver.

However, after some tests, we realized that this issue can be easily addressed.

The volume create operation can be done in 2 steps:
1. Create a LUN with initial size of 15.97TB
2. Shrink it to the actual desired size
The step 1. will automatically set the LUN's max-resize to 15.97TB, which is
the max LUN size that ONTAP supports. After the step 2., the LUN will remain
with the max-resize of 15.97TB.

For ONTAP >=9.5, there's a better way to achieve this:
1. Create a LUN with initial size of 4MB
2. Extend it to the actual desired size
On ONTAP >=9.5, regardless the initial and final size, a LUN will have
max-resize of 15.97TB after its first resize operation.

By implementing the steps above on volume create method, every new Cinder
volume will be able to be extended to any size up to 15.97TB without the need
to do the sub-clone-resize operation. And therefore, the connection to the
instance will remain untouched.

This solution has another benefit. Currently, an extend operation from 63GB to
64GB requires 63GB of data to be copied from the old LUN to the new one.
As there'll be no more sub-clone-resize operation, the extend operation in
general will have an improved performance.

[0] https://github.com/openstack/cinder/blob/stable/ussuri/cinder/volume/drivers/netapp/dataontap/block_base.py#L607

Revision history for this message
Lucio Seki (lseki) wrote :

Actually, for ONTAP >=9.5, a newly created LUN has no resize limit. It can be resized up to 15.97TB from the beginning.

However, before the first resize operation, ONTAP erroneously reports max-resize for this LUN as 64GB, and that's why the Cinder driver fails to extend an attached volume from 1GB to beyond 64GB [0].

So for ONTAP >=9.5, we just need to stop checking the max-resize of the LUN.

[0] https://github.com/openstack/cinder/blob/stable/ussuri/cinder/volume/drivers/netapp/dataontap/block_base.py#L598

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/729782

Changed in cinder:
assignee: nobody → Arthur Nascimento Santos (throne82)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/729782
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=510613e135b639776246d46c3d7977208d0fbfd8
Submitter: Zuul
Branch: master

commit 510613e135b639776246d46c3d7977208d0fbfd8
Author: Arthur Nascimento Santos <email address hidden>
Date: Thu Mar 26 14:04:23 2020 +0000

    NetApp ONTAP: Fix extend volume for iSCSI/FCP

    Due to a characteristic on ONTAP devices, the volume extend
    operation has a max resize size limited by underlying LUN's
    geometry, so the support for extend online volumes was
    disabled.

    This patch fixes it by allowing a volume (attached or not)
    to be extended up to 16TB, which is the max LUN size
    supported by ONTAP.

    NFS online_extend_support is still disabled due to a bug [0]
    found on the generic implementation for NFS driver, which
    ONTAP NFS driver relies on.

    Closes-Bug: #1874134

    [0] https://bugs.launchpad.net/cinder/+bug/1870367

    Change-Id: I2812d71b23f27fe8be4e9a757094867f71b1afa2

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/737267

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/ussuri)

Reviewed: https://review.opendev.org/737267
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8c55df95dc8f8997d0391f789e0461a48d601fde
Submitter: Zuul
Branch: stable/ussuri

commit 8c55df95dc8f8997d0391f789e0461a48d601fde
Author: Arthur Nascimento Santos <email address hidden>
Date: Thu Mar 26 14:04:23 2020 +0000

    NetApp ONTAP: Fix extend volume for iSCSI/FCP

    Due to a characteristic on ONTAP devices, the volume extend
    operation has a max resize size limited by underlying LUN's
    geometry, so the support for extend online volumes was
    disabled.

    This patch fixes it by allowing a volume (attached or not)
    to be extended up to 16TB, which is the max LUN size
    supported by ONTAP.

    NFS online_extend_support is still disabled due to a bug [0]
    found on the generic implementation for NFS driver, which
    ONTAP NFS driver relies on.

    Closes-Bug: #1874134

    [0] https://bugs.launchpad.net/cinder/+bug/1870367

    Change-Id: I2812d71b23f27fe8be4e9a757094867f71b1afa2
    (cherry picked from commit 510613e135b639776246d46c3d7977208d0fbfd8)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/738124

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/train)

Reviewed: https://review.opendev.org/738124
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=f13475f718d6d4fdab61ebeb3b76bdfd87bda403
Submitter: Zuul
Branch: stable/train

commit f13475f718d6d4fdab61ebeb3b76bdfd87bda403
Author: Arthur Nascimento Santos <email address hidden>
Date: Thu Mar 26 14:04:23 2020 +0000

    NetApp ONTAP: Fix extend volume for iSCSI/FCP

    Due to a characteristic on ONTAP devices, the volume extend
    operation has a max resize size limited by underlying LUN's
    geometry, so the support for extend online volumes was
    disabled.

    This patch fixes it by allowing a volume (attached or not)
    to be extended up to 16TB, which is the max LUN size
    supported by ONTAP.

    NFS online_extend_support is still disabled due to a bug [0]
    found on the generic implementation for NFS driver, which
    ONTAP NFS driver relies on.

    Closes-Bug: #1874134

    [0] https://bugs.launchpad.net/cinder/+bug/1870367

    Change-Id: I2812d71b23f27fe8be4e9a757094867f71b1afa2
    (cherry picked from commit 510613e135b639776246d46c3d7977208d0fbfd8)
    (cherry picked from commit 8c55df95dc8f8997d0391f789e0461a48d601fde)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/759934

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/stein)

Reviewed: https://review.opendev.org/759934
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=836cda0121e052a18b725053501b8b309fa041c1
Submitter: Zuul
Branch: stable/stein

commit 836cda0121e052a18b725053501b8b309fa041c1
Author: Arthur Nascimento Santos <email address hidden>
Date: Thu Mar 26 14:04:23 2020 +0000

    NetApp ONTAP: Fix extend volume for iSCSI/FCP

    Due to a characteristic on ONTAP devices, the volume extend
    operation has a max resize size limited by underlying LUN's
    geometry, so the support for extend online volumes was
    disabled.

    This patch fixes it by allowing a volume (attached or not)
    to be extended up to 16TB, which is the max LUN size
    supported by ONTAP.

    NFS online_extend_support is still disabled due to a bug [0]
    found on the generic implementation for NFS driver, which
    ONTAP NFS driver relies on.

    Closes-Bug: #1874134

    [0] https://bugs.launchpad.net/cinder/+bug/1870367

    Change-Id: I2812d71b23f27fe8be4e9a757094867f71b1afa2
    (cherry picked from commit 510613e135b639776246d46c3d7977208d0fbfd8)
    (cherry picked from commit 8c55df95dc8f8997d0391f789e0461a48d601fde)
    (cherry picked from commit f13475f718d6d4fdab61ebeb3b76bdfd87bda403)

tags: added: in-stable-stein
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.