From owner-freebsd-hackers@freebsd.org Fri Feb 26 10:26:26 2016 Return-Path: Delivered-To: freebsd-hackers@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 5FF1AAB4E8B for ; Fri, 26 Feb 2016 10:26:26 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from smtp.rlwinm.de (smtp.rlwinm.de [IPv6:2a01:4f8:201:31ef::e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2957EFD for ; Fri, 26 Feb 2016 10:26:25 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from crest.local (unknown [87.253.189.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.rlwinm.de (Postfix) with ESMTPSA id E60A810CCE for ; Fri, 26 Feb 2016 11:26:22 +0100 (CET) Subject: Re: ZFS full system backup hoses the backup host. To: freebsd-hackers@freebsd.org References: <56CF6FB0.1010001@freebsd.org> From: Jan Bramkamp Message-ID: <56D0284E.3010808@rlwinm.de> Date: Fri, 26 Feb 2016 11:26:22 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56CF6FB0.1010001@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2016 10:26:26 -0000 On 25/02/16 22:18, Allan Jude wrote: > On 2016-02-25 15:58, Zaphod Beeblebrox wrote: >> This violated POLA for me. I backed up a host using: >> >> time zfs send -vRI @backup-1-e zroot@backup-1-f | ssh backuphost "zfs >> receive -vFud zroot/backup/host" >> >> >> Only to find that the backup host (a week later) failed to reboot? The >> problem? Well... -u on receive marks the filesystem as unmounted only >> "right now" not "next reboot" and -R on send implies -p (send dataset >> attributes) and... >> >> ... zroot/ROOT/default mountpoint=/ (among others). >> >> The only hackish way to fix this I see is to have a list of mountpoints to >> correct --- which is partially what I'm trying to avoid by using -R --- I >> just want the whole thing backed up. >> >> What have other people done to get around this and/or can we either put in >> an "ignore properties" on receive flag or a -R on send that doesn't send >> them? > > The sysutils/zxfer script allows you to override properties during > replication, so I usually set readonly=on and for such a backup would > set mountpoint=none Do you know if this is race free or is there a moment on the receiving system where it has an (unmounted) dataset with mountpoint=/ which would break the system (possibly in interesting ways) after a crash?