From owner-freebsd-questions@FreeBSD.ORG Sat Aug 18 03:17:20 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 078161065672 for ; Sat, 18 Aug 2012 03:17:20 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0038FC14 for ; Sat, 18 Aug 2012 03:17:19 +0000 (UTC) Received: from r56.edvax.de (port-92-195-32-97.dynamic.qsc.de [92.195.32.97]) by mx01.qsc.de (Postfix) with ESMTP id 4A4193CE60; Sat, 18 Aug 2012 05:17:16 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q7I3HGZd003654; Sat, 18 Aug 2012 05:17:16 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 18 Aug 2012 05:17:16 +0200 From: Polytropon To: freebsd@dreamchaser.org Message-Id: <20120818051716.40ccf88c.freebsd@edvax.de> In-Reply-To: <502F017A.7030001@dreamchaser.org> References: <502EA73B.6000008@dreamchaser.org> <20120818030537.4d5bf55b.freebsd@edvax.de> <502F017A.7030001@dreamchaser.org> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: fsck recoveries, configuration X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2012 03:17:20 -0000 On Fri, 17 Aug 2012 20:44:10 -0600, Gary Aitken wrote: > On 08/17/12 19:05, Polytropon wrote: > >> 2. When my machine hung (could not rlogin or ping), I powered > >> off and rebooted. > > > > Does the machine have a "soft power button" and it is configured > > to issue a "shutdown -p now" (which is quite common)? When you > > have access to the machine, try that. Even if the machine does > > not accept network logins, this mechanism might still work. > > Hmmm. It has a "soft" power button; have to hold it down 5 sec > or so to power off. That's the "override time" for a "hard power off". If you only press it once, it should issue "shutdown -p now", but of course this only works if the system is still responding. Even if the keyboard input and screen output, as well as networking services stopped to work, this _might_ still be effective. > Those things can be configured to issue a command that will actually > get executed without a login? Sure, it has been working for many years. Check the BIOS setup, some machines can be configured to what the button does. The default setup of FreeBSD should perform the correct action via ACPI. In the past, it also worked with APM. In that case, /etc/apmd.conf would contain the command executed when the button was pressed. On APM-capable machines, the PSU would be switched off, just like today's ACPI-based systems. Of course that only works with ATX power supplies, the AT ones usually had a mechanical switch. > I assume you're talking about a bios option? How does that work? I've seen BIOS setups allowing different actions for the button, from "go to sleep" to "soft power off" or "hard power off". That action (hard power off) is taken when pressing the button for about 5 seconds. The OS can NOT deal with that case. > sounds like magic of some sort... Or is this a whole login > sequence with the shutdown at the end? No, it's a system action using ACPI. No magic involved. :-) > >> Reboot did a deferred fsck. > > > > Is this intended? Personally, I'd rather wait some time to boot > > in a fully checked file system environment then dealing with the > > uncertain situation of snapshots and background FS check activity. > > In worst case, I want to be prompted by fsck if a major defect has > > been found that requires administrator attention. > > > > Put > > > > background_fsck="NO" > > > > into /etc/rc.conf to get this behaviour. > > Yeah, I came to that conclusion... Thanks. I _know_ booting a system may take time when the file system needs repair, but you have to set your priorities: I prefer waiting 20 minutes instead of running stuff on a damaged file system. > >> After it booted I logged in, and also logged in on another system. > >> On the remote system I could do a ping but rlogin returned > >> "connection reset by peer", even though I could log in locally. > > > > Does rlogin work when you "give the system some time to recover"? > > yes, if it's not hung -- i.e. done with fsck, I think. I verified > that by monitoring the delayed fsck process and as soon as it was > done the rlogin worked. It seems that background fsck stops certain services from working... interesting; another reason for me to avoid it when possible. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...