Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jun 2025 16:21:20 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Cy Schubert <cy@FreeBSD.org>
Cc:        dev-commits-src-main@FreeBSD.org, dev-commits-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: git: b6e33f0cd536 - main - rc.d/mountcritlocal: Make sure zpools are imported for legacy ZFS
Message-ID:  <240137891.21754.1749997280448@localhost>
In-Reply-To: <202506150508.55F58KLU008592@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_21753_1823422774.1749997280446
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Van: Cy Schubert <cy@FreeBSD.org>
Datum: 15 juni 2025 07:08
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Onderwerp: git: b6e33f0cd536 - main - rc.d/mountcritlocal: Make sure  zpools are imported for legacy ZFS

> 
> 
> The branch main has been updated by cy:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=b6e33f0cd53683e06570606d5bd88fc04a4b76fe
> 
> commit b6e33f0cd53683e06570606d5bd88fc04a4b76fe
> Author:     Cy Schubert 
> AuthorDate: 2025-06-14 13:16:16 +0000
> Commit:     Cy Schubert 
> CommitDate: 2025-06-15 04:39:36 +0000
> 
>     rc.d/mountcritlocal: Make sure zpools are imported for legacy ZFS
>     
>     Legacy ZFS uses fstab to mount its datasets. In an attempt to fix
>     another problem 900bc0206348 broke legacy ZFS in fstab(5). This
>     comit works around the problem by mountcritlocal scanning /etc/fstab
>     for zfs mountpoint and if any are found invoke /etc/rc.d/zpool start.
>     
>     Reviewed by:            imp
>     Differential Revision:  https://reviews.freebsd.org/D50844
> ---
>  libexec/rc/rc.d/mountcritlocal | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/libexec/rc/rc.d/mountcritlocal b/libexec/rc/rc.d/mountcritlocal
> index f91eaf44457c..6dce672657fc 100755
> --- a/libexec/rc/rc.d/mountcritlocal
> +++ b/libexec/rc/rc.d/mountcritlocal
> @@ -27,6 +27,15 @@ mountcritlocal_start()
>         ;;
>     esac
>  
> +   while read a b vfstype rest; do
> +       if [ "$vfstype" = "zfs" -a "$a" != "#" ]; then
> +           # zpool is needed for legacy ZFS
> +           echo 'Importing zpools for legacy ZFS'
> +           /etc/rc.d/zpool start
> +           break
> +       fi
> +   done < /etc/fstab
> +
>     # Mount everything except nfs filesystems.
>     startmsg -n 'Mounting local filesystems:'
>     mount_excludes='no'
> 
> 
> 
> 
> 


Does this mean that a comment # must always be folllowed by a whitespace?

Regards,
Ronald
------=_Part_21753_1823422774.1749997280446
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body><br><p><small><strong>Van:</strong> Cy Schubert &lt;cy@FreeBSD.org&gt;<br><strong>Datum:</strong> 15 juni 2025 07:08<br><strong>Aan:</strong> src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org<br><strong>Onderwerp:</strong> git: b6e33f0cd536 - main - rc.d/mountcritlocal: Make sure  zpools are imported for legacy ZFS<br></small></p><blockquote style="margin-left: 5px; border-left: 3px solid #ccc; margin-right: 0px; padding-left: 5px;"><div class="MessageRFC822Viewer do_not_remove" id="P"><!-- P -->
<!-- processMimeMessage --><div class="TextPlainViewer do_not_remove" id="P.P"><!-- P.P -->The branch main has been updated by cy:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=b6e33f0cd53683e06570606d5bd88fc04a4b76fe">https://cgit.FreeBSD.org/src/commit/?id=b6e33f0cd53683e06570606d5bd88fc04a4b76fe</a><br>;
<br>
commit b6e33f0cd53683e06570606d5bd88fc04a4b76fe<br>
Author: &nbsp;&nbsp;&nbsp;&nbsp;Cy Schubert <cy@freebsd.org><br>
AuthorDate: 2025-06-14 13:16:16 +0000<br>
Commit: &nbsp;&nbsp;&nbsp;&nbsp;Cy Schubert <cy@freebsd.org><br>
CommitDate: 2025-06-15 04:39:36 +0000<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;rc.d/mountcritlocal: Make sure zpools are imported for legacy ZFS<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Legacy ZFS uses fstab to mount its datasets. In an attempt to fix<br>
&nbsp;&nbsp;&nbsp;&nbsp;another problem 900bc0206348 broke legacy ZFS in fstab(5). This<br>
&nbsp;&nbsp;&nbsp;&nbsp;comit works around the problem by mountcritlocal scanning /etc/fstab<br>
&nbsp;&nbsp;&nbsp;&nbsp;for zfs mountpoint and if any are found invoke /etc/rc.d/zpool start.<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Reviewed by: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imp<br>
&nbsp;&nbsp;&nbsp;&nbsp;Differential Revision: &nbsp;<a href="https://reviews.freebsd.org/D50844">https://reviews.freebsd.org/D50844</a><br>;
---<br>
&nbsp;libexec/rc/rc.d/mountcritlocal | 9 +++++++++<br>
&nbsp;1 file changed, 9 insertions(+)<br>
<br>
diff --git a/libexec/rc/rc.d/mountcritlocal b/libexec/rc/rc.d/mountcritlocal<br>
index f91eaf44457c..6dce672657fc 100755<br>
--- a/libexec/rc/rc.d/mountcritlocal<br>
+++ b/libexec/rc/rc.d/mountcritlocal<br>
@@ -27,6 +27,15 @@ mountcritlocal_start()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;esac<br>
&nbsp;<br>
+ &nbsp;&nbsp;while read a b vfstype rest; do<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ "$vfstype" = "zfs" -a "$a" != "#" ]; then<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# zpool is needed for legacy ZFS<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 'Importing zpools for legacy ZFS'<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/etc/rc.d/zpool start<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi<br>
+ &nbsp;&nbsp;done &lt; /etc/fstab<br>
+<br>
&nbsp;&nbsp;&nbsp;&nbsp;# Mount everything except nfs filesystems.<br>
&nbsp;&nbsp;&nbsp;&nbsp;startmsg -n 'Mounting local filesystems:'<br>
&nbsp;&nbsp;&nbsp;&nbsp;mount_excludes='no'<br>
<br>
</cy@freebsd.org></cy@freebsd.org></div><!-- TextPlainViewer -->
<hr>
</div><!-- MessageRFC822Viewer -->
</blockquote><br><br>Does this mean that a comment # must always be folllowed by a whitespace?<div><br></div><div>Regards,</div><div>Ronald</div></body></html>
------=_Part_21753_1823422774.1749997280446--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?240137891.21754.1749997280448>