Date: Tue, 8 May 2007 19:40:40 +0400 From: "Newtunes Support" <ntstaff@gmail.com> To: freebsd-stable@freebsd.org, olli@lurza.secnetix.de Subject: Re: Incorrect df -k output?? Message-ID: <11e9464b0705080840r21b6f653u9bbc7f32c37da0b4@mail.gmail.com> In-Reply-To: <200705081455.l48EtNVm089195@lurza.secnetix.de> References: <11e9464b0705080739u4202e4d0k5dbbef1670ffc335@mail.gmail.com> <200705081455.l48EtNVm089195@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks a lot for irrefragable answer, Oliver! I have resolved the issue on one server (there was a little overdraft) and I'll try to resolve issue with fsck and /var when PROD will have lower load= . Thanks to all, Dmitry 2007/5/8, Oliver Fromme <olli@lurza.secnetix.de>: > > Newtunes Support <ntstaff@gmail.com> wrote: > > I have resolved this issue using forsed unmount (umount -f /var) > > Not a good idea. It breaks all sorts of things. > > > And after I mounted /var again df -k shows me correct value. > > The value was correct before, too. There probably were > some files that were removed, but some processes still > had them open. du(1) doesn't see those files, so they're > not included in the sum. df(1) sees the allocated space, > of course. > > It can happen on the /var file system if an error occurs > during log file rotation, so the programs writing to the > log files (e.g. syslogd) are not properly informed about > the rotation, so they keep the old files open. > > A good way to view such files/processes is to use the > command "lsof +L1" (lsof can be installed from the ports > collection: /usr/ports/sysutils/lsof). It lists all > file descriptors in use that have a link count of zero. > > The correct way to resolve the issue is to find those > processes and tell them to close the files (usually a > "kill -HUP" will do that). If everything else fails, > kill the processes (use "kill -KILL" if necessary). > Do not use "umount -f". > > > But I have new problem. > > fsck -y does not fix anything. > > That only works when the file system is not mounted (or > only mounted read-only). It's usually done in single- > user mode. > > (However, I assume that your file system doesn't need > fsck, but it certainly wouldn't hurt either.) > > Best regards > Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, Gesch=E4ftsfuehrun= g: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M=FC= n- > chen, HRB 125758, Gesch=E4ftsf=FChrer: Maik Bachmann, Olaf Erb, Ralf Geb= hart > > FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd > > "Python tricks" is a tough one, cuz the language is so clean. E.g., > C makes an art of confusing pointers with arrays and strings, which > leads to lotsa neat pointer tricks; APL mistakes everything for an > array, leading to neat one-liners; and Perl confuses everything > period, making each line a joyous adventure <wink>. > -- Tim Peters >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11e9464b0705080840r21b6f653u9bbc7f32c37da0b4>