diff options
Diffstat (limited to 'sag-0.6.1-www/Invisible/sag-0.6/node47.html')
-rw-r--r-- | sag-0.6.1-www/Invisible/sag-0.6/node47.html | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/sag-0.6.1-www/Invisible/sag-0.6/node47.html b/sag-0.6.1-www/Invisible/sag-0.6/node47.html new file mode 100644 index 0000000..5fce368 --- /dev/null +++ b/sag-0.6.1-www/Invisible/sag-0.6/node47.html @@ -0,0 +1,86 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> +<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --> +<HTML> +<HEAD> +<TITLE>Checking filesystem integrity with fsck</TITLE> +<META NAME="description" CONTENT="Checking filesystem integrity with fsck"> +<META NAME="keywords" CONTENT="sag"> +<META NAME="resource-type" CONTENT="document"> +<META NAME="distribution" CONTENT="global"> +<LINK REL=STYLESHEET HREF="sag.css"> +</HEAD> +<BODY LANG="EN" > + <A NAME="tex2html909" HREF="node48.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html907" HREF="node41.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html901" HREF="node46.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html911" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html912" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR> +<B> Next:</B> <A NAME="tex2html910" HREF="node48.html">Checking for disk errors </A> +<B>Up:</B> <A NAME="tex2html908" HREF="node41.html">Filesystems</A> +<B> Previous:</B> <A NAME="tex2html902" HREF="node46.html">Mounting and unmounting</A> +<BR> <P> +<A NAME="1685"> </A><H2><A NAME="SECTION00586000000000000000">Checking filesystem integrity with <tt>fsck</tt></A></H2> +<P> + Filesystems are complex creatures, and as such, they tend to be + somewhat error-prone. A filesystem's correctness and validity + can be checked using the <tt>fsck</tt><A NAME="1687"> </A> command. It can be + instructed to repair any minor problems it finds, and to + alert the user if there any unrepairable problems. Fortunately, + the code to implement filesystems is debugged quite + effectively, so there are seldom any problems at all, and they + are usually caused by power failures, failing hardware, or + operator errors; for example, by not shutting down the system + properly. +<P> + Most systems are setup to run <tt>fsck</tt><A NAME="1689"> </A> automatically at + boot time, so that any errors are detected (and hopefully + corrected) before the system is used. Use of a corrupted + filesystem tends to make things worse: if the data structures + are messed up, using the filesystem will probably mess them + up even more, resulting in more data loss. However, + <tt>fsck</tt><A NAME="1691"> </A> can take a while to run on big filesystems, and + since errors almost never occur if the system has been shut + down properly, a couple of tricks are used to avoid doing the + checks in such cases. The first is that if the file <tt>/etc/fastboot</tt><A NAME="1693"> </A> + exists, no checks are made. The second is that the ext2 filesystem + has a special marker in its superblock that tells whether + the filesystem was unmounted properly after the previous mount. + This allows <tt>e2fsck</tt><A NAME="1695"> </A> (the version of <tt>fsck</tt><A NAME="1697"> </A> for + the ext2 filesystem) to avoid checking the filesystem if + the flag indicates that the unmount was done (the assumption + being that a proper unmount indicates no problems). Whether + the <tt>/etc/fastboot</tt><A NAME="1699"> </A> trick works on your system depends on + your startup scripts, but the ext2 trick works every time + you use <tt>e2fsck</tt><A NAME="1701"> </A>--it has to be explicitly bypassed with + an option to <tt>e2fsck</tt><A NAME="1703"> </A> to be avoided. (See the <em>e2fsck</em><A NAME="1705"> </A> + man page for details on how.) +<P> + The automatic checking only works for the filesystems that are + mounted automatically at boot time. Use <tt>fsck</tt><A NAME="1707"> </A> manually + to check other filesystems, e.g., floppies. +<P> + If <tt>fsck</tt><A NAME="1709"> </A> finds unrepairable problems, you need either + in-depth knowlege of how filesystems work in general, + and the type of the corrupt filesystem in particular, or + good backups. The latter is easy (although sometimes tedious) + to arrange, the former can sometimes be arranged via a friend, + the Linux newsgroups and mailing lists, + or some other source of support, if you don't have the + know-how yourself. I'd like to tell you more + about it, but my lack of education and experience in this regard + hinders me. The <tt>debugfs</tt><A NAME="1711"> </A> program by Theodore T'so + should be useful. +<P> + <tt>fsck</tt><A NAME="1713"> </A> must only be run on unmounted filesystems, never on + mounted filesystems (with the exception of the read-only root + during startup). This is because it accesses the raw + disk, and can therefore modify the filesystem without the + operating system realizing it. There <em>will</em> be trouble, + if the operating system is confused. +<P> +<HR><A NAME="tex2html909" HREF="node48.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html907" HREF="node41.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html901" HREF="node46.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html911" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html912" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR> +<B> Next:</B> <A NAME="tex2html910" HREF="node48.html">Checking for disk errors </A> +<B>Up:</B> <A NAME="tex2html908" HREF="node41.html">Filesystems</A> +<B> Previous:</B> <A NAME="tex2html902" HREF="node46.html">Mounting and unmounting</A> +<P><ADDRESS> +<I>Lars Wirzenius <BR> +Sat Nov 15 02:32:11 EET 1997</I> +</ADDRESS> +</BODY> +</HTML> |