<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4109</bug_id>
          
          <creation_ts>2013-03-26 08:34:14 +0000</creation_ts>
          <short_desc>qemu image free space too small</short_desc>
          <delta_ts>2013-04-17 02:24:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>General Runtime</product>
          <component>General Runtime</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ning Zhang">ning.zhang</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>hongxu.jia</cc>
    
    <cc>kai.kang</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sen.zhang</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>31163</commentid>
    <comment_count>0</comment_count>
    <who name="Ning Zhang">ning.zhang</who>
    <bug_when>2013-03-26 08:34:14 +0000</bug_when>
    <thetext>Image location: http://autobuilder.yoctoproject.org/pub/nightly/20130321-2/

Branch: poky/master
Git rev: 9ffee9add2d0380f4025e7a678a166f25a7d659e

Test steps:
1. start a qemumips-sato, execute df -h, it has 91.5M free space.
2. run smart test, it should be pass. The smart downloads repodata_filelists.xml, repodata_filelists.xml and other files, these files need around 90M space.
3. start the qemumips-sato again, execute df -h, it has 0 free space.
4. Do other tests, many of them will failed because no free space lift.

Same issue happend on qemuppc-sato.

So I suggest to increase the qemu free space.

=========test log===============
start a qemumips-sato, execute df -h, it has 91.5M free space.

root@qemumips:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               373.9M    263.4M     91.5M  74% /
devtmpfs                 58.4M      4.0K     58.4M   0% /dev
tmpfs                    40.0K         0     40.0K   0% /mnt/.psplash
tmpfs                    58.6M    184.0K     58.4M   0% /var/volatile
tmpfs                    58.6M         0     58.6M   0% /media/ram

after run smart test, it will use 87.7M space.

root@qemumips:/var/lib/smart# du -sh
87.6M	.

root@qemumips:/var/lib/smart/channels# ls -l
-rw-r--r--    1 root     root      42420977 Mar 26 07:05 myrpmmd%%http:__192.168.7.1_rpmrepo_qemumips_repodata_filelists.xml
-rw-r--r--    1 root     root       3772550 Mar 26 01:49 myrpmmd%%http:__192.168.7.1_rpmrepo_qemumips_repodata_filelists.xml.gz
-rw-r--r--    1 root     root      29450004 Mar 26 07:05 myrpmmd%%http:__192.168.7.1_rpmrepo_qemumips_repodata_primary.xml
-rw-r--r--    1 root     root       4059596 Mar 26 01:49 myrpmmd%%http:__192.168.7.1_rpmrepo_qemumips_repodata_primary.xml.gz
-rw-r--r--    1 root     root           951 Mar 26 01:49 myrpmmd%%http:__192.168.7.1_rpmrepo_qemumips_repodata_repomd.xml

After run smart test, execute df -h, it has 0 free space.

root@qemumips:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               373.9M    373.9M         0 100% /
devtmpfs                 58.4M      4.0K     58.4M   0% /dev
tmpfs                    40.0K         0     40.0K   0% /mnt/.psplash
tmpfs                    58.6M    176.0K     58.4M   0% /var/volatile
tmpfs                    58.6M         0     58.6M   0% /media/ram</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31288</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-03-29 09:36:36 +0000</bug_when>
    <thetext>The image size is determined by the initial IMAGE_ROOTFS size and the IMAGE_OVERHEAD_FACTOR which defaults to 1.3.

meta/conf/bitbake.conf:IMAGE_OVERHEAD_FACTOR ?= &quot;1.3&quot;

Two solutions to solve this problem.

1. Resize the ext3 file locally

For example, if we want to add 100M to core-image-sato.ext3 image, we could use the following commands.

dd if=/dev/zero of=core-image-sato.ext3 bs=1M count=100 oflag=append conv=notrunc
e2fsck -f core-image-sato.ext3
resize2fs core-image-sato.ext3

2. override IMAGE_OVERHEAD_FACTOR in core-image-sato.bb file
IMAGE_OVERHEAD_FACTOR = &quot;2.0&quot;

I&apos;ll send out a patch using solution 2.
This problem will obviously occur to all sato images and block automatic testing, so these&apos;s enough reason to do so.

Any comment or suggestion is welcome.

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31465</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-04-03 17:58:13 +0000</bug_when>
    <thetext>I understand what you are trying to do here, do the tests clean-up after they run?

I am a little hesitant to add so much additional space, we have 2 conflicting goals with the size of the image. 

1) Show a compact example with graphical interface (not bloat-ware or full desktop).  

2) Use it for automated testing with enough space for running the tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32257</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-04-17 02:23:40 +0000</bug_when>
    <thetext>Now We use a small smart repository. Now the index file reduce to a small size. The test can pass.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>