From owner-freebsd-current@FreeBSD.ORG Wed May 20 20:15:19 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42A18106566B for ; Wed, 20 May 2009 20:15:19 +0000 (UTC) (envelope-from serenity@exscape.org) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id EDC138FC25 for ; Wed, 20 May 2009 20:15:18 +0000 (UTC) (envelope-from serenity@exscape.org) Received: from c83-253-252-234.bredband.comhem.se ([83.253.252.234]:43588 helo=mx.exscape.org) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.69) (envelope-from ) id 1M6sBs-0007lH-62 for freebsd-current@freebsd.org; Wed, 20 May 2009 22:15:06 +0200 Received: from [192.168.1.5] (macbookpro [192.168.1.5]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx.exscape.org (Postfix) with ESMTPSA id 4DD91F7A38 for ; Wed, 20 May 2009 22:15:03 +0200 (CEST) Message-Id: From: Thomas Backman To: freebsd-current@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Wed, 20 May 2009 22:15:03 +0200 X-Mailer: Apple Mail (2.935.3) X-Originating-IP: 83.253.252.234 X-Scan-Result: No virus found in message 1M6sBs-0007lH-62. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1M6sBs-0007lH-62 769bc1d71ea7e2f65c874cedf45a2b5d Subject: How to duplicate a pool with zfs send/recv without breaking mountpoints? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 20 May 2009 20:15:19 -0000 I'll let the output speak for itself. This is after running zpool create slave X && zfs create slave/received && NOW=$(date +"backup-%Y%m%d-%H%M"); zfs snapshot -r tank@$NOW && zfs send -R tank@ $NOW | zfs recv -vFd slave/received && zpool export slave && zpool import slave [root@chaos ~]# mount tank/root on / (zfs, local, noatime) devfs on /dev (devfs, local) /dev/ad0s1a on /bootdir (ufs, local, soft-updates) tank/tmp on /tmp (zfs, local, noatime) tank/usr on /usr (zfs, local, noatime) tank/usr/ports on /usr/ports (zfs, local, noatime) tank/usr/ports/distfiles on /usr/ports/distfiles (zfs, local, noatime) tank/usr/src on /usr/src (zfs, local, noatime) tank/var on /var (zfs, local, noatime) //SERENITY@EXSCAPE/FBSDBACKUP on /mnt/backup (smbfs) slave/received/root on / (zfs, local, noatime) slave on /slave (zfs, local) slave/received/tmp on /tmp (zfs, local, noatime) slave/received/usr on /usr (zfs, local, noatime) slave/received/usr/ports on /usr/ports (zfs, local, noatime) slave/received/usr/ports/distfiles on /usr/ports/distfiles (zfs, local, noatime) slave/received/usr/src on /usr/src (zfs, local, noatime) slave/received/var on /var (zfs, local, noatime) [root@chaos ~]# ls /dev [root@chaos ~]# zfs list internal error: failed to initialize ZFS library (shocking!) Any ideas? I tried setting the mountpoint property on the slave, but I'm pretty sure that didn't help (as the next (incremental) backup resets the mountpoints to /... again, I suppose). Regards, Thomas