From owner-freebsd-current@freebsd.org Mon Aug 31 11:17:33 2015 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 6A0CD9C7181 for ; Mon, 31 Aug 2015 11:17:33 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 50736C2B for ; Mon, 31 Aug 2015 11:17:33 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: by mailman.ysv.freebsd.org (Postfix) id 4FDD59C7180; Mon, 31 Aug 2015 11:17:33 +0000 (UTC) Delivered-To: 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 4F7119C717F for ; Mon, 31 Aug 2015 11:17:33 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (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 18E0CC29 for ; Mon, 31 Aug 2015 11:17:33 +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 3E6EE15340A for ; Mon, 31 Aug 2015 13:17:27 +0200 (CEST) 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 rMhhNiNHER7H; Mon, 31 Aug 2015 13:17:25 +0200 (CEST) Received: from [IPv6:2001:4cb8:3:1:d84c:92fb:dd32:d719] (unknown [IPv6:2001:4cb8:3:1:d84c:92fb:dd32:d719]) by smtp.digiware.nl (Postfix) with ESMTP id F2084153408 for ; Mon, 31 Aug 2015 13:17:24 +0200 (CEST) To: current@freebsd.org From: Willem Jan Withagen Subject: Strange behaviour of getcwd for hidden ZFS snapshots. Organization: Digiware Management b.v. Message-ID: <55E437C2.5080609@digiware.nl> Date: Mon, 31 Aug 2015 13:17:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 31 Aug 2015 11:17:33 -0000 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