From owner-freebsd-fs@freebsd.org Sun Jul 5 17:11:26 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 6E5429476 for ; Sun, 5 Jul 2015 17:11:26 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from smtp-outbound.userve.net (smtp-outbound.userve.net [217.196.1.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.userve.net", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2269F10AD; Sun, 5 Jul 2015 17:11:25 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from owa.usd-group.com (owa.usd-group.com [217.196.1.2]) by smtp-outbound.userve.net (8.14.7/8.14.7) with ESMTP id t65H35Ac037357 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 5 Jul 2015 18:03:05 +0100 (BST) (envelope-from matt.churchyard@userve.net) Received: from SERVER.ad.usd-group.com (192.168.0.1) by SERVER.ad.usd-group.com (192.168.0.1) with Microsoft SMTP Server (TLS) id 15.0.847.32; Sun, 5 Jul 2015 18:03:05 +0100 Received: from SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9]) by SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9%12]) with mapi id 15.00.0847.030; Sun, 5 Jul 2015 18:03:04 +0100 From: Matt Churchyard To: Felipe Monteiro de Carvalho CC: Julian Elischer , "freebsd-fs@freebsd.org" Subject: Re: Uberblock location Thread-Topic: Uberblock location Thread-Index: AQHQpRa59Akg6O6pI0u8erEiljPWpp2o9yCAgAEoxoCAADWEgIAdrBmAgAH47YCAAxfrAIAALGFU Date: Sun, 5 Jul 2015 17:03:04 +0000 Message-ID: References: <557B0255.8060809@freebsd.org> <01184F08-1C6B-4282-9203-1BF98F07A05A@gmail.com> <557C282D.8060809@freebsd.org> <5596B3CF.50703@freebsd.org>, In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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, 05 Jul 2015 17:11:26 -0000 > On 5 Jul 2015, at 16:24, Felipe Monteiro de Carvalho wrote: >=20 >> On Fri, Jul 3, 2015 at 6:09 PM, Julian Elischer wro= te: >> which? the kernel code or the bootblock code? >> I believe the bootblock version /usr/src/sys/boot/zfs from woudl be easi= er >> to start with. >=20 > Yes, I'm basing in the bootblock code. >=20 >> define "path".. in a way that is OS independent and meaningful when runn= ing >> in a bios environment (bootblocks). >=20 > Yes, its not meaningful for the boot, but my point was not that the > boot code doesn't handle the info, but instead that the partition does > not contain this info, which would be very useful for a user program. >=20 > Surely the zfs pool handling tools must store this info somewhere > (probably somewhere in /etc) if the partition itself doesn't contain > it. All the information is on disk. There's a cache of imported pool config on = the system but it's not required. Each disk stores the details, including d= evice path, for each disk in the same vdev. If you'd created a mirror, both= disks would have the details for each other. As a stripe, you have 2 vdevs= , each only containing their own config. All vdevs do know the total number= of vdevs though. So if an entire vdev is missing, ZFS knows it's missing,= but can't tell the disks involved. I assume you're aware of 'zdb -l device', which outputs exactly what ZFS co= nfig is stored in the label on a disk. Your code is already outputting this= information, but the zdb command is useful to neatly display exactly what = is on each disk. >=20 >> i should be from the base of the partition containing the filesystem but= I >> feel you are >> probably already doing this of you probably wouldn't have got this far. >=20 > Yes, I meant partition start. >=20 > Anyway, I think I figured out myself, it looks like that the offsets > are relative to VDEV_LABEL_START_SIZE >=20 > thanks, > --=20 > Felipe Monteiro de Carvalho > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"