[lvm driver] should use lvextend capabilities

Bug #1887694 reported by Tom Barron on 2020-07-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Medium
Goutham Pacha Ravi

Bug Description

Currently, the lvm driver uses commands of the form 'lvextend -L <size> -n <device-name>' to extend the logical volume size, then calls 'resize2fs' to make a corresponding change to the filesystem in the logical volume.

We should not use the '-n' argument, which tells lvextend to skip file system checks. The checks are very fast if they are not needed and it is unsafe to skip them if they are.

Additionally, lvextend can take an option '-r' wherein it takes responsibility itself for resizing the filesystem built on the logical volume. We should use it since it is more atomic than and involves less external size judgment for the file system resize than processing the file system resize separately.

Tom Barron (tpb) on 2020-07-15
Changed in manila:
importance: Undecided → Medium
assignee: nobody → Tom Barron (tpb)
milestone: none → victoria-2
Changed in manila:
status: New → In Progress
Tom Barron (tpb) on 2020-07-15
tags: added: driver lvm
Changed in manila:
assignee: Tom Barron (tpb) → Goutham Pacha Ravi (gouthamr)

Reviewed: https://review.opendev.org/740492
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=c94e1deff1bde93d4167ceeb9dafc494d12cd60c
Submitter: Zuul
Branch: master

commit c94e1deff1bde93d4167ceeb9dafc494d12cd60c
Author: Tom Barron <email address hidden>
Date: Fri Jul 10 11:15:22 2020 -0400

    Update LVM volume extend

    - do *not* skip fsck when extending
    - have extend resize the filesystem itself
      rather than making a separate execution
      of ``resize2fs``

    Closes-bug: #1887694
    Change-Id: I67ac549e790322c56d02db4424ec01a5449e6633

Changed in manila:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/741488
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=2a3c18edcd9c4f7def293f18a6cac286ec00bc49
Submitter: Zuul
Branch: stable/ussuri

commit 2a3c18edcd9c4f7def293f18a6cac286ec00bc49
Author: Tom Barron <email address hidden>
Date: Fri Jul 10 11:15:22 2020 -0400

    Update LVM volume extend

    - do *not* skip fsck when extending
    - have extend resize the filesystem itself
      rather than making a separate execution
      of ``resize2fs``

    Closes-bug: #1887694
    Change-Id: I67ac549e790322c56d02db4424ec01a5449e6633

tags: added: in-stable-ussuri

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

Change abandoned by Tom Barron (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/742289
Reason: in favor of 742290

Change abandoned by Goutham Pacha Ravi (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/742290

Change abandoned by Tom Barron (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/742289

Change abandoned by Goutham Pacha Ravi (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/742289
Reason: We'll abandon this in favor of: https://review.opendev.org/#/c/743640/

Reviewed: https://review.opendev.org/743640
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=2063c93c078c990f4865994dc0221662cbc4c5d5
Submitter: Zuul
Branch: stable/train

commit 2063c93c078c990f4865994dc0221662cbc4c5d5
Author: Tom Barron <email address hidden>
Date: Fri Jul 10 11:15:22 2020 -0400

    Update LVM volume extend

    - do *not* skip fsck when extending
    - have extend resize the filesystem itself
      rather than making a separate execution
      of ``resize2fs``

    Due to an issue with Gerrit, we're unable
    to preserve the Change-ID for this change.
    The change-id in stable/ussuri and in the
    main branch is I67ac549e790322c56d02db4424ec01a5449e6633

    Closes-bug: #1887694
    Change-Id: Ieebd69ec9671d48f2d9de0ae3e110518cba4f6f9
    (cherry picked from commit c94e1deff1bde93d4167ceeb9dafc494d12cd60c)
    (cherry picked from commit 2a3c18edcd9c4f7def293f18a6cac286ec00bc49)

tags: added: in-stable-train

Reviewed: https://review.opendev.org/743711
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=e378f44598a9a2560f35948e108bc03f2bbb0adb
Submitter: Zuul
Branch: stable/stein

commit e378f44598a9a2560f35948e108bc03f2bbb0adb
Author: Tom Barron <email address hidden>
Date: Fri Jul 10 11:15:22 2020 -0400

    Update LVM volume extend

    - do *not* skip fsck when extending
    - have extend resize the filesystem itself
      rather than making a separate execution
      of ``resize2fs``

    Due to an issue with Gerrit, we're unable
    to preserve the Change-ID for this change.
    The change-id in stable/ussuri and in the
    main branch is I67ac549e790322c56d02db4424ec01a5449e6633

    Closes-bug: #1887694
    Change-Id: Ieebd69ec9671d48f2d9de0ae3e110518cba4f6f9
    (cherry picked from commit c94e1deff1bde93d4167ceeb9dafc494d12cd60c)
    (cherry picked from commit 2a3c18edcd9c4f7def293f18a6cac286ec00bc49)
    (cherry picked from commit 2063c93c078c990f4865994dc0221662cbc4c5d5)

tags: added: in-stable-stein

Reviewed: https://review.opendev.org/743791
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=d8c433044b01ada78530838ac4467af6d39e27b7
Submitter: Zuul
Branch: stable/rocky

commit d8c433044b01ada78530838ac4467af6d39e27b7
Author: Tom Barron <email address hidden>
Date: Fri Jul 10 11:15:22 2020 -0400

    Update LVM volume extend

    - do *not* skip fsck when extending
    - have extend resize the filesystem itself
      rather than making a separate execution
      of ``resize2fs``

    Due to an issue with Gerrit, we're unable
    to preserve the Change-ID for this change.
    The change-id in stable/ussuri and in the
    main branch is I67ac549e790322c56d02db4424ec01a5449e6633

    Closes-bug: #1887694
    Change-Id: Ieebd69ec9671d48f2d9de0ae3e110518cba4f6f9
    (cherry picked from commit c94e1deff1bde93d4167ceeb9dafc494d12cd60c)
    (cherry picked from commit 2a3c18edcd9c4f7def293f18a6cac286ec00bc49)
    (cherry picked from commit 2063c93c078c990f4865994dc0221662cbc4c5d5)
    (cherry picked from commit e378f44598a9a2560f35948e108bc03f2bbb0adb)

tags: added: in-stable-rocky

Reviewed: https://review.opendev.org/743974
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=eee6c4218fe376f78c5fa5edd28e605e114b585b
Submitter: Zuul
Branch: stable/queens

commit eee6c4218fe376f78c5fa5edd28e605e114b585b
Author: Tom Barron <email address hidden>
Date: Fri Jul 10 11:15:22 2020 -0400

    Update LVM volume extend

    - do *not* skip fsck when extending
    - have extend resize the filesystem itself
      rather than making a separate execution
      of ``resize2fs``

    Due to an issue with Gerrit, we're unable
    to preserve the Change-ID for this change.
    The change-id in stable/ussuri and in the
    main branch is I67ac549e790322c56d02db4424ec01a5449e6633

    Closes-bug: #1887694
    Change-Id: Ieebd69ec9671d48f2d9de0ae3e110518cba4f6f9
    (cherry picked from commit c94e1deff1bde93d4167ceeb9dafc494d12cd60c)
    (cherry picked from commit 2a3c18edcd9c4f7def293f18a6cac286ec00bc49)
    (cherry picked from commit 2063c93c078c990f4865994dc0221662cbc4c5d5)
    (cherry picked from commit e378f44598a9a2560f35948e108bc03f2bbb0adb)
    (cherry picked from commit d8c433044b01ada78530838ac4467af6d39e27b7)

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

Other bug subscribers