Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > a412ceb851151854794ced2a242192bb > files > 1697

howto-html-fr-20080722-1mdv2010.0.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Slackware</title><link href="style.css" rel="stylesheet" type="text/css" /><meta content="DocBook XSL Stylesheets V1.73.2" name="generator" /><link rel="start" href="index.html" title="Guide pratique de LVM" /><link rel="up" href="ch07.html" title="Chapitre 7. Scripts de démarrage pour LVM 1" /><link rel="prev" href="ch07s04.html" title="Redhat" /><link rel="next" href="ch07s06.html" title="SuSE" /></head><body><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Slackware</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="ch07s04.html">Précédent</a> </td><th align="center" width="60%">Chapitre 7. Scripts de démarrage pour LVM 1</th><td align="right" width="20%"> <a accesskey="n" href="ch07s06.html">Suivant</a></td></tr></table><hr /></div><div class="sect1" lang="fr"><div class="titlepage"><div><div><h2 class="title"><a id="initscriptslackware" />Slackware</h2></div></div></div><p>
        La Slackware 8.1 ne demande aucune mise à jour des scripts
        de démarrage pour faire fonctionner LVM.
      </p><p>
      
        Pour les versions précédentes de Slackware 8.1, vous devrez
        appliquer le correctif suivant à
        <code class="filename">/etc/rc.d/rc.S</code>.
      
      </p><pre class="screen">
cd /etc/rc.d
cp -a rc.S rc.S.old
patch -p0 &lt; rc.S.diff
</pre><p>
        (Le cp sert à faire une sauvegarde au cas où).
      </p><pre class="screen">
----- snip snip file: rc.S.diff---------------
--- rc.S.or        Tue Jul 17 18:11:20 2001
+++ rc.S        Tue Jul 17 17:57:36 2001
@@ -4,6 +4,7 @@
#
# Mostly written by:  Patrick J. Volkerding, &lt;volkerdi@slackware.com&gt;
#
+# Added LVM support &lt;tgs@iafrica.com&gt;

PATH=/sbin:/usr/sbin:/bin:/usr/bin

@@ -28,19 +29,21 @@
READWRITE=yes
fi

+
# Check the integrity of all filesystems
if [ ! READWRITE = yes ]; then
-  /sbin/fsck -A -a
+  /sbin/fsck -a /
+  # Check only the root fs first, but no others
# If there was a failure, drop into single-user mode.
if [ ? -gt 1 ] ; then
echo
echo
-    echo "*******************************************************"
-    echo "*** An error occurred during the file system check. ***"
-    echo "*** You will now be given a chance to log into the  ***"
-    echo "*** system in single-user mode to fix the problem.  ***"
-    echo "*** Running 'e2fsck -v -y &lt;partition&gt;' might help.  ***"
-    echo "*******************************************************"
+    echo "************************************************************"
+    echo "*** An error occurred during the root file system check. ***"
+    echo "*** You will now be given a chance to log into the       ***"
+    echo "*** system in single-user mode to fix the problem.       ***"
+    echo "*** Running 'e2fsck -v -y &lt;partition&gt;' might help.       ***"
+    echo "************************************************************"
echo
echo "Once you exit the single-user shell, the system will reboot."
echo
@@ -82,6 +85,44 @@
echo -n "get into your machine and start looking for the problem. "
read junk;
fi
+  # okay / fs is clean, and mounted as rw
+  # This was an addition, limits vgscan to /proc thus
+  # speeding up the scan immensely.
+  /sbin/mount /proc
+
+  # Initialize Logical Volume Manager
+  /sbin/vgscan
+  /sbin/vgchange -ay
+
+  /sbin/fsck -A -a -R
+  #Check all the other filesystem, including the LVM's, excluding /
+
+  # If there was a failure, drop into single-user mode.
+  if [ ? -gt 1 ] ; then
+    echo
+    echo
+    echo "*******************************************************"
+    echo "*** An error occurred during the file system check. ***"
+    echo "*** You will now be given a chance to log into the  ***"
+    echo "*** system in single-user mode to fix the problem.  ***"
+    echo "*** Running 'e2fsck -v -y &lt;partition&gt;' might help.  ***"
+    echo "*** The root filesystem is ok and mounted readwrite ***"
+    echo "*******************************************************"
+    echo
+    echo "Once you exit the single-user shell, the system will reboot."
+    echo
+
+    PS1="(Repair filesystem) #"; export PS1
+    sulogin
+
+    echo "Unmounting file systems."
+    umount -a -r
+    mount -n -o remount,ro /
+    echo "Rebooting system."
+    sleep 2
+    reboot
+  fi
+
else
echo "Testing filesystem status: read-write filesystem"
if cat /etc/fstab | grep ' / ' | grep umsdos 1&gt; /dev/null 2&gt; /dev/null ;
then
@@ -111,14 +152,16 @@
echo -n "Press ENTER to continue. "
read junk;
fi
+
fi

+
# remove /etc/mtab* so that mount will create it with a root entry
/bin/rm -f /etc/mtab* /etc/nologin /etc/shutdownpid

# mount file systems in fstab (and create an entry for /)
# but not NFS or SMB because TCP/IP is not yet configured
-/sbin/mount -a -v -t nonfs,nosmbfs
+/sbin/mount -a -v -t nonfs,nosmbfs,proc

# Clean up temporary files on the /var volume:
/bin/rm -f /var/run/utmp /var/run/*.pid /var/log/setup/tmp/*
--snip snip snip end of file---------------
</pre></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch07s04.html">Précédent</a> </td><td align="center" width="20%"><a accesskey="u" href="ch07.html">Niveau supérieur</a></td><td align="right" width="40%"> <a accesskey="n" href="ch07s06.html">Suivant</a></td></tr><tr><td valign="top" align="left" width="40%">Redhat </td><td align="center" width="20%"><a accesskey="h" href="index.html">Sommaire</a></td><td valign="top" align="right" width="40%"> SuSE</td></tr></table></div></body></html>