LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-27-2007, 03:50 AM   #1
vinje83
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Rep: Reputation: 0
Weird disk usage


Hi.

I have a really strange situastion. The / is mounted on a 19GB partition and /home in a 19GB partition. The / seems to be full (using df), but there are just a few files on the partition so it should not be full. When I take "du -hs *" it only reports a couple of GB maximum.

I just can't figure out how to free some disk space, but it's propably a logically explenation. Another thing is that when I take df it just reports the root partition, not the /home. Anyone have a clue?

here's some info:

debox:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 19G 19G 0 100% /
tmpfs 126M 0 126M 0% /dev/shm

debox:/# du --max-depth=1 -h
48K ./lost+found
16G ./home
12M ./etc
12K ./media
233M ./var
753M ./usr
3.2M ./bin
5.2M ./boot
100K ./dev
34M ./lib
147G ./mnt
259M ./proc
132K ./root
3.3M ./sbin
12K ./tmp
4.0K ./sys
4.0K ./srv
4.0K ./opt
4.0K ./initrd
164G .

# /etc/fstab: static file system information.

#

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
/dev/hda4 /home ext3 defaults 0 0
/dev/hda2 none swap sw 0 0
/dev/hdd /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hdc1 /mnt/hdc1 ext3 defaults 0 0
/dev/hdd1 /mnt/hdd1 ext3 defaults 0 0

Cfdisk:

Disk Drive: /dev/hda

Size: 40020664320 bytes, 40.0 GB

Heads: 16 Sectors per Track: 63 Cylinders: 77545



Name Flags Part Type FS Type [Label] Size (MB)

------------------------------------------------------------------------------

hda1 Primary Linux ext2 32.52

hda2 Primary Linux swap / Solaris 512.49

hda3 Primary Linux ext3 [/] 19999.76

hda4 Primary Linux ext3 [/home] 19475.92
 
Old 06-27-2007, 08:41 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Your home directory is under the root partition; the root partition is full because home is taking up 16GB the other 3GB may be taken up by the OS files. You need to empty out home or move it to a bigger partition.
 
Old 06-27-2007, 10:13 AM   #3
vinje83
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ramram29
Your home directory is under the root partition; the root partition is full because home is taking up 16GB the other 3GB may be taken up by the OS files. You need to empty out home or move it to a bigger partition.
Thanks for the answer, but I don't think that's the problem, because if I delete a file under /home there is no more free space on the root partition (it's enough to delete a file with rm?). Also if you look at the fstab file the /home is mounted from /dev/hda4 and / udner /dev/hda3. The harddisk is 40Gb, and each of the partitions is approx 20GB.

I just tried some fsck.ext2 on the root filesystem, and it found some errors which gave me 4.2MB free. I first remounted the partition to read only. Now, when I take " mount -o remount,rw /" I get the error "mount: block device /dev/hda3 is write-protected, mounting read-only". Likewise I can delete from the /home. Is it a way to remount / without rebooting?
 
Old 06-27-2007, 10:22 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Now, when I take " mount -o remount,rw /" I get the error "mount: block device /dev/hda3 is write-protected, mounting read-only"
.
I think you still have errors then.
fsck.ext3 -f /dev/hda3

You really can't reboot?
 
Old 06-27-2007, 01:55 PM   #5
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You might have a bad or failing hard disk. I would suggest to boot with Knoppix and try to rescue it; back it up also before you try anything.
 
Old 06-27-2007, 04:04 PM   #6
vinje83
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nx5000
.
I think you still have errors then.
fsck.ext3 -f /dev/hda3

You really can't reboot?
I did this about 10 times, and now there's no more errors.
It might be harddisk failure, everything works fine except that the disk seems to be full. It's been like this for two years, but I always had about 200-500 MB free, but now it's full. But, if it was the disk, itsn't it odd that the /home partition (on the same disk) works just fine? I have 16Gb of data there.
Anyway, I will probably try a reboot this weekend. The reason I don't want to reboot is that the postfix has 20 mails in the queue, and I really don't want to loose them.... is there a way to read them from the queue?

Last edited by vinje83; 06-27-2007 at 04:06 PM.
 
Old 06-29-2007, 04:46 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by vinje83
I did this about 10 times, and now there's no more errors.
10 times!
At the end of the fsck you should have an important warning message. If it says, fs not clean then yes you have to redo it.
If it says clean and you rerun it and you still get errors then I suspect your disk to be dying?!
Quote:
It might be harddisk failure, everything works fine except that the disk seems to be full. It's been like this for two years, but I always had about 200-500 MB free, but now it's full. But, if it was the disk, itsn't it odd that the /home partition (on the same disk) works just fine? I have 16Gb of data there.
Anyway, I will probably try a reboot this weekend. The reason I don't want to reboot is that the postfix has 20 mails in the queue, and I really don't want to loose them.... is there a way to read them from the queue?
The bad sectors can be at several places but only on the / partition. Maybe you had a poweroutage and files were opened on /.

You should really really check with badblocks!

I lived for 2y with badsectors. THe more I was using them, the more they were dying.
One day, you can't access anything anymore.
 
Old 07-05-2007, 04:13 PM   #8
vinje83
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
I just found the solution to my problem. The /mnt/hdd1 was actually the same harddisk as the / partition. It's really odd, because in my /etc/fstab i can see that /mnt/hdd1 is mounted from /dev/hdd1, and / is from /dev/hda3, and /home from /dev/hda4.
I have no idea why this happened, but I'm glad I solved the problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
weird memory usage newlinuxnewbie Linux - General 2 11-23-2005 04:35 PM
Disk Usage kegwell Linux - Software 2 05-11-2005 10:59 AM
101% disk usage on an empty disk tsiuser Linux - Software 3 01-28-2004 06:24 PM
Disk Usage dvong3 Linux - Software 2 06-13-2003 12:56 PM
redhat 7.2 df usage is weird chens_83 Linux - General 2 10-29-2002 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration