From owner-freebsd-fs@freebsd.org Fri Nov 20 08:47:37 2015 Return-Path: Delivered-To: freebsd-fs@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 11494A32857 for ; Fri, 20 Nov 2015 08:47:37 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (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 C5DE81375 for ; Fri, 20 Nov 2015 08:47:36 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 72B3515340D for ; Fri, 20 Nov 2015 09:47:33 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xpw95g_SZHri; Fri, 20 Nov 2015 09:47:15 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:8d89:26f8:7566:5e3f] (unknown [IPv6:2001:4cb8:3:1:8d89:26f8:7566:5e3f]) by smtp.digiware.nl (Postfix) with ESMTP id 535B1153408 for ; Fri, 20 Nov 2015 09:47:15 +0100 (CET) Subject: Fwd: Strange behaviour of getcwd for hidden ZFS snapshots. References: <55E437C2.5080609@digiware.nl> To: "freebsd-fs@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. X-Forwarded-Message-Id: <55E437C2.5080609@digiware.nl> Message-ID: <564EDE1C.7080502@digiware.nl> Date: Fri, 20 Nov 2015 09:47:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <55E437C2.5080609@digiware.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 08:47:37 -0000 [This is repost from an earlier version on current@, but then there were no takers.] Hi, I was trying to restore some deleted files from a snapshot with rsync: [/home/www/.zfs/snapshot/zfs-auto-snap_hourly-2015-08-31-12h00/www.tegenbosch28.nl] root@zfs.digiware.nl# rsync -rav * /tmp rsync: getcwd(): No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at util.c(1101) [Receiver=3.1.1] Exit 3 Turns out that if the snapshots are hidden, then getcwd() errors out? Setting snapdir=visible on the volume gets it to do its job. As does changing out of the snapshot directory and using the full path for source and destination Is this a bug or a feature? 10.2-STABLE FreeBSD 10.2-STABLE #324 r287170: Thu Aug 27 --WjW