LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A filesystem question (https://www.linuxquestions.org/questions/linux-newbie-8/a-filesystem-question-898127/)

2007fld 08-18-2011 01:58 PM

A filesystem question
 
Below is the output when I run df -h:
Quote:

Filesystem Size Used Avail Use% Mounted on
/dev/sda5 996M 780M 165M 83% /
/dev/sda8 116G 197M 109G 1% /data.local
/dev/sda7 494M 11M 458M 3% /home
/dev/sda3 3.9G 1.1G 2.6G 30% /usr
/dev/sda2 3.9G 260M 3.5G 7% /var
/dev/sda1 122M 7.6M 108M 7% /boot
Below is the output when I run ls -l at root home dir:
Quote:

bin dev home lib64 lost+found mnt proc sbin srv tmp var
boot data.local etc lib license.txt media opt root selinux sys usr
So can I assume /tmp, or /etc, or /lib64 are using the storgae that is 83% full? How to decide which sub directory under / will have its own file system? like, why /var has its own file system? Is it true that one partition will hold one and only one file system?

Thanks!

acid_kewpie 08-18-2011 02:14 PM

no, they are not using that, as the clearly have their own partition. This is decided by you or the installer. /var gets filled with logs and such, so you keep it seperate to, amongst other reasons, stop logs making your main disks run out of space. A partition can do loads of things. For example, sda4 on your disk will be an extended partition holding other logical partitions. an LVM partition can also hold an thousand separate filesystems if so desired.

2007fld 08-18-2011 02:20 PM

Thanks. So if / is 83% full, what directories need to be looked at in order to clean some space?

I have listed all the partitions on the server above. If /tmp or /etc is not using the partition that is at 83%, then which partion it is using?

acid_kewpie 08-18-2011 02:26 PM

all the other directories that DON'T have their own partition

Personally I do this...

cd /
du -h --max-depth=1
[find large directory in output]
cd [that directory]
du -h --max-depth=1
[find large directory in output]
etc...

simple way to narrow things down.

HOWEVER. your / partition is *TINY* I wouldn't bother looking, that's about right. You need a bigger partition really.

TobiSGD 08-18-2011 02:37 PM

Quote:

Originally Posted by 2007fld (Post 4446966)
So can I assume /tmp, or /etc, or /lib64 are using the storgae that is 83% full?

Yes, you can. The output of df shows clearly that they don't have an associated partition, so they are using the / partition. I don't know why acid_kewpie comes to a different conclusion.

Quote:

Is it true that one partition will hold one and only one file system?
Yes.

2007fld 08-18-2011 03:08 PM

Thanks a lot for the clarification!


All times are GMT -5. The time now is 01:23 PM.