wrong volume size inside guest?

Asked by Zoltan Arnold Nagy on 2011-04-19

After creating a 1 gig volume, it shows up as much larger volume. is this expected?

on the guest (fdisk -l):
Disk /dev/vdb: 21.5 GB, 21474836480 bytes

on the host (lvdisplay):

  --- Logical volume ---
  LV Name /dev/nova-volumes/volume-00000003
  VG Name nova-volumes
  LV UUID iedXcm-Qhpc-95hu-CLZE-kMg1-YvPV-OaQJu9
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 1.00 GiB
  Current LE 256
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 251:3

the iscsi volume looks fine:
root@openstack2:/opt/nova# cat /proc/net/iet/volume
tid:2 name:iqn.2010-10.org.openstack:volume-00000003
 lun:0 state:0 iotype:fileio iomode:wt blocks:2097152 blocksize:512 path:/dev/nova-volumes/volume-00000003

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Zoltan Arnold Nagy
Solved:
Last query:
Last reply:
Zoltan Arnold Nagy (zoltan) said : #1

interestingly, when I added a new volume, it showed up as expected...

Zoltan Arnold Nagy (zoltan) said : #2

found the difference in dumpxml:

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/opt/nova/nova/..//instances/instance-00000004/disk.local'/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/mapper/nova--volumes-volume--00000004'/>
      <target dev='vdc' bus='virtio'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>

the first volume was added as a local disk, instead of being added as an iSCSI volume, as the second one.

Vish Ishaya (vishvananda) said : #3

I think you figured this out, but disk.local is attached to /dev/vdb (for any instance size that has local storage). So you need to attach your volume at /dev/vdc. Keep in mind that the volume will attach at the next available spot regardless of what you specify, but it will fail to attach if any other volume has already been attached at the specified location.

On Apr 19, 2011, at 7:31 AM, Zoltan Arnold NAGY wrote:

> Question #153440 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153440
>
> Zoltan Arnold NAGY posted a new comment:
> found the difference in dumpxml:
>
> <disk type='file' device='disk'>
> <driver name='qemu' type='qcow2'/>
> <source file='/opt/nova/nova/..//instances/instance-00000004/disk.local'/>
> <target dev='vdb' bus='virtio'/>
> <alias name='virtio-disk1'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
> </disk>
> <disk type='block' device='disk'>
> <driver name='qemu' type='raw'/>
> <source dev='/dev/mapper/nova--volumes-volume--00000004'/>
> <target dev='vdc' bus='virtio'/>
> <alias name='virtio-disk2'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
> </disk>
>
> the first volume was added as a local disk, instead of being added as an
> iSCSI volume, as the second one.
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Zoltan Arnold Nagy (zoltan) said : #4

Thanks!

It was indeed a user error, I should have given it vdc, instead of vdb.