Date: Sun, 5 Jul 2015 17:03:04 +0000 From: Matt Churchyard <matt.churchyard@userve.net> To: Felipe Monteiro de Carvalho <felipemonteiro.carvalho@gmail.com> Cc: Julian Elischer <julian@freebsd.org>, "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: Re: Uberblock location Message-ID: <EE8AE79A-0D00-4070-AD29-F4B42F776AC7@userve.net> In-Reply-To: <CACyNnZNdOrH3j3fTBNPVo%2Bcoc0JxkMn%2BjL8wbBAhHUDtDD7Vgw@mail.gmail.com> References: <CACyNnZMu=Y77uKNji0KP2atDGbT7Hv0RqGFaPDe1noMODv1iMw@mail.gmail.com> <557B0255.8060809@freebsd.org> <01184F08-1C6B-4282-9203-1BF98F07A05A@gmail.com> <557C282D.8060809@freebsd.org> <CACyNnZOpawH=RLfP1cJqF58=dqiONNKoJ-DN4GLi9Jy=VnxZPA@mail.gmail.com> <5596B3CF.50703@freebsd.org>, <CACyNnZNdOrH3j3fTBNPVo%2Bcoc0JxkMn%2BjL8wbBAhHUDtDD7Vgw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 5 Jul 2015, at 16:24, Felipe Monteiro de Carvalho <felipemonteiro.carv= alho@gmail.com> wrote: >=20 >> On Fri, Jul 3, 2015 at 6:09 PM, Julian Elischer <julian@freebsd.org> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EE8AE79A-0D00-4070-AD29-F4B42F776AC7>