From owner-freebsd-fs@FreeBSD.ORG Fri Jun 12 13:49:51 2015 Return-Path: Delivered-To: freebsd-fs@hub.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 9C028AD3 for ; Fri, 12 Jun 2015 13:49:51 +0000 (UTC) (envelope-from felipemonteiro.carvalho@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 72F3A1DF0 for ; Fri, 12 Jun 2015 13:49:51 +0000 (UTC) (envelope-from felipemonteiro.carvalho@gmail.com) Received: by pacyx8 with SMTP id yx8so23629962pac.2 for ; Fri, 12 Jun 2015 06:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bnIuqotZbaiEnRuRxlHFXN0P9X6qOh4V5FfwoUXH8/U=; b=KHQfpHJUwggj2XbfgdPUZDKM/MFY588j+beKe7fvxZ/arGrN1Fz9W0I6LbY0sdYvA+ zxVDKRvbSK38fTlCygztPlxAYRGr1wW2NTiN4F0WM1HBCsVaIeMQXn6NgD8z4rQVNLWB k/me7qQJzr+XPwf0FZIXCrbcnN5ZbnC9VwQ3ZQTIMo3EgsUOWumCzjFAB0/QppqgSjXr m5jjaDakZlsHv2Z4i7TQaEm/c79RjIyceCA0IU5UUE7HjCdSL+S1joWuLBo6Cz9ttwgy 97BESYXWQyLyd63mEmz/9NJHodegtk/N7JdhMjtAudFNysLGCSU/9ZpvsZCnrYaBaK1r Wc/A== MIME-Version: 1.0 X-Received: by 10.66.122.5 with SMTP id lo5mr23509524pab.141.1434116990915; Fri, 12 Jun 2015 06:49:50 -0700 (PDT) Received: by 10.66.147.4 with HTTP; Fri, 12 Jun 2015 06:49:50 -0700 (PDT) Date: Fri, 12 Jun 2015 15:49:50 +0200 Message-ID: Subject: Uberblock location From: Felipe Monteiro de Carvalho To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 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, 12 Jun 2015 13:49:51 -0000 Hello, I am writing a program to read ZFS partitions, and although I already read a lot of documentation, there is 1 problem which is blocking me: How does the driver find the uberblock? I know, I can just get any test volume, find the ZFS uberblock and in my case it is positioned in 0x20C00 and there are lots and lots of copies (older versions?) of it. But there is no guarantee that it doesn't just happen to be in this position in my image and in another version it would be elsewhere, so I need the algorithm utilized to find it. Any ideas? thanks, -- Felipe Monteiro de Carvalho