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
