Bug 918809 - nova volume-attach device nodes
Summary: nova volume-attach device nodes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: doc-Getting_Started_Guide
Version: 2.0 (Folsom)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.1
Assignee: Stephen Gordon
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-06 22:43 UTC by Eric Harney
Modified: 2023-09-18 09:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-11 06:58:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eric Harney 2013-03-06 22:43:35 UTC
Description of problem:
The "Getting Started" guide in "16.2. Attaching a Volume using the Command Line Interface" describes:

""
$ nova volume-attach INSTANCE_ID VOLUME_ID auto

The auto parameter indicates that Nova must attempt to automatically assign assign a device identifier to the volume within the guest. Alternatively you may specify a device identifier such as /dev/vdb.

""


The latter part of this needs more explanation because it seems that providing /dev/vdb may not actually assign that device node to the disk -- it seems to behave as if you have specified "auto".  This is unfortunate since the device node is a required parameter for volume-attach.

https://bugs.launchpad.net/nova/+bug/1004328 has some info on this
as does http://www.mail-archive.com/openstack@lists.launchpad.net/msg15593.html

I think we need to document an explanation of how/if this works for RHOS.

Comment 2 Thomas Oulevey 2013-03-07 08:26:20 UTC
* /dev/vdb does not exist:
$ nova volume-attach INSTANCE_ID VOLUME_ID auto
-> volume is set to /dev/vdb

$ nova volume-attach INSTANCE_ID VOLUME_ID/dev/vdx
-> volume is set to /dev/vdb

* /dev/vdb exists:
$ nova volume-attach INSTANCE_ID VOLUME_ID auto
-> volume is set to /dev/vdc

$ nova volume-attach INSTANCE_ID VOLUME_ID /dev/vdx
-> volume is set to /dev/vdc

The main issue is that horizon dashboard and cli tools report the command line user choice while the volume is set to default.

Comment 4 Stephen Gordon 2013-03-12 21:49:59 UTC
I updated the statement to read "The <parameter>auto</parameter> parameter indicates that Nova must attempt to automatically assign assign a device identifier to the volume within the guest. Manual allocation of specific device identifiers within the guest is not supported on KVM hypervisors at this time."

The fact that the client tools (incl. the dashboard) will report whatever the user enters for this parameter even though it is never applied (except where it is coincidentally the same as what auto would select) is all the more reason to tell them not to use anything but auto in my opinion.

Comment 5 Stephen Gordon 2013-03-12 21:57:05 UTC
Moving back to ASSIGNED, still need to consider a second patch to highlight the use of disk-by-id to identify the volumes. Seems more reliable than the advice we have in the guide currently, even when using auto.

Comment 6 Stephen Gordon 2013-03-13 18:37:45 UTC
commit dae53f6d79e4902561a81efae49908d867620525
Author: Stephen Gordon <sgordon>
Date:   Wed Mar 13 14:34:16 2013 -0400

    BZ#918809 - Use /dev/disk/by-id/ to access volumes.
    
    Attached volumes are now exposed to guests under both the
    traditional device tree (/dev/vd*) and by ID (/dev/disk/by-id/).
    
    Using the latter volumes attached to Nova compute instances now
    expose part of their Cinder ID, allowing users to uniquely
    identify them from inside the guest. The information on
    accessing volumes from inside instances has been updated to
    reflect that this is a more desirable way of referring to the
    instances.
    
    The example for formatting a volume has been updated to access
    the volume in this way and the IDs used have been replicated
    to the rest of the content to ensure consistency.
    
    Change-Id: If69553c911a92cea0384e634f5df6a4295fe734d


Note You need to log in before you can comment on or make changes to this bug.