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

Javier Fontan jfontan at opennebula.org
Thu Feb 9 06:44:01 PST 2012


Many thanks for the tip. I've just reopened the ticket this change belongs to.

http://dev.opennebula.org/issues/1042

On Mon, Jan 30, 2012 at 8:58 PM, Håkan Iaksson <hakan.isaksson at init.se> wrote:
>
> 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
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



-- 
Javier Fontán Muiños
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula



More information about the Users mailing list