[bootlin/training-materials updates] master: Labs: use "exportfs -r" instead of restarting the NFS server (9a4fa7ed)

Michael Opdenacker michael.opdenacker at bootlin.com
Thu Dec 2 16:35:25 CET 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/9a4fa7ed5455855c87dc9986277558f51f86a699

>---------------------------------------------------------------

commit 9a4fa7ed5455855c87dc9986277558f51f86a699
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Thu Dec 2 16:35:25 2021 +0100

    Labs: use "exportfs -r" instead of restarting the NFS server
    
    Restarting the NFS server is a rather ugly thing to
    do in an environment with multiple users (imagine a central
    NFS server).
    
    We just need to ask the server to update the directories
    it exports, not to stop and restart.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

9a4fa7ed5455855c87dc9986277558f51f86a699
 .../kernel-compiling-and-nfs-booting.tex                              | 2 +-
 labs/sysdev-application-debugging/sysdev-application-debugging.tex    | 4 ++--
 labs/sysdev-tinysystem/sysdev-tinysystem.tex                          | 4 ++--
 .../yocto-advanced-configuration-stm32.tex                            | 4 ++--
 labs/yocto-advanced-configuration/yocto-advanced-configuration.tex    | 4 ++--
 .../sysdev-root-filesystem-principles.tex                             | 4 ++--
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex b/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
index 9b9776be..2f270f8d 100644
--- a/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
+++ b/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
@@ -135,7 +135,7 @@ causing your root filesystem to be read-only.
 Then, restart the NFS server:
 
 \begin{verbatim}
-sudo /etc/init.d/nfs-kernel-server restart
+sudo exportfs -r
 \end{verbatim}
 
 If there is any error message, this usually means that there was a
diff --git a/labs/sysdev-application-debugging/sysdev-application-debugging.tex b/labs/sysdev-application-debugging/sysdev-application-debugging.tex
index 6223838b..8955c56a 100644
--- a/labs/sysdev-application-debugging/sysdev-application-debugging.tex
+++ b/labs/sysdev-application-debugging/sysdev-application-debugging.tex
@@ -49,8 +49,8 @@ Go back to the \code{$HOME/__SESSION_NAME__-labs/debugging} directory
 and extract the \code{buildroot-2021.08.<n>/output/images/rootfs.tar}
 archive in the \code{nfsroot} directory.
 
-Add this directory to the \code{/etc/exports} file and restart
-\code{nfs-kernel-server}.
+Add this directory to the \code{/etc/exports} file and run
+\code{sudo exportfs -r}.
 
 Boot your ARM board over NFS on this new filesystem, using the same
 kernel as before.
diff --git a/labs/sysdev-tinysystem/sysdev-tinysystem.tex b/labs/sysdev-tinysystem/sysdev-tinysystem.tex
index 2ee625c5..7af1162a 100644
--- a/labs/sysdev-tinysystem/sysdev-tinysystem.tex
+++ b/labs/sysdev-tinysystem/sysdev-tinysystem.tex
@@ -68,9 +68,9 @@ Also make sure that there is no space between the IP address and the NFS
 options, otherwise default options will be used for this IP address,
 causing your root filesystem to be read-only.
 
-Then, restart the NFS server:
+Then, make the NFS server the new configuration:
 
-\bashcmd{$ sudo service nfs-kernel-server restart}
+\bashcmd{$ sudo exportfs -r}
 
 \section{Booting the system}
 
diff --git a/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex b/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex
index 0f55d9d5..4549312b 100644
--- a/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex
+++ b/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex
@@ -72,9 +72,9 @@ Then make sure this directory is used and exported by the NFS server by adding
 \code{/nfs *(rw,sync,no_root_squash,subtree_check)} to the
 \code{/etc/exports} file.
 
-Finally restart the service:
+Finally, make the NFS server use the new configuration:
 \begin{verbatim}
-sudo service nfs-kernel-server restart
+sudo exportfs -r
 \end{verbatim}
 
 \section{Add a package to the rootfs image}
diff --git a/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex b/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex
index 7edabb73..fc939ecb 100644
--- a/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex
+++ b/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex
@@ -63,9 +63,9 @@ Then make sure this directory is used and exported by the NFS server by adding
 \code{/nfs *(rw,sync,no_root_squash,subtree_check)} to the
 \code{/etc/exports} file.
 
-Finally restart the service:
+Finally update the NFS server:
 \begin{verbatim}
-sudo service nfs-kernel-server restart
+sudo exportfs -r
 \end{verbatim}
 
 \section{Add a package to the rootfs image}
diff --git a/slides/sysdev-root-filesystem-principles/sysdev-root-filesystem-principles.tex b/slides/sysdev-root-filesystem-principles/sysdev-root-filesystem-principles.tex
index a23d6b35..9a54a615 100644
--- a/slides/sysdev-root-filesystem-principles/sysdev-root-filesystem-principles.tex
+++ b/slides/sysdev-root-filesystem-principles/sysdev-root-filesystem-principles.tex
@@ -177,8 +177,8 @@ Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)
     \item \code{rw,no_root_squash,no_subtree_check} are the NFS server
       options for this directory export.
     \end{itemize}
-  \item Start or restart your NFS server (example: Debian, Ubuntu)\\
-    \code{sudo /etc/init.d/nfs-kernel-server restart}
+  \item Ask your NFS server to reload this file:\\
+    \code{sudo exportfs -r}
   \end{itemize}
 \end{frame}
 




More information about the training-materials-updates mailing list