From owner-freebsd-fs@FreeBSD.ORG Sat Nov 29 15:42:24 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 C144CA4D for ; Sat, 29 Nov 2014 15:42:24 +0000 (UTC) Received: from mail.yellowspace.net (mail.yellowspace.net [80.190.192.217]) by mx1.freebsd.org (Postfix) with ESMTP id 69A6F69E for ; Sat, 29 Nov 2014 15:42:21 +0000 (UTC) Received: from peta.fritz.box ([88.217.180.10]) (AUTH: PLAIN lopez.on.the.lists@yellowspace.net, SSL: TLSv1/SSLv3, 128bits, AES128-SHA) by mail.yellowspace.net with esmtp; Sat, 29 Nov 2014 16:41:25 +0100 id 02B81C2F.000000005479E925.0000A2C5 Message-ID: <5479E91F.6020809@yellowspace.net> Date: Sat, 29 Nov 2014 16:41:19 +0100 From: Lorenzo Perone User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Mykola Golub Subject: Re: Mounting a filesystem on a HAST provider without HAST References: <5477B7AF.5020802@yellowspace.net> <54785AA1.10107@yellowspace.net> <20141129123130.GA21946@gmail.com> In-Reply-To: <20141129123130.GA21946@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org 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: Sat, 29 Nov 2014 15:42:24 -0000 On 29.11.14 13:31, Mykola Golub wrote: > You can obtain the offset by running `hastctl dump' command (localcnt > field). > > If you still want to calulate it yourself, see how hastctl calculates > hr_localoff in sbin/hastctl/hastctl.c:create_one() with the help of > sbin/hastd/metadata.c:activemap_calc_ondisk_size(). In short, you need > to calculate number of extents (mediasize / extentsize) and reserve a > bit for every extent in the map, rounding up to the sector size. Thanks a lot for both pointers! hastctl dump will do perfectly well for now, it can easilly be wrapped in a local shell script. Greetings and Regards, Lorenzo