From owner-freebsd-fs@FreeBSD.ORG Fri Nov 28 11:16:32 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09C47BB5 for ; Fri, 28 Nov 2014 11:16:32 +0000 (UTC) Received: from mail.yellowspace.net (mail.yellowspace.net [80.190.192.217]) by mx1.freebsd.org (Postfix) with ESMTP id 9259C829 for ; Fri, 28 Nov 2014 11:16:29 +0000 (UTC) Received: from furia.intranet ([88.217.4.119]) (AUTH: PLAIN lopez.on.the.lists@yellowspace.net, SSL: TLSv1/SSLv3, 128bits, AES128-SHA) by mail.yellowspace.net with esmtp; Fri, 28 Nov 2014 12:16:22 +0100 id 02B25C31.0000000054785986.00012ADC Message-ID: <54785AA1.10107@yellowspace.net> Date: Fri, 28 Nov 2014 12:21:05 +0100 From: Lorenzo Perone User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Mounting a filesystem on a HAST provider without HAST (was: Re: HAST, zvols, istgt and carp working...) References: <5477B7AF.5020802@yellowspace.net> In-Reply-To: <5477B7AF.5020802@yellowspace.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 11:16:32 -0000 Hi All, I succeeded on this topic, but a new question arose - so I'd like to share the (provisory) solution as well as the question... On 28.11.14 00:45, Lorenzo Perone wrote: > Is there any way to mount the snapshot [of a provider used by hast] read only - or to have a 'hast' > wrapper for the snapshot without having to really 'hast' it? I was able to succeed after comparing a hexdump of the first few MBs of the original zvol and the vol "under hast". ( /dev/zvol/rtank/vols/jail1@hellotest vs. /dev/hast/jail1 ) The UFS filesystem on the zvol provider begins after 135168 bytes (132KB) of hast-header. So I tried to create a transparent provider with gnop: gnop create -o 135168 /dev/zvol/rtank/vols/jail1@hellotest and the mount mount -t ufs -o ro /dev/zvol/rtank/vols/jail1@hellotest.nop /mnt succeeded. Now my new question is: Can I "safely" assume that this header is always 132K (I assume not - it probably contains the bitmap...)? In this case, which formula should be applied to calculate the offset? Thanks a lot in advance for any hint, And to the FreeBSD team / pjd: THANKs for GEOM! :-) It really is the best invention closely after espresso coffee... Gretings and Regards,