NetBSD Problem Report #54733

From martin@duskware.de  Tue Dec  3 17:31:47 2019
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 29D1D7A16D
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  3 Dec 2019 17:31:47 +0000 (UTC)
Message-Id: <20191203173137.1188C5CC7A2@emmas.aprisoft.de>
Date: Tue,  3 Dec 2019 18:31:37 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ZFS warnings during default boot, even if no ZFS is in use
X-Send-Pr-Version: 3.95

>Number:         54733
>Category:       kern
>Synopsis:       ZFS warnings during default boot, even if no ZFS is in use
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 03 17:35:00 +0000 2019
>Last-Modified:  Thu Dec 05 14:25:01 +0000 2019
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.19
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD painkiller.duskware.de 9.99.19 NetBSD 9.99.19 (GENERIC64) #88: Tue Dec 3 18:17:17 CET 2019 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

With /etc/rc.d/zfs trying to bring up ZFS pools early we now get scary
warnings at boot time on machines that never saw a ZFS:

root file system type: ffs
kern.module.path=/stand/evbarm/9.99.19/modules
WARNING: ZFS on NetBSD is under development
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS filesystem version: 5
Lid Switch: lid opened.


It would be better if trying to use ZFS would be triggered by some config
file, or the kernel be silent about the whole action (who cares what version
is in use if it is not in use?)

>How-To-Repeat:
Boot current.

>Fix:
n/a

>Audit-Trail:
From: John Nemeth <jnemeth@cue.bc.ca>
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
        netbsd-bugs@netbsd.org
Cc: 
Subject: Re: kern/54733: ZFS warnings during default boot, even if no ZFS is in use
Date: Tue, 3 Dec 2019 13:15:12 -0800

 On Dec 3,  5:35pm, martin@NetBSD.org wrote:
 }
 } >Number:         54733
 } >Category:       kern
 } >Synopsis:       ZFS warnings during default boot, even if no ZFS is in use
 } >Arrival-Date:   Tue Dec 03 17:35:00 +0000 2019
 } >Originator:     Martin Husemann
 } >Release:        NetBSD 9.99.19
 } >Organization:
 } The NetBSD Foundation, Inc.
 } >Environment:
 } System: NetBSD painkiller.duskware.de 9.99.19 NetBSD 9.99.19 (GENERIC64) #88: Tue Dec 3 18:17:17 CET 2019 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
 } Architecture: aarch64
 } Machine: evbarm
 } >Description:
 } 
 } With /etc/rc.d/zfs trying to bring up ZFS pools early we now get scary
 } warnings at boot time on machines that never saw a ZFS:
 } 
 } root file system type: ffs
 } kern.module.path=/stand/evbarm/9.99.19/modules
 } WARNING: ZFS on NetBSD is under development
 } ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
 } to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
 } ZFS filesystem version: 5
 } Lid Switch: lid opened.

      The "ZFS NOTICE" is clearly a FreeBSD specific message.
 /boot/loader.conf doesn't exist on NetBSD.  Besides being noisy,
 it is wrong.

 } It would be better if trying to use ZFS would be triggered by some config
 } file, or the kernel be silent about the whole action (who cares what version
 } is in use if it is not in use?)

      It could also be triggered by the first attempt to actually
 use ZFS, i.e. the presence of a ZFS file system.

 } >How-To-Repeat:
 } Boot current.
 } 
 }-- End of excerpt from martin@NetBSD.org

From: Brad Spencer <brad@anduin.eldar.org>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
        martin@NetBSD.org
Subject: Re: kern/54733: ZFS warnings during default boot, even if no ZFS is in use
Date: Thu, 05 Dec 2019 09:22:20 -0500

 John Nemeth <jnemeth@cue.bc.ca> writes:

 > The following reply was made to PR kern/54733; it has been noted by GNATS.
 >

 [snip]

 >  } With /etc/rc.d/zfs trying to bring up ZFS pools early we now get scary
 >  } warnings at boot time on machines that never saw a ZFS:
 >  } 
 >  } root file system type: ffs
 >  } kern.module.path=/stand/evbarm/9.99.19/modules
 >  } WARNING: ZFS on NetBSD is under development
 >  } ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
 >  } to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
 >  } ZFS filesystem version: 5
 >  } Lid Switch: lid opened.
 >  
 >       The "ZFS NOTICE" is clearly a FreeBSD specific message.
 >  /boot/loader.conf doesn't exist on NetBSD.  Besides being noisy,
 >  it is wrong.
 >  
 >  } It would be better if trying to use ZFS would be triggered by some config
 >  } file, or the kernel be silent about the whole action (who cares what version
 >  } is in use if it is not in use?)
 >  
 >       It could also be triggered by the first attempt to actually
 >  use ZFS, i.e. the presence of a ZFS file system.
 >  
 >  } >How-To-Repeat:
 >  } Boot current.
 >  } 
 >  }-- End of excerpt from martin@NetBSD.org
 >  

 Some of this is probably my fault...  won't have time to mess with this
 right now, however...

 The line in /etc/rc.d/zfs for starting zfs up:

         if [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then

 should probably be:

         if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then

 I think that this will have the effect of not trying to start anything
 zfs if you have set not set zfs=YES in /etc/rc.conf.  I would still
 leave the stop function alone, as you may wish to stop zfs after
 changing a /etc/rc.conf.  My original assumption was that
 /etc/zfs/zpool.cache would not exist if you had never used it, but there
 is the case of it existing, but then disabling zfs use later in
 /etc/rc.conf (not setting zfs=YES) and not removing the cache file.

 I won't comment on the kernel message... yes, it has FreeBSDism in it
 that does not apply.




 -- 
 Brad Spencer - brad@anduin.eldar.org - KC8VKS - http://anduin.eldar.org

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.45 2018/12/21 14:23:33 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.