Where is my 2G? - BUG in Ubuntu?

Matthew Kuiken matt.kuiken at verizon.net
Tue Apr 10 15:02:54 UTC 2007


Brian Astill wrote:
> That 2G I "lost" is still lost :-(
> Worse, when I login Dapper insists I have no home directory!
> 
> /etc/fstab says:
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> /dev/hda2       /               ext3    defaults,errors=remount-ro 0       1
> /dev/hdb7       /home           ext3    defaults        0       1
> /dev/hda5       none            swap    sw              0       0
> /dev/hdc        /media/cdrom0   udf,iso9660 ro,user,noauto  0       0
> /dev/hdd        /media/cdrom1   udf,iso9660 ro,user,noauto  0       0
> /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
> 
> So, what the fsck?  What have I done wrong, or what have I forgotten?
> 
> As a temporary fix I copied the dot files from hdb7 to hda2/home.  
> Not only does this "work", but Ubuntu then recognises home on hda7!
> But, as you can see below, the overall effect is that I have moved 3.9G
>  of files away from hda2 for a net gain of 200M!  :-)

All of this is just confusing to me.  I would bet that the data taking 
up your drive space is in the home directory that is overlaid by the 
mounted home.  To check, I would try booting in recovery mode, so that 
you are the root user in a console, and home is not being used for 
anything.  At this point, umount /dev/hdb7.
Change to the home directory, and anything that is in there (except . 
and ..) are files that will take up space, but not be accessible while 
home is mounted.  Deleting them should get your space back.
Did I mention that you should have backups?  :)

> 
> root at hoarykde:/ # df
> Filesystem           1K-blocks Used Available Use% Mounted on
> /dev/hda2             11661852   9028288   2041168  82% /
> varrun                  387788       144    387644   1% /var/run
> varlock                 387788         4    387784   1% /var/lock
> udev                    387788       152    387636   1% /dev
> devshm                  387788         0    387788   0% /dev/shm
> lrm                     387788     18856    368932   5% /lib/modules/2.6.15-28-386/volatile
> /dev/hdb7             11258648   3903072   6783664  37% /home  
> 
> I found kcore - 804.8M - in /proc with all the zero-length files 
> and directories.  Could this be part of the problem? 

The proc file system is more like a memory construct which can tell you 
the state of your system.  I don't know what its size really means, but 
I do know that it does not really take up any disk space.

> 
> How can I restore my system to health and have the 5G free
>  on hda2 I should have?

Try the stuff I mentioned above, and report back the answers to the 
list.  If there are no files there, we may need to go hunting.

> 
> Thanks.
>   

You're welcome,
-Matt





More information about the ubuntu-users mailing list