← Back to team overview

openstack team mailing list archive

Re: Error while creating cinder volume

 

Vish,

I didn't quite understand the latter part. The image size is 1.8G. In the output below, I attempted to create a bootable volume of size 2G. If that looks smaller for a virtual disk, I tried with 4G and failed with the same error. Could you suggest me the minimum size of the virtual disk for what I am trying here?

Thanks
Vibhu

From: Vishvananda Ishaya [mailto:vishvananda@xxxxxxxxx]
Sent: Thursday, January 17, 2013 12:16 AM
To: Bontala, Vibhuvardhan
Cc: openstack mail list
Subject: Re: [Openstack] Error while creating cinder volume

in folsom, cinder didn't automatically convert images to raw when creating a volume. This is necessary because a qcow written directly to a volume will not boot properly. This means you need to create a volume that is the size of the virtual disk.

Vish

On Jan 16, 2013, at 8:39 PM, "Bontala, Vibhuvardhan" <vibhuvardhan.bontala@xxxxxxx<mailto:vibhuvardhan.bontala@xxxxxxx>> wrote:


Hi,

I have a Glance image that I am using to create a Cinder volume using the native iSCSI driver. It had always worked in Folsom. But when I am trying for the first time on the Grizzly-2 code base, I am seeing an error. I have sufficient space in my root partition.

The command I used to create the Cinder volume is below.

cinder create 2 --image-id cca54f84-f0ff-4e8e-a9e9-671f4f1b5dc5 --display-name Vol1


2013-01-16 16:47:24.547 DEBUG cinder.utils [req-97f721cb-a87a-40f6-82ad-b3523b655800 4b84a5d2b68e4d3aa640b0888bbc606e 7525b3ad32a043b3b9ad2dded6c4a8e0] Running cmd (subprocess): sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf qemu-img convert -O raw /tmp/tmplZsSWZ /dev/mapper/stack--volumes-volume--730f75cc--24da--4838--9308--d56954eb4974 from (pid=27138) execute /opt/stack/cinder/cinder/utils.py:162
2013-01-16 16:47:24.661 DEBUG cinder.utils [req-97f721cb-a87a-40f6-82ad-b3523b655800 4b84a5d2b68e4d3aa640b0888bbc606e 7525b3ad32a043b3b9ad2dded6c4a8e0] Result was 1 from (pid=27138) execute /opt/stack/cinder/cinder/utils.py:179
2013-01-16 16:47:25.104 ERROR cinder.openstack.common.rpc.amqp [-] Exception during message handling
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 276, in _process_data
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     rval = self.proxy.dispatch(ctxt, version, method, **args)
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 145, in dispatch
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     return getattr(proxyobj, method)(ctxt, **kwargs)
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/volume/manager.py", line 236, in create_volume
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     self._copy_image_to_volume(context, volume_ref, image_id)
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/volume/manager.py", line 420, in _copy_image_to_volume
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     self.db.volume_update(context, volume_id, {'status': 'error'})
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     self.gen.next()
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/volume/manager.py", line 412, in _copy_image_to_volume
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     image_id)
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/volume/driver.py", line 676, in copy_image_to_volume
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     self.local_path(volume))
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/image/image_utils.py", line 233, in fetch_to_raw
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     convert_image(tmp, dest, 'raw')
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/image/image_utils.py", line 191, in convert_image
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     utils.execute(*cmd, run_as_root=True)
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp   File "/opt/stack/cinder/cinder/utils.py", line 186, in execute
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp     cmd=' '.join(cmd))
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp ProcessExecutionError: Unexpected error while running command.
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp Command: sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf qemu-img convert -O raw /tmp/tmplZsSWZ /dev/mapper/stack--volumes-volume--730f75cc--24da--4838--9308--d56954eb4974
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp Exit code: 1
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp Stdout: ''
2013-01-16 16:47:25.104 TRACE cinder.openstack.common.rpc.amqp Stderr: 'qemu-img: /dev/mapper/stack--volumes-volume--730f75cc--24da--4838--9308--d56954eb4974: error while converting raw: No space left on device\n'

I have sufficient space on the local hard disk. Below is the output for a bunch of useful commands to diagnose this issue.

stack@esg-dell-c4-s08:~$ df -H
Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/esg--dell--c4--s08-root   39G   17G   20G  47% /
udev                                  17G  4.1k   17G   1% /dev
tmpfs                                6.8G  361k  6.8G   1% /run
none                                 5.3M     0  5.3M   0% /run/lock
none                                  17G     0   17G   0% /run/shm
cgroup                                17G     0   17G   0% /sys/fs/cgroup
/dev/sdb1                            239M   76M  151M  34% /boot


stack@esg-dell-c4-s08:~$ sudo vgs
  VG              #PV #LV #SN Attr   VSize  VFree
  esg-dell-c4-s08   1   2   0 wz--n- 68.12g 48.00m
  stack-volumes     1   1   0 wz--n- 10.00g  8.00g


stack@esg-dell-c4-s08:~$ sudo lvs
  LV                                          VG              Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  root                                        esg-dell-c4-s08 -wi-ao 36.08g
  swap_1                                      esg-dell-c4-s08 -wi-ao 32.00g
  volume-195155d5-36cc-42bd-b7ef-67d725787147 stack-volumes   -wi-ao  2.00g


stack@esg-dell-c4-s08:~$ ls -alh /opt/stack/data/
total 2.1G
drwxr-xr-x  6 stack root  4.0K Jan 11 16:49 .
drwxr-xr-x 18 stack root  4.0K Jan 11 17:05 ..
drwxrwxr-x  3 stack stack 4.0K Jan 11 16:49 cinder
drwxrwxr-x  4 stack stack 4.0K Jan 11 16:48 glance
drwxrwxr-x  7 stack stack 4.0K Jan 11 16:51 nova
drwxr-xr-x  4 stack stack 4.0K Jan 16 17:04 quantum
-rw-rw-r--  1 stack stack  10G Jan 16 22:59 stack-volumes-backing-file

The image I am using is a 1.8GB qcow2 image. As I said, I never had an issue with the same image using Folsom code.

Has anyone been aware of this issue and have a solution?

Thanks
Vibhu Bontala
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Follow ups

References