cinder extend Bug : tgt update not implemented

Bug #1248415 reported by Hyun Ha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Jon Bernard

Bug Description

When using 'cinder extend' command, tgt update process doesn't implemented.

So, If you want to see extended size of volume inside your vm, you must run 'tgt-admin --update iqn.2010-10.org.openstack:volume-xxxxx' in hostmachine that has the extended volume .

See my test case as follow.

1. Create cinder volume
# cinder create --volume-type LVM01-type --display-name test-extend-vol01 3

2. List cinder volume & confirm the size 3 GB
# cinder list
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
| 885f850f-8e03-4576-a60d-5d3d1362a9da | available | test-extend-vol01 | 3 | LVM01-type | false | |
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+

3. run lvs command to confirm the size 3 GB
# lvs | grep 885f850f-8e03-4576-a60d-5d3d1362a9da
  volume-885f850f-8e03-4576-a60d-5d3d1362a9da cinder-volumes -wi-ao 3.00g

4. run 'tgt-admin --show' command to confirm the size 3 GB
# tgt-admin --show
Target 1: iqn.2010-10.org.openstack:volume-885f850f-8e03-4576-a60d-5d3d1362a9da
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET 00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET 00010001
            SCSI SN: beaf11
            Size: 3221 MB, Block size: 512
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/cinder-volumes/volume-885f850f-8e03-4576-a60d-5d3d1362a9da
            Backing store flags:
    Account information:
    ACL information:
        ALL

5. Extend cinder volume
# cinder extend 885f850f-8e03-4576-a60d-5d3d1362a9da 5

6. List cinder volume and confirm the extended size to 5 GB
# cinder list
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
| 885f850f-8e03-4576-a60d-5d3d1362a9da | available | test-extend-vol01 | 5 | LVM01-type | false | |
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+

7. Run 'lvs' command to confirm the extended size to 5 GB
# lvs | grep 885f850f-8e03-4576-a60d-5d3d1362a9da
  volume-885f850f-8e03-4576-a60d-5d3d1362a9da cinder-volumes -wi-ao 5.00g

8. Run 'tgt-admin --show' command to confirm the extended size to 5 GB , but it still 3 GB because didn't implemented 'tgt update'
# tgt-admin --show
Target 1: iqn.2010-10.org.openstack:volume-885f850f-8e03-4576-a60d-5d3d1362a9da
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET 00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET 00010001
            SCSI SN: beaf11
            Size: 3221 MB, Block size: 512
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/cinder-volumes/volume-885f850f-8e03-4576-a60d-5d3d1362a9da
            Backing store flags:
    Account information:
    ACL information:
        ALL

9. Run 'tgt-admin --update' command to update
# tgt-admin --update iqn.2010-10.org.openstack:volume-885f850f-8e03-4576-a60d-5d3d1362a9da

10. Run 'tgt-admin --show' command to confirm 5 GB updated
# tgt-admin --show
Target 1: iqn.2010-10.org.openstack:volume-885f850f-8e03-4576-a60d-5d3d1362a9da
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET 00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET 00010001
            SCSI SN: beaf11
            Size: 5369 MB, Block size: 512
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/cinder-volumes/volume-885f850f-8e03-4576-a60d-5d3d1362a9da
            Backing store flags:
    Account information:
    ACL information:
        ALL

Please check this bug and answer to me.

Thank you.

Hyun Ha (raymon-ha)
description: updated
Jon Bernard (jbernard)
Changed in cinder:
assignee: nobody → Jon Bernard (jbernard)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58599

Changed in cinder:
status: New → In Progress
Revision history for this message
Jon Bernard (jbernard) wrote :
Eric Harney (eharney)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/58599
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a9267644ee09591e2d642d6c1204d94a9fdd8c82
Submitter: Jenkins
Branch: master

commit a9267644ee09591e2d642d6c1204d94a9fdd8c82
Author: Jon Bernard <email address hidden>
Date: Thu Jan 2 16:28:59 2014 -0500

    LVM: update iscsi target on volume attach

    This patch updates the existing iSCSI target for a LVM volume during
    attach. This is necessary in the event that a user extended the volume
    after creation so that the correct size is visible to the host.

    This adds support only for tgtadm. Other changes may be needed for
    ietadm/lioadm to provide the same functionality.

    Change-Id: I185a90ffc4d50dd9f91381df07289476fa792043
    Closes-Bug: #1248415

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-2 → 2014.1
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.