Bug 222556

Summary: Incorrect warning during installation "almost no disk space left"
Product: [openSUSE] openSUSE 10.2 Reporter: Richard Bos <richard.bos>
Component: InstallationAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: peter.schlaf, rhardy703
Version: Beta 2 plus   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Log files
Incorrect disk full error message

Description Richard Bos 2006-11-19 21:45:17 UTC
During the installation of suse-10.2b2 I get a warning stating:
"almost no disk space left".  This is after the insertion of disk-3.

During the installation I partitioned the disk, I choose the standard
installation with kde and gnome added to it:

The calculated results is than (most important partitions):
- /usr: 46%
- /opt 45%
- / 38%

That seems more than enough free left on the system, for the installation.

So, why does the yast complain about lack of diskspace.  It is very confusing
as I can continue the installation without problems.  It looks like
OpenOffice is the culprit package.

File system usage before CD3 inserted
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             301M  140M  146M  49% /mnt
/dev/hda11            100G   33M  100G   1% /mnt/home
/dev/hda6             1.6G  741M  797M  49% /mnt/opt
/dev/hda9             1.6G   33M  1.5G   3% /mnt/tmp
/dev/hda7             2.6G  1.4G  1.2G  54% /mnt/usr
/dev/hda8             1.6G   69M  1.5G   5% /mnt/var
/dev/hda10            1.6G   33M  1.5G   3% /mnt/var/tmp
/dev/hdc              671M  671M     0 100% /mnt/var/tmp/AP_0x00000001
Comment 1 Richard Bos 2006-11-19 21:46:18 UTC
Created attachment 106172 [details]
Log files
Comment 2 Stefan Hundhammer 2006-11-20 11:23:32 UTC
Well, /mnt is where the new / (root) file system is mounted. There are only 140 MB left. You'll get that warning if any file system gets filled up to 90% or more and those remaining 10% are less than 90 MB.

I can't tell from the logs exactly which package triggered that warning, but only 301 MB for / looks awfully small to me. You don't need that much to get that filled; just think of all the stuff that may go to all kinds of subdirectories in /etc.

For example, I have 6.4 MB in /etc/opt, 2.7 MB in /etc/X11, 2.7 MB in /etc/cups, 2.3 MB directly in /etc. That makes 21.0 MB total in all of /etc.

If you get that warning, there is very likely a good reason for it.
Comment 3 Richard Bos 2006-11-21 21:36:14 UTC
> I can't tell from the logs exactly which package triggered that warning, but
> only 301 MB for / looks awfully small to me. 

I have used this setup for quite some years and never got this warning.
I adapted a previous arrangement as that was too smalll to have the kernel
updated.

> You don't need that much to get
> that filled; just think of all the stuff that may go to all kinds of
> subdirectories in /etc.

I have 58 MB in /etc/ and /bin is 7.1 MB and /boot is 7.8 MB. 300 MB
is plenty of room for "/", especially after the installation as
I have 140 MB left.

> Well, /mnt is where the new / (root) file system is mounted. There are only 140
> MB left. You'll get that warning if any file system gets filled up to 90% or
> more and those remaining 10% are less than 90 MB.

So 90% of 300 M is 270M.  140 MB is currently available:
270 - 140 = 130 MB.  So there should be a package
that uses more 130 MB of diskspace?

# for i in $(rpm -ql OpenOffice_org); do [[ -f $i ]] && ls -l $i; done | awk '{total += $5 } END {print total}'
283622759
With is the same as:
# rpm -q --qf "%{SIZE}\n" OpenOffice_org
283694447

Now let's how much is installed in /usr:
# for i in $(rpm -ql OpenOffice_org | grep /usr); do [[ -f $i ]] && ls -l $i; done | awk '{total += $5 } END {print total}'
283578968

I assume that when I increase the "/" partition with 150MB (that means it
size should become 300 + 150 = 450 M), the error won't be there.  But this
is hiding the root cause, isn't?

Yast (or the tool that generates the error) is looking at the wrong partition,
and is therefor giving this incorrect error message.
But this is strange as the error, I believe, occurs before packages are really
installed.  I don't know who the calculation is done before the packages
on the CD(3) are installed.  Can anything be said about that?

Comment 4 Richard Bos 2006-11-22 08:06:52 UTC
Something weird is going on indeed;
I'm trying to install mediawiki, that requires some other pkgs.
So I select these with yast, with comes with the message that / root
will be occupied with more than 157% of diskspace.  See attachment.
The dependent packages are:
cjk-latex-4.5.2-237.i586.rpm
freetype-tools-1.3.1-1188.i586.rpm
gd-2.0.32-44.i586.rpm
latex-ucs-20041017-26.noarch.rpm
te_latex-3.0-52.i586.rpm
tetex-3.0-52.i586.rpm

I installed those in /usr/tmp/install and the resuls is:
# ls -1 | grep -v rpm
etc
sbin
usr
var

Those directories require:
124K    etc
20K     sbin
212M    usr
9,0M    var

So "/" gets only 144K (etc + sbin).  The rest is stored in
/usr (has 766 M free) and /var (which has 1.3GB) free.

The only thing is that a check for the installed files (in /usr/tmp/install),
that some files are missing:

etc/texmf/ls-R
etc/ttf2pk
etc/ttf2pk/ttfonts.map

usr/bin/ttf2bdf
usr/bin/ttf2pfb
usr/bin/ttf2pk
usr/bin/ttf2tfm
usr/bin/ttfbanner
usr/share/doc/packages/freetype-tools
usr/share/doc/packages/freetype-tools/freetype-tools-doc
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2bdf
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2bdf/README
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pfb
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pfb/TODO
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pk
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pk/BUGS
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pk/dvidrv.doc
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pk/README
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pk/TODO
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttf2pk/ttf2pk.doc
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttfbanner
usr/share/doc/packages/freetype-tools/freetype-tools-doc/ttfbanner/README
usr/share/man/man1/ttf2bdf.1.gz
usr/share/man/man1/ttf2pk.1.gz
usr/share/man/man1/ttf2tfm.1.gz
usr/share/texmf/ls-R
usr/share/texmf/ttf2pk
usr/share/texmf/ttf2pk/Big5.sfd
usr/share/texmf/ttf2pk/ET5.enc
usr/share/texmf/ttf2pk/EUC.sfd
usr/share/texmf/ttf2pk/SJIS.sfd
usr/share/texmf/ttf2pk/T1-WGL4.enc
usr/share/texmf/ttf2pk/ttfonts.map
usr/share/texmf/ttf2pk/UBg5plus.sfd
usr/share/texmf/ttf2pk/UBig5.sfd
usr/share/texmf/ttf2pk/UGBK.sfd
usr/share/texmf/ttf2pk/UGB.sfd
usr/share/texmf/ttf2pk/UJIS.sfd
usr/share/texmf/ttf2pk/UKS.sfd
usr/share/texmf/ttf2pk/Unicode.sfd
usr/share/texmf/ttf2pk/VPS.rpl
usr/share/texmf/ttf2tfm
usr/share/texmf/ttf2tfm/Big5.sfd
usr/share/texmf/ttf2tfm/ET5.enc
usr/share/texmf/ttf2tfm/EUC.sfd
usr/share/texmf/ttf2tfm/SJIS.sfd
usr/share/texmf/ttf2tfm/T1-WGL4.enc
usr/share/texmf/ttf2tfm/UBg5plus.sfd
usr/share/texmf/ttf2tfm/UBig5.sfd
usr/share/texmf/ttf2tfm/UGBK.sfd
usr/share/texmf/ttf2tfm/UGB.sfd
usr/share/texmf/ttf2tfm/UJIS.sfd
usr/share/texmf/ttf2tfm/UKS.sfd
usr/share/texmf/ttf2tfm/Unicode.sfd
usr/share/texmf/ttf2tfm/VPS.rpl

var/cache/fonts/ls-R
var/lib/texmf/db/ls-R
var/lib/texmf/doc/helpindex.html
var/lib/texmf/ls-R


However, most of these are in /usr and only a few are in /etc and /var.
I assume that the 3 files in /etc and /var are not consuming more than 130 MB....

What goes wrong here?
Comment 5 Richard Bos 2006-11-22 08:08:22 UTC
Created attachment 106516 [details]
Incorrect disk full error message
Comment 6 Stefan Hundhammer 2006-11-22 13:34:52 UTC
Lada, something seems to be very wrong here either with zypp::DiskUsage or with the underlying meta data.
Comment 7 Richard Bos 2006-11-22 14:47:26 UTC
For confirmation, after installing 30 packages for mediawiki, with some
complaints from yast about not enough diskspace the results is the following:

suse102b2:/usr/tmp/install # df -kh                        
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             301M  172M  115M  60% /
udev                  189M  116K  189M   1% /dev
/dev/hda11            100G   33M  100G   1% /home
/dev/hda6             1.6G 1021M  517M  67% /opt
/dev/hda9             1.6G   33M  1.5G   3% /tmp
/dev/hda7             2.6G  2.1G  513M  81% /usr
/dev/hda8             1.6G  331M  1.2G  22% /var
/dev/hda10            1.6G  476M  1.1G  31% /var/tmp
/dev/hdc              654M  654M     0 100% /mnt

As you can see, each partition has enough space left.  There is no
need to give any errors during the installation. "/" obtained only 15 M
additional files.

The following packages were installed:
mediawiki-plugins-1.7.1-21                    Wed Nov 22 15:25:13 2006
mediawiki-1.8.2-8                             Wed Nov 22 15:25:10 2006
apache2-mod_php5-5.2.0-6                      Wed Nov 22 15:24:34 2006
cjk-latex-4.5.2-238                           Wed Nov 22 15:24:14 2006
lilypond-2.8.7-10                             Wed Nov 22 15:23:48 2006
apache2-2.2.3-16                              Wed Nov 22 15:22:38 2006
php5-mysql-5.2.0-6                            Wed Nov 22 15:22:24 2006
mftrace-1.2.5-8                               Wed Nov 22 15:22:09 2006
apache2-prefork-2.2.3-16                      Wed Nov 22 15:22:06 2006
php5-gettext-5.2.0-6                          Wed Nov 22 15:22:02 2006
te_latex-3.0-54                               Wed Nov 22 15:21:48 2006
php5-pdo-5.2.0-6                              Wed Nov 22 15:17:56 2006
php5-zlib-5.2.0-6                             Wed Nov 22 15:17:44 2006
tetex-3.0-54                                  Wed Nov 22 15:17:27 2006
libapr-util1-1.2.7-22                         Wed Nov 22 15:00:10 2006
php5-5.2.0-6                                  Wed Nov 22 15:00:03 2006
ec-fonts-mftraced-1.0.12-33                   Wed Nov 22 14:59:46 2006
latex-ucs-20041017-27                         Wed Nov 22 14:59:08 2006
fontforge-20061014-10                         Wed Nov 22 14:58:48 2006
mysql-shared-5.0.26-5                         Wed Nov 22 14:57:28 2006
libapr1-1.2.7-19                              Wed Nov 22 14:57:13 2006
graphviz-2.6-40                               Wed Nov 22 14:57:10 2006
gd-2.0.32-45                                  Wed Nov 22 14:56:46 2006
mm-1.4.2-16                                   Wed Nov 22 14:56:43 2006
autotrace-0.31.1-400                          Wed Nov 22 14:56:40 2006
libedit-2.9.snap20061022-4                    Wed Nov 22 14:56:36 2006
freetype-tools-1.3.1-1189                     Wed Nov 22 14:56:34 2006
t1utils-1.26-281                              Wed Nov 22 14:56:27 2006

It's incrediable that it takes more than 30 minutes to install only
30 packages. Something should really be done about is.  A collegue already
started to use another distribution, because of this.  That might be only
1 person to you, but he has quite some influence in the company, so it might
not remain with only 1 person....  I know that this already reported in
another bugreport, but this (incorrect disk space usage and slow installation)
is fustrating.




Comment 8 Ladislav Slezák 2006-11-27 09:54:43 UTC
There are two problems in the slideshow callbacks:

The check tests only '/' directory ('/mnt' during installation), if many files are installed into another partitions then the calculated usage is wrong.


The second problem is that the test code is:

   disk_usage + 2 * pkg_size > disk_capacity

So the package size is doubled (which is correct if the installation source is a FTP/HTTP source - the package must be downloaded to the local disk before installation), but if no download is required (e.g. NFS, CD, local source...) then its wrong. And of course the problem happens during installation of a big package like OpenOffice.org.

Comment 9 Robby Verberne 2006-11-28 11:42:09 UTC
I have the same errors now on RC1, 32bit:
/root: -750kb..
Comment 10 Robby Verberne 2006-11-28 11:44:28 UTC
after an update: -1.8M free.
Comment 11 Robby Verberne 2006-11-28 11:45:53 UTC
After the warning, i get imediately the real values, showed in YaST2..though
Comment 12 Ladislav Slezák 2007-01-19 07:35:19 UTC
*** Bug 222512 has been marked as a duplicate of this bug. ***
Comment 13 Ladislav Slezák 2007-01-25 12:28:05 UTC
*** Bug 233498 has been marked as a duplicate of this bug. ***
Comment 14 Ladislav Slezák 2007-01-25 16:09:34 UTC
Fixed in yast2-packager-2.15.4