ef2d
![]() |
|
|
|
|
|||||||
| General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello All
I know that if you delete a file that is currently being written to it doesnt actually put the space back into the available space. Currently: Code:
server1# df -h Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 496M 268M 188M 59% / devfs 1.0K 1.0K 0B 100% /dev /dev/da0s1e 496M 968K 455M 0% /tmp /dev/da0s1f 57G 50G 1.9G 96% /usr /dev/da0s1d 4.7G 2.3G 2.1G 52% /var linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc I share this server with a few other people and I am guessing someone deleted a massive log file while the service was still writing to it. Is there any way to free this space up without rebooting my server? Thanks! -=Tom Last edited by DutchDaemon; July 12th, 2010 at 22:45. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#2
|
||||
|
||||
You're probably better off not screwing with reserved blocks and space/time optimisations on your /usr/. If you wanted to screw around with that stuff, get another drive (or add another partition, if you have unallocated space on your drive) and mount it as /data/ or something and see what tunefs(8) can do (newfs(8) too, for that matter). Also: read this.
__________________
Quid habemus reliquum? Nutrimentum anatum! Внимание: лифт вниз не поднимает |
| The Following User Says Thank You to fronclynne For This Useful Post: | ||
tad1214 (July 13th, 2010) | ||
|
#3
|
|||
|
|||
|
Thanks for the help
Getting more drives in the 1U isnt really an option and getting bigger SCSI drives is expensive. I may have to invest in another server I suppose.
Last edited by tad1214; July 13th, 2010 at 00:51. Reason: My math is terrible |
|
#4
|
||||
|
||||
|
Well, if you feel like poking around, /usr/ports/distfiles/ may have a bit of garbage, as with your (potentially defunct) working directories in ports (try
# rm -r /usr/ports/*/*/work if you just don't care (or some find(1) goblox to check it out, if you must (portsclean -CDL, which is part of ports-mgmt/portupgrade also works quite well in this regard))). Look at /usr/obj/ as well (though it's normally only about 800M).Anyway, du(1) and find(1) are your friends. Learn them; use them.
__________________
Quid habemus reliquum? Nutrimentum anatum! Внимание: лифт вниз не поднимает |
| The Following User Says Thank You to fronclynne For This Useful Post: | ||
tad1214 (July 13th, 2010) | ||
|
#5
|
|||
|
|||
|
You can use fstat to list biggest open files:
Code:
# echo -e "file size\tinode num\tmount\tcommand"; fstat | \
awk '{ print $8, "\t", $6, "\t", $5, "\t", $2 }' | sort -nr | head
file size inode num mount command
1862270976 1860727 /var mysqld
380840808 2802829 /var lighttpd
108508595 2802767 /var httpd
Code:
find /var -inum 1860727 |
| The Following User Says Thank You to pbd For This Useful Post: | ||
tad1214 (July 13th, 2010) | ||
|
#6
|
|||
|
|||
|
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] FreeBSD 8 drive free space issue | Bink | System Hardware | 0 | January 4th, 2010 08:52 |
| Free Space Monitoring Script | naezdnik | Userland Programming & Scripting | 6 | October 7th, 2009 12:14 |
| Adding and initializing a new disk | cns5p | System Hardware | 3 | May 16th, 2009 22:04 |
| Where did the free space go after failed port build | jwhendy | Installation and Maintenance of FreeBSD Ports or Packages | 23 | May 7th, 2009 08:40 |
| Adding a new raidz to zpool does not give zfs create more space | audunfr | Installing & Upgrading | 0 | April 19th, 2009 12:39 |