Hi Ben, Ben Rockwood пишет: > Is there some hidden way to coax zdb into not just displaying data > based on a given DVA but rather to dump it in raw usable form? > > I've got a pool with large amounts of corruption. Several > directories are toast and I get "I/O Error" when trying to enter or > read the directory... however I can read the directory and files > using ZDB, if I could just dump it in a raw format I could do > recovery that way. > > To be clear, I've already recovered from the situation, this is > purely an academic "can I do it" exercise for the sake of learning. > > If ZDB can't do it, I'd assume I'd have to write some code to read > based on DVA. Maybe I could write a little tool for it.
zdb -R can read raw data blocks from the pool if flag 'r' is used, so if you can identify list of a blocks comprising some file, you can feed it to zdb -R. See comments in zdb source (before zdb_read_block()) for exact syntax. Wbr, Victor _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss