LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   / disk full (https://www.linuxquestions.org/questions/linux-newbie-8/disk-full-712485/)

jenser2 03-18-2009 07:28 AM

/ disk full
 
Hi there,

when I tried to restart my linux box just now I got a disk full message. A 'df' revealed that / was 100% full, but also showed that /home is only 80% full. I deleted files in /tmp, which didn't seem to help, but then when I deleted some file in my home directory, located in /home/guser, some space started freeing up in /.

Could someone please explain to me what is going on here? Since there is free space in /home why does / show 100% full in 'df' output? And why does deleting files in /home then free up space in /?

I'm sure I'm just missing something basic here. My understanding is that / represents the entire physical disk, of which /home is a partition. Is this correct?

Thanks,

Jenser

repo 03-18-2009 07:33 AM

Depends how the disk is partitioned
what is the output from
Code:

fdisk -l

MensaWater 03-18-2009 07:35 AM

/home is a directory used as a mount point.

It is possible to put files in /home BEFORE the filesystem is actually mounted on the directory. Such files would be part of the root filesystem rather than the /home filesystem.

In single user scenario (which sometimes occurs when you can't boot normally) other filesystems have to be mounted manually. It may be you were deleting files from /home directory rather than /home filesystem.

Once you've mounted /home filesystem it would mask the files in the underlying directory.

Since you did a df and saw /home mounted as filesystem it shouldn't have been possible to have deleted files from the underlying directory. (There are ways to access the underling the directory even if /home is mounted but they're a bit involved and not likely something that happened by accident.)

bitpicker 03-18-2009 07:38 AM

Depends on how you set up your system. If you haven't put /home in a separate partition, then deleting something there will free space on /, as it is just a subdirectory. But if df tells you something about /home as separate from /, then it is in its own partition. Then deleting something on /home should not free space on /.

In any case there isn't enough space for / on your system. What partitions do you have?

I just reread your question: / does not represent the physical disk but the root partition. It could reside in one partition on the HD, and /home could be in another.

Post the full output of df so we can see what's wrong.

Robin

kirukan 03-18-2009 07:38 AM

[root@ramanan log]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdb1 2.0G 1.1G 852M 56% /
/dev/hda1 190M 11M 170M 7% /boot
none 252M 0 252M 0% /dev/shm
/dev/hda6 587M 18M 540M 4% /home
/dev/hda2 3.9G 2.9G 838M 78% /usr
/dev/hda8 5.3G 4.8G 284M 95% /usr2
/dev/hda5 788M 200M 548M 27% /var

here you can see / is mounted on hdb1, home is mounted on hda6 it means both are in different partations, likewise check your system whether / and home were mounted on different partations.(actually in here / is physically different harddisk)

ajlewis2 03-18-2009 09:21 AM

In addition to the good answers regarding a possible separate /home partition that isn't mounted when you actually delete files on the mountpoint, I'd like to know if you have a Debian/Ubuntu type install. If so, look at /var/cache/apt/archives and 'rm *.deb' to get rid of the stored files there.

I'm very curious to see the answer to this if you do not in fact have a separate /home partition.

SlowCoder 03-18-2009 10:52 AM

... and on top of all THAT ...

Check to be sure your logs (/ver/log) are being rotated out. If not, they could be a culprit.

jenser2 03-19-2009 09:05 AM

Hi guys,

thanks for all the replies. As it turned out, a program I've been running was logging to /pro which was why there was no space left on /. I created a symbolic link from /pro to /data/pro so now it's saving the logs where there is plenty of space. Well caught SlowCoder!

here is the output of df -h:

[66]GPSuser@GPSMet[/home/GPSuser]: df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 20G 6.6G 13G 36% /
udev 2.0G 128K 2.0G 1% /dev
/dev/sda7 561G 477G 56G 90% /home
/dev/sda2 108G 13G 95G 12% /windows/C
/dev/sdb1 294G 232G 47G 84% /data
/dev/sdc1 1.4T 419G 979G 30% /media/ed1

My set up is that I have two internal disks (sda and sdb) and an external (sdc) drive. As far as I can tell from this, the first internal disk has 4 partitions: /, /home, /windows and /dev. So I'm still confused as to why deleting files from /home affects the space available in /.

BTW, it's an OpenSUSE installation, not Debian/Ubuntu.


All times are GMT -5. The time now is 04:51 AM.