From owner-freebsd-fs@freebsd.org Sun Sep 6 18:09:22 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 39D0B9CC3F3 for ; Sun, 6 Sep 2015 18:09:22 +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 F24D2858 for ; Sun, 6 Sep 2015 18:09:21 +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 78FD1153431; Sun, 6 Sep 2015 20:09:19 +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 J1s-1LtyGSG9; Sun, 6 Sep 2015 20:09:09 +0200 (CEST) Received: from [192.168.10.10] (asus [192.168.10.10]) by smtp.digiware.nl (Postfix) with ESMTPA id 14A7A153416; Sun, 6 Sep 2015 19:58:37 +0200 (CEST) Subject: Re: can zfs snapshot be used to back LUN in ctl.conf ? To: Zeus Panchenko References: <20150827150027.10825@smtp.new-ukraine.org> <55EC4F3B.7090804@digiware.nl> <20150906201059.70248@smtp.new-ukraine.org> Cc: freebsd-fs@freebsd.org From: Willem Jan Withagen Message-ID: <55EC7ECC.5050201@digiware.nl> Date: Sun, 6 Sep 2015 19:58:36 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150906201059.70248@smtp.new-ukraine.org> Content-Type: text/plain; charset=windows-1252 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: Sun, 06 Sep 2015 18:09:22 -0000 On 6-9-2015 19:10, Zeus Panchenko wrote: > Willem Jan Withagen wrote: >>> istgt do allows that, while ctld fails to start and complains >>> >>> but if I copy the file from zfs snapshot to some place, then ctld starts >>> as expected ... >> >> As far as I know those snapshots are read-only. > > yes, and it is just what I want > >> So other that mount and use for reading backup stuff it does not really >> serve a purpose? > > file is NTFS volume, I need to provide it to win host ... ctld refuses > to do that even in ro mode :( > > >> And than still you'd next a "consistent" fs on the >> volume to do any useful work. So that would only work for filesystems >> that need a recover that does not involve writing to the volume. > > yes, no writing ... just reading ... and I wonder why istgt was doing > that fine but ctld refuses :( Okeeee, I'm in a sort of similar setup, but haven't tried snapshotting. Difference here is that I use a zvol as background storage. Now is there one thing which has bitten me before which making rsync backups... It is impossible to do getcwd when that is place within a snapshot, unless the snapdir flag is set to visible on the volume. Not doing so results in an error. So perhaps something like this is the difference between the two providers Example: sent 151 bytes received 368 bytes 1,038.00 bytes/sec total size is 0 speedup is 0.00 Now it works: # zfs get snapdir zfsraid/backups NAME PROPERTY VALUE SOURCE zfsraid/backups snapdir visible received # rsync -rav . sending incremental file list drwxr-xr-x 7 2015/06/17 11:35:11 . drwxr-xr-x 2 2010/01/29 13:13:49 Digiware Now it doesn't: # zfs set snapdir=hidden zfsraid/backups # rsync -rav . 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] So you might need to set the property of the volume your backing file is on. --WjW