PDA

View Full Version : [Solved] disk space problem


Solarplight
March 1st, 2010, 18:58
I have a ibm t43 thinkpad running freebsd 8.0-RELEASE. I just installed ctorrent and in the process of downloading a torrent it reached a point where it said it couldn't write a file because it ran out of disk space. According to my disk usage analyzer I have 50gb of free space, but my system seems to think i don't have any. Now when i try and download my email in thunderbird it is saying there is not enough disk space. I have no idea how to even start troubleshooting this problem, any ideas?

graudeejs
March 1st, 2010, 19:02
show output of
df -h

also reboot into single user mode and run fsck

Solarplight
March 1st, 2010, 19:05
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 496M 489M -33M 107% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1e 496M 22K 456M 0% /tmp
/dev/ad0s1f 51G 2.7G 44G 6% /usr
/dev/ad0s1d 1.4G 24M 1.3G 2% /var

Ok, ad0s1a is at -33m available how can i fix that?

graudeejs
March 1st, 2010, 19:11
ok if you're using FreeBSD as root, stop doing that....
Now if you have /home folder and use regular user, quick fix would be to move home to /usr/home
and then make link to /usr/home
# mv -f /home /usr/home
# ln -s /usr/home /home

graudeejs
March 1st, 2010, 19:12
This happened because you don't have separate partition for /home

Solarplight
March 1st, 2010, 19:19
yeah, I have been running soley as root, i guess i will set up a basic user account on here, and stop operating as root. So running as another user should clear up the problem, yeah? And should i do something to clean up my root file system? And so i know, could you explain what happened, what exactly the problem is? and is there an

graudeejs
March 1st, 2010, 19:30
1) don't EVER, EVER, EVER use system as root, unless you really need to
2) don't run X as root

now you'll probably need to move files from root to normal user home
and run chmod -R ... and chown -R ... on it

Remember about minimal privileges....
Run with as minimal privileges as necessary....

If you want to run as root all the time, got to windows

P.S.
Huh, where you guys are coming from all running unix as root?

Solarplight
March 1st, 2010, 19:38
Thanks for the help and advice, I will stop running as root.

P.S.
I recently switched from ubuntu and was enjoying not having to type sudo, now that i know that it's a prob though I'll refrain, we live and learn right.

klanger
March 1st, 2010, 21:01
I recently switched from ubuntu and was enjoying not having to type sudo

You still don't have to...
just type su

;)

Ruler2112
March 1st, 2010, 21:28
could you explain what happened, what exactly the problem is?

The short form is that because you were running the torrent app as root. Therefore it was dumping the downloaded data into /root and since that is on the same partition/slice as /, it filled the partition.

However, without a separate partition/slice for /home, you'd run into the same problem. I'd look at smurf's advice above at migrating /home into /usr to avoid this problem.

Running the torrent (or any) app as a regular user is MUCH more secure. Look at it this way - if there's a flaw in the programming of the application and it goes wonky, running it as a user could feasibly wipe out your home directory. The same thing happens if you're running it as root and it could destroy the entire system.

Solarplight
March 1st, 2010, 21:31
Thanks for the tip klanger.

An major thanks for that explanation Ruler.

One more question. I deleted un-needed files out of my root Desktop, so available file space is no longer "-". I set up a less privlaged user, and am currently running as this user and will contnue to do so. My question is this, do i need to do anything to make sure this won't happen as this user, or should all my files now be saving on "/dev/ad0s1f 51G 2.7G 44G 6% /usr"?

Beastie
March 1st, 2010, 22:33
The best is to create a separate partition for /home for storing configuration files and frequently-accessed personal files and another extra partition for your data (music, videos, etc.) if you want, store *all* your files there, and never login as root again for daily work, and you'll never have this problem again.
But you can also have your home on /usr.

You *might* have some problems later when compiling huge programs, but that's another story.

By the way, /root should normally contain mbox (mail inbox), .history (command history), .cshrc (csh configuration), .profile (guess what). All the rest is expendable, including Desktop and any other configuration file/directory created by X or third-party applications.

phoenix
March 1st, 2010, 23:04
What is the output of ls -ld /home

If that shows as a link to /usr/home, then you are fine. If that shows as a directory (d in the first column of output), then you will run into the same problem as before, as /home is part of the / filesystem.

In that case, do as mentioned above: move /home to /usr/home, and symlink /usr/home to /home.

Solarplight
March 2nd, 2010, 05:10
I now, do have /home set as a link to /usr/home. Thank you for all of your help and input everyone.