From owner-freebsd-fs@FreeBSD.ORG Thu Apr 2 05:56:41 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13E26106564A for ; Thu, 2 Apr 2009 05:56:41 +0000 (UTC) (envelope-from antik@bsd.ee) Received: from sorbesgroup.com (mail.sorbesgroup.com [217.159.241.118]) by mx1.freebsd.org (Postfix) with ESMTP id 91A578FC22 for ; Thu, 2 Apr 2009 05:56:40 +0000 (UTC) (envelope-from antik@bsd.ee) Received: from localhost (localhost.localdomain [127.0.0.1]) by sorbesgroup.com (Postfix) with ESMTP id 345C93C520BA for ; Thu, 2 Apr 2009 08:31:17 +0300 (EEST) Received: from sorbesgroup.com ([127.0.0.1]) by localhost (sorbesgroup.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13441-08 for ; Thu, 2 Apr 2009 08:31:15 +0300 (EEST) Received: from [192.168.0.80] (andrei [192.168.0.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sorbesgroup.com (Postfix) with ESMTP id D16F33C5207B for ; Thu, 2 Apr 2009 08:31:15 +0300 (EEST) Message-ID: <49D4539A.3080506@bsd.ee> Date: Thu, 02 Apr 2009 08:56:42 +0300 From: Andrei Kolu User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <49D2F2DE.1090807@bsd.ee> <49D3A177.2040106@goflexitllc.com> <20090401193253.GA87622@psconsult.nl> In-Reply-To: <20090401193253.GA87622@psconsult.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at localhost Subject: Re: Auto mount and ignore errors X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 05:56:41 -0000 Paul Schenkeveld wrote: > On Wed, Apr 01, 2009 at 12:16:39PM -0500, Aaron Hurt wrote: > >> Andrew Brampton wrote: >> >>> 2009/4/1 Andrei Kolu : >>> >>> >>>> Andrew Brampton wrote: >>>> >>>> >>>>> So my question is, is there a fstab option which will ignore a failed >>>>> mount, and if possible continue to boot? I've read the man page, and >>>>> did a bit of googling, but didn't find anything. Would there be any >>>>> objection to a patch which implemented a "ignerror" flag? >>>>> >>>>> >>>> Mount from /etc/rc.local? >>>> >>> You mean create my own script for the mounting? Sure that would work >>> but I don't see that as "clean" as placing it in fstab. >>> >>> Andrew >>> >>> >> I think "clean" here is a bit misplaced. It's not ever "clean" to ignore a >> file system mount error. If you're file system in question is prone to >> mount failures it's probably not a good idea to mount it from fstab at all. >> > > I use my notebook both in my home office and when visiting customers. > When in my office I like to mount some nfs filesystems that are not > available when I'm out. Before 7.1 /etc/rc worked just the way I wanted > mounting these nfs filesystems when in my office and skipping them with > an error telling me that the name of the nfs server cannot be resolved > when visiting customers. > > For NFS I use automounter: /etc/rc.conf # NFS automount amd_enable="YES" In case my NFS backup server is down or there is problem with network then I can start fileserver without manually interacting with fstab to start up operating system. Now my backup script can mount filesystems as needed with this script: #!/bin/sh # This script does personal backups to a rsync backup server. You will end up # with a 7 day rotating incremental backup. The incrementals will go # into subdirectories named after the day of the week, and the current # full backup goes into a directory called "current" # tridge@linuxcare.com # directory to backup BDIR=/data/samba ######################################################################## cd /host/192.168.0.249/ BACKUPDIR=`date +%A` OPTS="--progress --force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES --delete --backup --backup-dir=/data/backup/$BACKUPDIR -a" export PATH=$PATH:/bin:/usr/bin:/usr/local/bin # the following line clears the last weeks incremental directory [ -d $BDIR/emptydir ] || mkdir $BDIR/emptydir rsync --delete -a $BDIR/emptydir/ /data/backup/$BACKUPDIR/ rmdir $BDIR/emptydir # now the actual transfer rsync $OPTS $BDIR /data/backup/current