Ask Your Question
1

How to attach volume for instance on /dev/hda [closed]

asked 2013-05-17 03:03:22 -0600

Ph4nToM gravatar image

updated 2013-06-12 06:16:52 -0600

fifieldt gravatar image

Hello everybody,

I've a little problem. For the moment, I can attach my instance on /dev/vdb

image description

But with an ISO image when I try to attach my volume, I can see that it's try to attach to /dev/hda

image description

After that, the volume is not attach and I have the same state than before:

image description

I need to use a volume to boot with my instance which use iso image.

Maybe somebody have an idea?

edit retag flag offensive reopen merge delete

Closed for the following reason too localized by Ph4nToM
close date 2013-06-13 03:53:18.937214

Comments

I have similar issue. wondering how to change the type...by default, it's ide even though I set the driver to iscsi in tgt.conf

ns gravatar imagens ( 2013-05-21 17:16:04 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
2

answered 2013-05-22 04:53:09 -0600

sushan.pth gravatar image

updated 2013-05-24 06:22:21 -0600

Following steps worked for me:-

  1. Suspend the Instance and copy the instance ID from instance details.
  2. Go to command-line and view volume list.

    #nova --os-username <user> --os-tenant-name <project> --os-password <password> volume-list

  3. Then run following command to attach volume to instance. Replace ID of instance and volume (copy from above command output) and device ex. /dev/sdc or /dev/vdx

    #nova --os-username <user> --os-tenant-name <project> --os-password <password> volume-attach <server-id> <volume-id> <device>

This is most likely problem with Hyperviser. Are you using KVM or QEMU (Xen)?

NOTE:- If above command gives any error you may need to set following variables:-

   export OS_AUTH_URL="http://<keystone-server-ip>:5000/v2.0/"
edit flag offensive delete link more
2

answered 2013-05-22 06:41:18 -0600

Ph4nToM gravatar image

updated 2013-05-23 01:45:54 -0600

> Following steps worked for me:-
> 
>     Suspend the Instance and copy the instance ID from instance details.
> 
>     Go to command-line and view volume list.
> 
>     #nova --os-username <user> --os-tenant-name <project> --os-password <password> volume-list
> 
>     Then run following command to attach volume to instance. Replace ID
> of instance and volume (copy from
> above command output) and device ex.
> /dev/sdc or /dev/vdx
> 
>     #nova --os-username <user> --os-tenant-name <project> --os-password <password> volume-attach <server-id> <volume-id> <device>
> 
> This is most likely problem with
> Hyperviser. Are you using KVM or QEMU
> (Xen)?
> 
> NOTE:- If above command gives any
> error you may need to set following
> variables:-
> 
>    export
> OS_AUTH_URL="http://<keystone-server-ip>:5000/v2.0/"

It's a good idea. I tried to do that but the VM is not yet attached with the volume.

1) I list the ID from instance details.

image description

2) I list the ID from volume.

image description

3) I run following command to attach volume to instance

image description

4) Then, when I watch my volume's state, is not attached:

image description

I think your idea is good, but I have maybe done something wrong.. Have you an idea?

edit flag offensive delete link more

Comments

2

Did you suspended the Instance before doing this?

sushan.pth gravatar imagesushan.pth ( 2013-05-23 02:51:54 -0600 )edit
1

I suspended and it works. Thanks for all your responses!

Ph4nToM gravatar imagePh4nToM ( 2013-05-27 01:25:17 -0600 )edit

you cannot attach volume to an instance in the suspended state.

socfreak390 gravatar imagesocfreak390 ( 2015-06-10 01:16:27 -0600 )edit
0

answered 2013-06-07 09:13:28 -0600

rabi gravatar image

updated 2013-06-07 09:16:28 -0600

Install sysfsutils package on all controller and compute nodes.

And try to do a soft or hard reboot for the instance to which you want to add the volume from horizone-console and try again to attach it with /dev/vdx. (Where x can be any alphabet which is not used for the instance yet.)

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2013-05-17 03:03:22 -0600

Seen: 5,265 times

Last updated: Jun 07 '13