[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#705649: Document solutions for re-enabling static mtab

tags 705649 + patch

On Tue, Apr 16, 2013 at 10:37:37PM +0100, Roger Leigh wrote:
> I've not made any changes as yet.  Given that this will only affect
> users who are using e.g. nbd as their rootfs, and not any regular
> use of network nfsroot etc., the best option may be to simply
> document how to re-enable a static mtab in the release notes, for
> users who are dependent upon _netdev working.  This would
> essentially be to
> - comment out the mtab_migrate conditional in /etc/init.d/checkroot.sh
> - rm /etc/mtab
> - cat /proc/mounts > /etc/mtab
> and to reboot; the _netdev flag will then be stored in mtab correctly.

Patch for the release notes attached.  I've gone through the process
locally and confirmed that this all works as documented.


  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
Index: en/issues.dbk
--- en/issues.dbk	(revision 9741)
+++ en/issues.dbk	(working copy)
@@ -186,6 +186,73 @@
+<section id="mtab">
+<title><filename>/etc/mtab</filename> and <literal>_netdev</literal></title>
+The file <filename>/etc/mtab</filename>, used to store the list of
+currently mounted filesystems, has been changed to be a symbolic link
+to <filename>/proc/mounts</filename>.  For almost every case, this
+change will result in a more robust system since the list can never
+become inconsistent with reality.  However, if you use the
+<literal>_netdev</literal> option in <filename>/etc/fstab</filename>
+to indicate that a filesystem is a network filesystem requiring
+special handling, this will no longer be set in
+<filename>/proc/mounts</filename> after rebooting.  This will
+<emphasis>not</emphasis> cause problems for standard network
+filesystems such as <acronym>NFS</acronym>, which do not rely on the
+<literal>_netdev</literal> option.  Filesystems which are
+<emphasis>unaffected</emphasis> by this issue are
+<literal>ceph</literal>, <literal>cifs</literal>,
+<literal>coda</literal>, <literal>gfs</literal>,
+<literal>ncp</literal>, <literal>ncpfs</literal>,
+<literal>nfs</literal>, <literal>nfs4</literal>,
+<literal>ocfs2</literal> and <literal>smbfs</literal>.  For
+filesystems which <emphasis>do</emphasis> rely on
+<literal>_netdev</literal> for correct unmounting at shutdown, for
+example when using an <acronym>NBD</acronym>, a static mtab will be
+the only way to use <literal>_netdev</literal> in wheezy.  If you have
+such a setup, then after completing the upgrade to wheezy restore a
+static <filename>/etc/mtab</filename> by doing the following:
+Edit <filename>/etc/init.d/checkroot.sh</filename>, and comment out
+these lines:
+        if [ "$rootmode" != "ro" ]; then
+                mtab_migrate
+        fi
+If you have rebooted the system, and <filename>/etc/mtab</filename> is
+now a symbolic link:
+# rm /etc/mtab
+# cp /proc/mounts /etc/mtab
+Re-add the <literal>_netdev</literal> option by remounting the
+affected filesystems:
+# mount -o remount <replaceable>filesystem</replaceable>
+<filename>/etc/mtab</filename> will be recreated fully next time you
+reboot the system.
 <section id="mksh">
   <title>The pdksh to mksh transition</title>
Index: en/release-notes.dbk
--- en/release-notes.dbk	(revision 9741)
+++ en/release-notes.dbk	(working copy)
@@ -394,6 +394,10 @@
     <glossdef><para>Mail Transport Agent</para></glossdef>
+    <glossterm>NBD</glossterm>
+    <glossdef><para>Network Block Device</para></glossdef>
+  </glossentry>
+  <glossentry>
     <glossdef><para>Network File System</para></glossdef>

Reply to: