[Top] [All Lists]

Re: XFS filesystem corruption

To: xfs@xxxxxxxxxxx, stan@xxxxxxxxxxxxxxxxx
Subject: Re: XFS filesystem corruption
From: Martin Steigerwald <Martin@xxxxxxxxxxxx>
Date: Tue, 12 Mar 2013 11:42:13 +0100
Cc: Ric Wheeler <rwheeler@xxxxxxxxxx>, Julien FERRERO <jferrero06@xxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5139A3B6.3040805@xxxxxxxxxxxxxxxxx>
References: <CAPcwv6wZJSBtgF-L6KNSn6N6Y+wUZJFXdbcg+zYRwoaB2sDdjw@xxxxxxxxxxxxxx> <5137CD46.6070909@xxxxxxxxxx> <5139A3B6.3040805@xxxxxxxxxxxxxxxxx> (sfid-20130308_132012_037479_915CAB49)
User-agent: KMail/1.13.7 (Linux/3.9.0-rc2-tp520; KDE/4.9.5; x86_64; ; )
Am Freitag, 8. März 2013 schrieb Stan Hoeppner:
> If the techs are determined to hard cut power because they don't have
> the time or the knowledge to do a clean shutdown, it may be well worth
> your time/effort to write a script and teach the field techs to execute
> it, before flipping the master switch.  Your simple script would run as
> root, or you'd need to do some sudo foo within, and would contain
> something like:
> #! /bin/sh
> sync
> echo 2 > /proc/sys/vm/drop_caches
> echo "Ready for power down."

mount -o remount,ro /your/mount/point

One can at least try. Maybe some "service stop" commands before that.

But then, if using a script like this, why not just type "halt"?

Heck, Linux kernel / userspace / distro developers prepared safe shutdown 
already, so why not use it?

Another idea:

On Debian Usually on Ctrl-Alt-Delete on a TTY get a shutdown:

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

Then you plug a keyboard to the server and tell the local admins to just 
press Ctrl-Alt-Del in order to shutdown the server instead of the power 

But heck, even just pressing the power button for a short period of time 
should work. In Debian it does. So you can just tip the power button.

So, I do see not much of a reason to not shutdown the server properly.

Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

<Prev in Thread] Current Thread [Next in Thread>