Where is my 2G? - BUG in Ubuntu?
Thomas Sprinkmeier
thomas.sprinkmeier at gmail.com
Wed Apr 11 20:13:29 CST 2007
On Tue, 2007-04-10 at 11:15 +0930, 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?
run
mount
mount -a
mount
mount -a means "mount all the stuff in /etc/fstab" and it's supposed to
be run during boot.
Running it manually might tell you what the problem is.
> As a temporary fix I copied the dot files from hdb7 to hda2/home.
dot files?
> 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! :-)
>
> 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?
run
lsof | grep deleted
If you delete a file that's open the file hangs around until it's
closed. Something might be hanging on to a few large files in /home.
lsof will find such files.
/proc is a virtual filesystem. It does not contain actual files and
folders, just kernel information exported in a friendly way.
Do NOT mess with /proc/kcore, it's a file representing your RAM!
> How can I restore my system to health and have the 5G free
> on hda2 I should have?
run
tune2fs -l /dev/hdb7
and look for "Reserved block count". By default ext3 reserves 5% of your
disk for root. This might be where you missing diskspace is.
Also, disk GB = 1e9 bytes
df GB = 1024 ** 3 bytes
so you 'loose' about 7% of your disk that way.
Thomas
More information about the linuxsa
mailing list