[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-admin
Subject: Re: Sudden Shutdown.
From: Joseph Bueno <joseph.bueno () trader ! com>
Date: 2001-12-27 16:10:40
[Download RAW message or body]
Hi,
Gregor Pavlin a écrit :
>
> Hi there,
>
> We have a small LINUX system on which only a single application is supposed
> to run and the computer might be shut down suddenly without execution of
> the runlevel 6. However, I'd like to avoid checking/repairing of file
> systems during the booting.
>
> Of course, fsck stuff can be avoided if the file systems were not damaged
> during the power off. My question is whether one can configure the system
> in such a way that a not anticipated shut down would not damage the file
> system on the hard/flash disks, which are used for booting and starting of
> the required services.
>
> I guess, that the danger of damaging the data on the hard/flash disk is
> REDUCED if the file systems on the disk are mounted read-only. In order to
> reduce the possible danger I do the following:
You don't REDUCE it, you ELIMINATE it.
Filesystem corruption occurs when you switch off your system before
writing any modified data to the disc. You cannot have pending writes
on a readonly filesystem.
>
> 1) mount all the file systems read only.
> 2) make a RAM disk and mount it on the /var mountpoint.
> 3) copy the contents to /var
> 4) all files that can be changed are replaced by symbolic links on the read
> only partitions; the actual files corresponding to those symbolic links
> are located in appropriate directories within the /var partition, which
> exists in RAM.
>
> Does the above configuration completely eliminate the danger of corrupting
> the read-only file systems in the case of a sudden shutdown?
>
Yes, I have configured at home an old PC as an MP3 player.
/tmp and /var are mounted on a RAM disk, all disk partitions are readonly;
I never shutdown this machine, I just switch it off.
> I simply don't know enough about the actual processes and operation of the
> hardware in such a situation; I'm affraid that in the case of a sudden
> shutdown the above configuration does not completely eliminate the danger
> of damaging the read-only file systems. If this configuration won't do,
> what are the alternatives?
>
> Thanks,
>
> Gregor
>
> ---------------------------------------
> Gregor Pavlin
>
> Institut fuer Allgemeine Mechanik, Graz University of Technology
> Kopernikusgasse 24, A-8010, Austria
>
> Tel: ++43 316 8737143
> Fax: ++43 316 8737641
> e-mail: pavlin@mech.tu-graz.ac.at
> http://www.cis.tu-graz.ac.at/mech/
> ---------------------------------------
>
Hope this helps
--
Joseph Bueno
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic