On Mon, Mar 29, 2010 at 12:21:39PM +1100, Daniel Carosone wrote: > #1. Use xxd (or similar) to examine the contents of the raw disk > > This relies on knowing what to look for, and how that is aligned to > the start of the partition and to to metaslab addresses and offsets > that determine the writes we actually care about.
Ok, from looking at (what seems to a draft of..) the ZFS on disk format document: - There don't seem to be easily identified magic numbers until the uberblock replicas. Until then there's various kinds of reserved space, and an nvlist that doesn't seem to have an explicit marker. - The uberblocks start at 128k into each label, or 128k and 384k into the partition. - The uberblocks start with a magic number that should be easily identified. And, indeed, I can find them: 0420000: 0cb1ba00 00000000 16000000 00000000 ................ 0420400: 0cb1ba00 00000000 16000000 00000000 ................ 0420800: 0cb1ba00 00000000 16000000 00000000 ................ 0420c00: 0cb1ba00 00000000 16000000 00000000 ................ [...] 043f800: 0cb1ba00 00000000 16000000 00000000 ................ 043fc00: 0cb1ba00 00000000 16000000 00000000 ................ [...] 0460000: 0cb1ba00 00000000 16000000 00000000 ................ 0460400: 0cb1ba00 00000000 16000000 00000000 ................ 0460800: 0cb1ba00 00000000 16000000 00000000 ................ 0460c00: 0cb1ba00 00000000 16000000 00000000 ................ [...] 047f800: 0cb1ba00 00000000 16000000 00000000 ................ 047fc00: 0cb1ba00 00000000 16000000 00000000 ................ Alas, it also means I can't blame alignment issues for making this cruddy netbook SSD any slower; it's just this slow really. PS: It sure seems odd to use a 32-bit constant (0x00bab10c) as a magic for a 64-bit quantity, especially when stored in native byte order.. > As for the arithmetic.. [..] the alignment offset is between > start-of-partition and zfs data blocks, once various preamble header > sectors are allowed for. Data starts at 4M from the start of partition, so for all intents and purposes it keeps alignment with the partition. At granularities <=128k, it also keeps alignment with the first uberblock replicas. I expected as much but the confirmation is nice. -- Dan.
pgp1ZBWDmx0rm.pgp
Description: PGP signature
_______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss