From owner-freebsd-current@freebsd.org Thu Aug 10 11:22:20 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26806DCF50C for ; Thu, 10 Aug 2017 11:22:20 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AAFC48019D for ; Thu, 10 Aug 2017 11:22:19 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x234.google.com with SMTP id k71so1925136wrc.2 for ; Thu, 10 Aug 2017 04:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=1aqcenjeSI+VSH5G2VKSL4Ccw8f253m97m4t0EZ8ers=; b=uc1Cayf+1zIHMOpK2gTHZgiWqpQoEjix1aRDR1sxYABtgQjLGvrTqbN1JVGmaFofr3 xxr+yhqsuUWTfdAohQNXwTrPMzHazZNEdQ1skVWd5g0GHoqidYie/ncbpBkS8gMLakRT WBnR2y4XSQjCXfq5MAV+NYkIeLosYwM4Zd4vCNNuIT7qalpN5GOrCh75QsRLYtnIMuHP M/w5ElKhXEwm3DjpvM6DYWvmclydB20xJJueM9O8YHKlTkAMgJX4z0QwCaPyyEa2WGcQ ENY0JNz4Dy8kYciAbgDC/zJ013AcXbXXOK23W47D/gdPE8FLlr0+abd9Z5TR5LoVReBU /nxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=1aqcenjeSI+VSH5G2VKSL4Ccw8f253m97m4t0EZ8ers=; b=DVdYCR/AC21e+Tc8g6cBCwVo8h+zxCtokrU5p222HoP65lfGUi4S0DlGsi5w89YkH0 JvElGDvZpTe06/FApV6tAUF/eN25IOLo/f7MMewBG5b1luMwF2Xv3Iddaw7LY7W2eUeZ rBhccr9FD4dKkHeo5+z7h8cZYzQEUsLO5yAi0kwwOtoE3PG5D6Z3beqk7O8paTY8a1Nl THjTNTK8WXsmZGX6TWvXDagESwHnRiu24eDHT7bydcjEtB/1PKtdHVcvyoNtYdOi+PBI IqnJ6iu/6WJEO2nJmKOno/JH8N19QlLXikvLEcDjuK5pqmNMrG6U1RZ9KRdQmeHoDq/Y Yeng== X-Gm-Message-State: AHYfb5iDEt0P/zSzQUAYrB/FbT+5d55i4t8GPjMSJDJ88uKQE37056lt eyJShI7GYrXkRW2E X-Received: by 10.223.136.28 with SMTP id d28mr9546945wrd.217.1502364136974; Thu, 10 Aug 2017 04:22:16 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id n22sm4189666wra.30.2017.08.10.04.22.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Aug 2017 04:22:16 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 10 Aug 2017 12:22:14 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: "O. Hartmann" Cc: freebsd-current Subject: Re: [autofs] problems with "dirty" UFS2 partitions Message-ID: <20170810112214.GA13978@brick> Mail-Followup-To: "O. Hartmann" , freebsd-current References: <20170808071758.6a815d59@freyja.zeit4.iv.bundesimmobilien.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170808071758.6a815d59@freyja.zeit4.iv.bundesimmobilien.de> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2017 11:22:20 -0000 On 0808T0717, O. Hartmann wrote: > Hello, > > we're running a NanoBSD based appliance which resides on a small SoC and > utilises a mSATA SSD for logging, database storage and mail folder. The > operating system is recent CURRENT as it is still under development. > > The problem ist, that from time to time, without knowing or seeing the reason, > the automounted partitions become "dirty (UFS2 partitions, no ZFS dur to > memory and performance limitations). Journaling is enbaled. > > When the partitions on the SSD become "dirty", logging or accessing them isn't > possible anymore and for some reason I do not see any log entries reporting > this (maybe due to the fact all logs are going also to that disk since the logs > would pollute the serial console/console and the console is used for > maintenance purposes/ssh terminal). > > Is it possible to - automated! - check the filesystem on bootup? As on ordinary > FreeBSD systems with fstab-based filesystems, this happens due to the > rc-init-infrastructure but autofs filesystems seem to be somehow standing aside > from this procedure. There are several ways. The easiest of them - since you probably know the device name upfront - is what Warner suggested: add it to fstab(5) with the "noauto" option, and then maybe use the -noauto autofs map (see auto_master(5) man page to see what it does). If you don't know the exact device name, you could add a call to fsck to /etc/autofs/special_media, somewhere in print_map_entry() function. It's the script that automountd(8) runs to figure out what devices are available for mounting, and how to mount them. You might need to increase the vfs.autofs.timeout sysctl, though. Yet another would be to run fsck from devd(8), on "GEOM" event, as documented in devd.conf(5).