Re: fsck_ufs running too often
On Sat, 23 Jun 2012 12:57:01 +0200, Julian H. Stacey wrote: > > My suggestion: Set background_fsck="YES" in /etc/rc.conf and let > > the system boot up that way. _If_ you have a faulty disk or other > > data corruption, you'll notice this _before_ going multi-user and > > maybe making things worse. Yes, it might take some time, but it's > > time well invested in your data integrity. > > > > Alternative: Perform a "shutdown now" and go into single-user mode. > > Then unmount all your file systems, do "mount -o ro /" and then > > perform the fsck run on all file systems. It's typically adviced > > to perform file system checks on unmounted (or at least read-only > > mounted) file systems. > > man fsck: > - > Note that background fsck is limited to checking for only the > most commonly occurring file system abnormalities. Under certain > circumstances, some errors can escape background fsck. It is > recommended that you perform foreground fsck on your systems > periodically and whenever you encounter file-system-related pan- > ics. > --- > > So do a manual fsck to make sure there's no residual faults lurking. Sorry, my own stupidity. Of course I wanted to say: My suggestion: Set background_fsck="NO" in /etc/rc.conf and [...] ^^ A fsck at boot time might take longer, but will make sure that the startup of the system is performed on clean file systems. One may argue: "But it takes time!" My response: Is your data valuable? Then you have this time, in worst case. In ultra-worst case, you have backups. :-) > Realise fsck wont start if it thinks its clean, (but might not be clean) so > Boot single user & type > fsck > or fsck -y You can force a fsck run by using "fsck -f"; from the manual: "Force checking of file systems, even when they are marked clean (for file systems that support this)." This could also be done regularly on a scheduled (!) basis if there's the suspection of "silent corruption" - but in such cases, better spot the faulty hardware and replace it (bad disks, bad power supply, bad PSU and the like). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fsck_ufs running too often
> My suggestion: Set background_fsck="YES" in /etc/rc.conf and let > the system boot up that way. _If_ you have a faulty disk or other > data corruption, you'll notice this _before_ going multi-user and > maybe making things worse. Yes, it might take some time, but it's > time well invested in your data integrity. > > Alternative: Perform a "shutdown now" and go into single-user mode. > Then unmount all your file systems, do "mount -o ro /" and then > perform the fsck run on all file systems. It's typically adviced > to perform file system checks on unmounted (or at least read-only > mounted) file systems. man fsck: - Note that background fsck is limited to checking for only the most commonly occurring file system abnormalities. Under certain circumstances, some errors can escape background fsck. It is recommended that you perform foreground fsck on your systems periodically and whenever you encounter file-system-related pan- ics. --- So do a manual fsck to make sure there's no residual faults lurking. Realise fsck wont start if it thinks its clean, (but might not be clean) so Boot single user & type fsck or fsck -y PS /etc/rc.conf: fsck_y_enable="YES" # to regularly force clean if fsck asks # background_fsck="YES" # a trade off your decision Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below not above, cumulative like a play script, & indent with "> ". Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable. Mail from @yahoo dumped @berklix. http://berklix.org/yahoo/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fsck_ufs running too often
Hi, since a few of days ago, I noticed my home server turns very slow more than once a day, so every time I run "top" to see what's processes are running, I can see fsck_ufs at the very top, and the hard drive working like mad. background_fsck=NO in /etc/rc.conf I've checked my crontab and there's nothing related to fsck_ufs, where can I start searching for the cause of the problem?, I thought this process should run only at boot or shutdown, but this time it is running -apparently- without a cause. uname -a: FreeBSD server.my.local 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Regards, Leonardo M. Ramé http://leonardorame.blogspot.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fsck_ufs running too often
On Fri, 22 Jun 2012 14:56:39 -0700 (PDT), Leonardo M. Ramé wrote: > Hi, since a few of days ago, I noticed my home server turns very > slow more than once a day, so every time I run "top" to see > what's processes are running, I can see fsck_ufs at the very > top, and the hard drive working like mad. It seems you have background_fsck="YES" enabled in /etc/rc.conf. Is this desired? If not, set it to ="NO" to perform a file system check prior to going multi-user. That would take several minutes, but it makes sure the system boots up into a properly checked and mounted environment. > I've checked my crontab and there's nothing related to fsck_ufs, > where can I start searching for the cause of the problem?, Check /etc/rc.conf (see "man rc.conf" and /etc/defaults/rc.conf), look for the background_fsck setting. > I thought this process should run only at boot or shutdown, At shutdown? I'd say at boot. In fact, a background file system check actually starts at boot, but runs during and after boot-up, that's what you're obviously noticing as high I/O load. > but this time it is running -apparently- without a cause. No. The fsck run doesn't start without a cause. The cause is: the filesystem about to be mounted is "dirty" (contains defects because it wasn't properly unmounted). What the reason for _this_ observation is... check if your server accidentally got powered off (e. g. bad power line). You can check the timestamps in various log files (most prominent example is /var/log/messages) to see when your system started. If you notice the system started "too often", maybe fsck was not able to successfully finish (and repair!) the file systems, so it will do so on every start of the system. My suggestion: Set background_fsck="YES" in /etc/rc.conf and let the system boot up that way. _If_ you have a faulty disk or other data corruption, you'll notice this _before_ going multi-user and maybe making things worse. Yes, it might take some time, but it's time well invested in your data integrity. Alternative: Perform a "shutdown now" and go into single-user mode. Then unmount all your file systems, do "mount -o ro /" and then perform the fsck run on all file systems. It's typically adviced to perform file system checks on unmounted (or at least read-only mounted) file systems. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fsck_ufs running too often
On Fri, 22 Jun 2012 14:56:39 -0700 (PDT) Leonardo M. Ramé wrote: > Hi, since a few of days ago, I noticed my home server turns very slow > more than once a day, so every time I run "top" to see what's > processes are running, I can see fsck_ufs at the very top, and the > hard drive working like mad. > > I've checked my crontab and there's nothing related to fsck_ufs, > where can I start searching for the cause of the problem?, I thought > this process should run only at boot or shutdown, but this time it is > running -apparently- without a cause. If you have background fsck enabled it runs just after the boot has completed. Have you checked the uptime? It may be that your server is spontaneously rebooting. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"