Re: need more space
At 2003-07-14T18:09:43Z, "Kenzo" <[EMAIL PROTECTED]> writes: > This is what I get whtn I run " du -x / | sort -rn > /tmp/du.out I see > what I did wrong. Indeed. Don't ever - ever! - log in as root for web browsing, running applications, etc. Really. Don't. -- Kirk Strauser pgp0.pgp Description: PGP signature
Re: need more space
Kenzo wrote to [EMAIL PROTECTED]: > This is what I get whtn I run " du -x / | sort -rn > /tmp/du.out > I see what I did wrong. > thanks. > 121371 / > 70400 /root So my first suspicion was warranted. :-) > 29404 /root/.mozilla For security reasons, and with few exceptions, you probably don't want to run everyday applications as root. One of UNIX's strengths, in general, is the ability to do almost everything as an unpriviliged user. - Ryan -- Ryan Thompson <[EMAIL PROTECTED]> SaskNow Technologies - http://www.sasknow.com 901-1st Avenue North - Saskatoon, SK - S7K 1Y4 Tel: 306-664-3600 Fax: 306-244-7037 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: need more space
y, July 14, 2003 11:51 AM Subject: Re: need more space ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: need more space
> > need more disk space > This is a two part question. > I'm running FBSD4.8 > > 1. when I do a " df -hi " I get. > > df -hi > Filesystem Size Used Avail Capacity iused ifree %iused Mounted on > /dev/ad0s2a 126M 119M -2.6M 102% 2676 13578 16% / > /dev/ad0s2f 252M 14K 232M 0% 8 32502 0% /tmp > /dev/ad0s2g 21G 2.6G 17G 13% 196822 2580776 7% /usr > /dev/ad0s2e 252M 20M 212M 8% 1144 31366 4% /var > procfs 4.0K 4.0K 0B 100% 30 1014 3% /proc > > telling me that my / slice is pretty much full. > How can I tell what is part of the / slice so that I can find what is taking > the space and delete things that I don't need. Just a little quibble;your root _slice_ which looks to be ads2, doesn't look all that full. But, your root _partition_ which is ads2a at 102% is in trouble. All of those partitions you show in the above df look to be in the same slice.(eg you have reversed your terminology - in FreeBSD slice is the big main chunk named 1-4 and is divided in to partitions that are named a-h. Anyway, someone else has already pointed out the du command to you.Use that to search for what is taking up more room than you expect. Second, 126MB is kind of small for root nowdays, though you might get by if you don't put anything that grows in it. To change it, the best way is to back up each of the partitions and then rebuild the disk partitions from scratch and then restore the backups in to the newly made partitions. Use dump/restore if you have tape or a conveniently huge other disk available. jerry > > 2. would it be better to try and find what is taking all the space or just > grow the slice with growfs? > Can I make the /usr slice smaller and give some to / or can I link the > directory that's taking all the space in / to somewhere in /usr? > > Thanks. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: need more space
Kenzo wrote to [EMAIL PROTECTED]: > need more disk space > This is a two part question. > I'm running FBSD4.8 > > 1. when I do a " df -hi " I get. > > df -hi > Filesystem Size Used Avail Capacity iused ifree %iused Mounted on > /dev/ad0s2a 126M 119M -2.6M 102% 2676 13578 16% / > /dev/ad0s2f 252M 14K 232M 0% 8 32502 0% /tmp > /dev/ad0s2g 21G 2.6G 17G 13% 196822 2580776 7% /usr > /dev/ad0s2e 252M 20M 212M 8% 1144 31366 4% /var > procfs 4.0K 4.0K 0B 100% 30 1014 3% /proc > > telling me that my / slice is pretty much full. > How can I tell what is part of the / slice so that I can find what is taking > the space and delete things that I don't need. I do this recursively. cd / ; du -xd 1 | sort -n Look at the last few lines of the output; you should see the directories consuming the largest amount of space. If it isn't yet obvious where you can free up space, re-run the above du(1) command on each of the largest directories. You've already put /tmp and /var on separate filesystems, but beware the contents of /root (root's home directory), if you do any work as root. You might have output logs, core files, or gawk-knows-what in root that you've forgotten about. When / starts getting full, that's usually where I look. :-) > 2. would it be better to try and find what is taking all the space or > just grow the slice with growfs? That'd be a bad idea. Anyway, 126M root is plenty for even -CURRENT in the standard config with /var and /tmp elsewhere... more than enough for 4.8. Find out what's consuming the space, and delete it, or (carefully) consider moving it to another filesystem. > Can I make the /usr slice smaller and give some to / or can I link the > directory that's taking all the space in / to somewhere in /usr? You can certainly do the latter, as long as you're careful of what you move out of the root filesystem. Under normal circumstances, you don't want to move any core OS binaries out of the root, and you definitely don't want to move anything that's used in the bootstrap process before the other filesystems are mounted. Root's home directory is usually fair game, because normally even without the other filesystems mounted, you can live without it. /tmp and /var are already separate filesystems. You can get rid of old/GENERIC kernels and modules, as long as you keep a boot disk around in the event that you need to change hardware in a hurry. (I usually leave GENERIC kicking around for that reason). You can also get rid of /stand, if you can live without sysinstall(8). You can selectively get rid of some of the binaries in /bin and /sbin if you're sure they won't be used either by you or the system. (grep -R /etc /boot is an imperfect but reasonable guide). If you're very clever and know your *own* application well, you can shrink root to a fraction of what it is now. Now comes the part where I tell you that most of this is usually unnecessary. :-) Chances are good that you just need to do a bit of summer cleaning and adjust your usage habits a bit. - Ryan -- Ryan Thompson <[EMAIL PROTECTED]> SaskNow Technologies - http://www.sasknow.com 901-1st Avenue North - Saskatoon, SK - S7K 1Y4 Tel: 306-664-3600 Fax: 306-244-7037 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: need more space
At 2003-07-14T16:11:52Z, "Kenzo" <[EMAIL PROTECTED]> writes: > How can I tell what is part of the / slice so that I can find what is > taking the space and delete things that I don't need. Do something like: # du -x / | sort -rn > /tmp/du.out and then look at the file. That'll sort the contents of your root partition by size so that you can see where you're losing space. > 2. would it be better to try and find what is taking all the space or just > grow the slice with growfs? Find the problem first. If it's something unexpected, fix it. Otherwise, write back and we'll go from there. -- Kirk Strauser pgp0.pgp Description: PGP signature