From owner-freebsd-stable@freebsd.org Wed Jun 12 05:11:24 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47F7815CF2EB for ; Wed, 12 Jun 2019 05:11:24 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "eg.sd.rdtc.ru", Issuer "eg.sd.rdtc.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3498D81A for ; Wed, 12 Jun 2019 05:11:12 +0000 (UTC) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: freebsd-stable@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x5C5Aed8070955 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 12 Jun 2019 12:10:40 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: fsck vs zvol To: "O'Connor, Daniel" , freebsd-stable References: <06546140-1B02-432D-8B7C-525AA1EA4FBA@dons.net.au> From: Eugene Grosbein Message-ID: Date: Wed, 12 Jun 2019 12:10:33 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <06546140-1B02-432D-8B7C-525AA1EA4FBA@dons.net.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2D3498D81A X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-0.76 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.77)[-0.766,0]; MX_INVALID(0.50)[greylisted]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.59)[0.588,0]; NEURAL_HAM_LONG(-0.98)[-0.983,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_PERMFAIL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.00)[country: RU(0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29072, ipnet:2a03:3100::/32, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 05:11:24 -0000 12.06.2019 8:04, O'Connor, Daniel wrote: > Hi, > I have a small UFS partition that is the sysvol for Samba 4 (otherwise it doesn't work due to ACL issues). > > I found that I usually have to manually fsck it on a bad reboot, even if I have fsck_y_enable so I added a hack to /etc/rc.d/fsck to fsck -y that FS before the normal fsck runs. > > Logging looks like.. > > Jun 12 09:45:41 moo kernel: Setting hostuuid: 00000000-0000-0000-0000-ac1f6b01103a. > Jun 12 09:45:41 moo kernel: Setting hostid: 0x6cbfec5d. > Jun 12 09:45:41 moo kernel: Starting file system checks: > Jun 12 09:45:41 moo kernel: Mounting local filesystems:mount: /dev/zvol/zroot/samba4sysvol: R/W mount of /var/db/samba4/sysvol denied. Filesystem is not clean - run fsck.: Operation not permitted > Jun 12 09:45:41 moo kernel: Mounting /etc/fstab filesystems failed, will retry after root mount hold release > Jun 12 09:45:41 moo kernel: mount: /dev/zvol/zroot/samba4sysvol: R/W mount of /var/db/samba4/sysvol denied. Filesystem is not clean - run fsck.: Operation not permitted > Jun 12 09:45:41 moo kernel: . > Jun 12 09:45:41 moo kernel: Mounting /etc/fstab filesystems failed, startup aborted > Jun 12 09:45:41 moo kernel: ERROR: ABORTING BOOT (sending SIGTERM to parent)! > > I'm not sure if marking this FS as 'late' would help (and/or break something else..) > > Has anyone else tried something like this? > > The Samba 4 ZFS is from https://wiki.freebsd.org/Samba4ZFS (which I wrote..) Please show your /etc/fstab line for this UFS-inside-ZVOL and your changes to rc.d/fsck. Your logs do not show that fsck is started so I presume some mistake in the /etc/fstab. Maybe you forgot that it needs non-zero sixth field.