Re: filesystem in a blackbox ?

From: Andreas Dilger (adilger@turbolinux.com)
Date: Thu Aug 10 2000 - 23:31:10 EST


Mike writes:
> Wu writes:
> >I made a linux-router box without monitor or keyboard.
> >When it running, it write logs to HD. If I turn off the box,
> >the filesystem maybe be damaged and can't boot again.
> >
> >Any way to keep it's filesystem sync ?

The obvious solution is to use a journalling filesystem, like ext3.
I've put ext3 on my dev box, and now I never need to fsck when I
crash the kernel.

> Hmm. You need a way of remotely shutting down the box. Install
> ssh on the machine, and block ssh access with ipchains so only a
> certain machine or machines can ssh in. Log in via ssh to
> shutdown.

SSH is good if you can actually get net access to the system.

> Alternatively, you could use some jumper in the machine to detect
> an externally connected switch of some kind.

I made a small switch out of the keyboard lock (10 kOhm resistor +
wire), and attached it to the serial port on my router box. I have upsd
listening on the serial port, and it does a shutdown for me. I think
the schematics for the switch were in the UPS HOWTO or similar. I didn't
even have to write a line of code (OK, I added beeps to /etc/init.d/halt
to let me know when it was finished).

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:23 EST