[one-users] Wrong image-size reported by oneimage

Håkan Iaksson hakan.isaksson at init.se
Mon Jan 30 11:58:30 PST 2012


 In opennebula-3.2.0 every VMware-image that is created with oneimage 
 has the wrong size (as reported by "oneimage list").

 The problem is in $ONE_LOCATION/var/remotes/image/fs/fsrc

 The du command is used on dirs, and reports the size in kilobytes, but 
 the expected
 size is in bytes (as reported by stat if the image is only a file).

 Here is a diff that makes the size calculation work properly for us:
 diff fsrc fsrc.org
 68c68
 < 		SIZE=`du -sb "$1" | cut -f1`
 ---
> 		SIZE=`du -s "$1" | cut -f1`


 Note: The -b switch will probably only work on Linux/Unixes that has 
 the GNU du-command.

 ---
 Håkan Isaksson
 Init


More information about the Users mailing list