Erm, sorry for that bit of a rant. After some fiddling with the hex editor I 
found out a bit more and am trying to be more specific... 

1) How are files laid out on disk, and encapsulated as objects? 
(Not clear from On Disk Specs or "datastructures_for_single_file.pdf") I guess 
I don't understand the way they are wrapped as objects on the disk.

2) Are there block groups or an equivalent? 

3) Are there extent pointers?
 
I've got a ZFS test image with a large text file (234,179 bytes) that is 
pleasantly contiguous. I wonder if there are no block groups at all... I 
can't see quite how it is encapsulated as an object, either, since it is 
larger than a 128kb block.

Any tips for reading re. code files would be appreciated.

Regards

Mark

On Monday 30 July 2007 20:51, Mark Furner (Mark Furner <mark.furner at 
gmx.net>) 
may have written:
> Hi
>
> Despite having done the RTFM with a Draft On Disk Specifications document,
> I'm still trying to get a picture of how ZFS gets laid out disk. It's
> rather too high-level and interested in explaining the abstractions to say
> much about where in the FS stuff gets put. The PDF file on data structures
> of a single file is a bit more helpful, but still is a bit abstract. What I
> want to know is how to reconstruct a ZFS pool from an image file as raw
> data, which byte goes where. It looks as if I'll have to write up a
> description myself.
>
> AFAIK, the first 4 MB of a ZFS file system is taken up with 2 vdev labels
> and 3.5 MB of unused space for future use. But what happens after that? I
> found what looks like the meta object set MOS right after the 4 MB
> boundary, and later on what looks like a copy of the MOS. (This alone seems
> to contradict the On Disk Specifications). When does the reserved space of
> the ZFS partition end and the user data begin? Are there block groups? Is
> the user-data also contained within dnodes? The On-Disk Specs explain
> znodes for file metadata, and it looks as objects have their own metadata
> stored in a dsl_dataset_phys_t structure. Where is the file data?
>
> Can you point me in the direction of the relevant code passages? Any help
> would save time with the hex editor...
>
> Thanks a lot
>
> Mark
>
> On Saturday 28 July 2007 00:35, Matthew Ahrens <Matthew.Ahrens at sun.com> may
>
> have written:
> > Mark Furner wrote:
> > > Thanks for the clarification, Darren, and sorry for cross-posting.
> > >
> > > OK, physical device -> pool -> file-system(s)
> > >
> > > Some questions:
> > >
> > > 1) zpool import allows options similar to zfs. Can I set the same or
> > > similar read-only (RO) options for the whole pool
> > > (noexec,nosuid,noatime,nodevices,ro)?
> >
> > "zpool import -o ro <pool>" -- see zpool(1m).
> >
> > --matt
>
> _______________________________________________
> zfs-code mailing list
> zfs-code at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-code

Reply via email to