Bug 709960 - No error to handle overcommit storage
Summary: No error to handle overcommit storage
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-02 05:46 UTC by zhanghaiyan
Modified: 2011-08-15 19:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-15 19:45:23 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhanghaiyan 2011-06-02 05:46:43 UTC
Description of problem:
No error to handle overcommit storage

Version-Release number of selected component (if applicable):
libvirt-0.8.2-20.el5
2.6.18-264.el5xen
xen-3.0.3-132.el5

How reproducible:
always

Steps to Reproduce:
1. Prepare a little size storage and mkfs.ext3
# fdisk -l /dev/sda3
Disk /dev/sda3: 16 MB, 16450560 bytes
255 heads, 63 sectors/track, 2 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda3 doesn't contain a valid partition table
# mkfs.ext3 /dev/sda3
2. Prepare the followng pool xml:
<pool type='fs'>
  <name>mypool</name>
  <source>
    <device path='/dev/sda3'/>
    <format type='auto'/>
  </source>
  <target>
    <path>/var/lib/libvirt/images/mypool</path>
  </target>
</pool>
Define, build and start the pool
# virsh pool-define fs-pool.xml
# virsh pool-build mypool
# virsh pool-start mypool
3. # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              48G   20G   26G  45% /
tmpfs                 3.7G     0  3.7G   0% /dev/shm
none                  3.7G  104K  3.7G   1% /var/lib/xenstored
/dev/sda3              16M   16M     0 100% /var/lib/libvirt/images/mypool
4. # for i in `seq 100`; do sed "s/#NUMBER#/$i/g" vol-disk-template.xml > vol-disk.xml; virsh vol-create mypool vol-disk.xml; done
Vol disk1.img created from vol-disk.xml

Vol disk2.img created from vol-disk.xml

Vol disk3.img created from vol-disk.xml
....

Vol disk99.img created from vol-disk.xml

Vol disk100.img created from vol-disk.xml
5. # virsh vol-list --pool mypool
Name                 Path                                    
-----------------------------------------
disk1.img            /var/lib/libvirt/images/mypool/disk1.img
disk10.img           /var/lib/libvirt/images/mypool/disk10.img
disk100.img          /var/lib/libvirt/images/mypool/disk100.img
....
6. # cd /var/lib/libvirt/images/mypool/
# ls
disk10.img  disk19.img  disk27.img  disk35.img  disk43.img  disk6.img
disk11.img  disk1.img   disk28.img  disk36.img  disk44.img  disk7.img
disk12.img  disk20.img  disk29.img  disk37.img  disk45.img  disk8.img
disk13.img  disk21.img  disk2.img   disk38.img  disk46.img  disk9.img
disk14.img  disk22.img  disk30.img  disk39.img  disk47.img  lost+found
disk15.img  disk23.img  disk31.img  disk3.img   disk48.img
disk16.img  disk24.img  disk32.img  disk40.img  disk49.img
disk17.img  disk25.img  disk33.img  disk41.img  disk4.img
disk18.img  disk26.img  disk34.img  disk42.img  disk5.img
# ll /var/lib/libvirt/images/mypool/disk100.img
ls: /var/lib/libvirt/images/mypool/disk100.img: No such file or directory

Actual results:
In step6, as the storage limited, not all 100 images are created successfully actually.

Expected results:
Some error should pops up like below
error: Failed to create vol from vol-disk.xml
error: cannot create path '/var/lib/libvirt/images/mypool/disk100.img': No space left on device

Additional info:

Comment 1 zhanghaiyan 2011-06-02 06:11:44 UTC
# cat vol-disk-template.xml
<volume>
  <name>disk#NUMBER#.img</name>
  <capacity unit='M'>5</capacity>
  <allocation unit='M'>5</allocation>
  <target>
    <path>/var/lib/libvirt/images/mypool/disk#NUMBER#.img</path>
    <format type='raw'/>
  </target>
</volume>

Comment 2 Huming Jiang 2011-06-02 09:22:09 UTC
Could reproduce this bug on the following components of rh5.6:
libvirt-0.8.2-15.el5
kernel-xen-2.6.18-238.el5
xen-3.0.3-120.el5

Steps:
same as above.

Comment 3 RHEL Program Management 2011-06-21 05:32:55 UTC
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.7 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.

Comment 5 RHEL Program Management 2011-08-15 19:45:23 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.


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