Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Root file system is filling up...

Status
Not open for further replies.

Chewie71

MIS
Sep 4, 2001
89
US
Help...

My root filesystem is filling up. It's already caused the corruption of the passwd database once. At that point I moved some nonessential files out but it didn't free up much space. Now it is creeping back up again and I'm afraid I'm going to lose data again. How can I find what is filling it up? Or how can I add more space to the root file system?

Thanks,
Matt
 
My guess is that your /tmp directory is filling up. If you accept the default partition settings in the FreeBSD install, you end up with a pretty small "/" partition. Something to watch for next time you install.

I know there are ways to mess around with your physical partition size, but that is something I have never yet messed with, and is probably not wise if you are trying to preserve your data.

If you want a quick easy step, there are two things you can do:

1. Simply make a new /tmp directory on another partition, such as /home/tmp, (there is already a /var/tmp, so don't mess with it). Then, copy all files in /tmp to /home/tmp. Now, you can just turn /tmp into a symbolic link to /home/tmp: delete /tmp, and then run the command "ln -s /home/tmp /tmp". This will now save all temp files in /home/tmp, where you should have plenty of space.

2. If you have another hard drive around, you can add it to the system, and then just delete your /tmp directory, and mount any partition of that new drive with a mount point of /tmp. Now all your temp files will be on that new drive partition. If you happen to have any available partitions on your existing drive, you could just use one of those. This is a much better solution than symbolic linking to /home/tmp.

The great thing about Unix is that directories and partitions can be redistributed quite easily. Any directory can become a mount point on a new physical partition, thus relieving the burden of the original partition. For example, let's say user "rick", at /home/rick is using up too much space. Just add a drive, make a partition, back up all data from /home/rick, delete that directory, and mount the new partition as /home/rick. Move all Rick's data in there, and Rick can continue as before, without perceiving any changes in how he interacts with the system. The partition mount points are transparent to the filesystem, so system itself will continue on as before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top