lzjb compression in ZFS


 
Thread Tools Search this Thread
Operating Systems Solaris lzjb compression in ZFS
# 1  
Old 11-23-2009
lzjb compression in ZFS

Hi all,

I am working on a project based on ZFS. The aim of this project is to read the raw data on disk for data recovery purpose. I started by reading the ZFS documentation of Sun Solaris. I somehow reached UBERBLOCK array of first partiton, and now as given in the document I am reading the block pointers and trying to reach the meta object set. I am getting some structure after I read the Block pointers offset in UBERBLOCK and doing some calculation on that, but I am not sure of the structure. I Want to know about the exact calculations required to reach meta object set and reading the compressed bytes of meta object set. Thanks in advance.
# 2  
Old 11-23-2009
The best place to look would be ZFS source code like:
Cross Reference: /onnv/onnv-gate/usr/src/uts/common/fs/zfs/lzjb.c
By the way, latest OpenSolaris code includes a new zpool feature (ueberblock rollback) that allows recovery in many corruption situations.
http://arc.opensolaris.org/caselog/P..._timothy.haley
# 3  
Old 11-23-2009
Hi,

Thanks a lot for your reply. Actually I want to traverse the hard disk to retrieve the raw data and so I am going through Uberblock block pointers. I have been through the site u have given, but unable to get the clear idea as how to read bytes from Meta Object Set and how to decompress the bytes to reach the dnode array for data.
# 4  
Old 11-23-2009
Although partially outdated, this is the best document describing how to access data on ZFS:
Welcome to OpenSolaris.org (Main.WebHome) - XWiki
# 5  
Old 11-24-2009
Hi,

I have visited the site which u gave, but dit not get any kind of information.

---------- Post updated 11-24-09 at 12:12 AM ---------- Previous update was 11-23-09 at 11:54 PM ----------

Hi,

I want to know how to reach meta object set from UBERBLOCk. I mean what calulation are required to be done on block pointers we get in UBERBLOCK.
# 6  
Old 11-24-2009
Quote:
Originally Posted by sushma pawar
I have visited the site which u gave, but dit not get any kind of information.
This is quite an overstatement. Anyway, here are other documents that will help you understanding ZFS internals:
http://www.osdevcon.org/2009/slides/..._uli_graef.pdf
http://www.eecs.harvard.edu/cs261/papers/beebe09.pdf
http://www.bruningsystems.com/osdevcon_draft3.pdf
Quote:
I want to know how to reach meta object set from UBERBLOCk. I mean what calulation are required to be done on block pointers we get in UBERBLOCK.
If you still fail to find an answer to that question with the help of the previous documents and despite having the source code available, I'm afraid you'd rather give up and switch to a simpler project.
# 7  
Old 11-24-2009
Hi,

I understood the concept very well, I have already been through all this documents. The major hindrance is compression, as given in document the meta object set is compressed and the first byte of the meta object set is always "type", but the sector where I am reaching is having a structure with first byte as 00 (DMU_OT_NONE) which means "unallocated object". I have verified the structure through all the UBERBLOCK, but I am getting the same type of structure at different sectors.As per the document the structure should always contain block pointers, but I am not getting any sort of pointers, may be this dnode is compressed. Attached is the jpg of the sector where I am reaching through UBERBLOCK's block pointers. I want to know if this the right sector, and if YES how to reach the next level dnode through this sector.
[IMG]file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg[/IMG]
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Linux

Best Compression technique ?

Hi all, I am working on a sample backup code, where i read the files per 7200 bytes and send it to server. Before sending to server, i compress each 7200 bytes using zlib compression algorithm using dictionary max length of 1.5 MB . I find zlib is slow. Can anyone recommend me a... (3 Replies)
Discussion started by: selvarajvss
3 Replies

2. Shell Programming and Scripting

file compression

I'am looking for script (or tool) that would compress all files with given extension in all subdirectory. Important part is that every one file have to end in separate archive whit it's own name. Eaven if I could point multiple file in one directory and compress them it would be ok. I' am... (1 Reply)
Discussion started by: Demerzel
1 Replies

3. Shell Programming and Scripting

Folder compression

Hi Guys, totally new to scripting. I have a huge list of foleders. I want to tar the contents of each folder inside the same folder and the name of the tar file is the same name as the folder. how would I go about this in scirpt? cheers Viper (3 Replies)
Discussion started by: brownviper1966
3 Replies

4. AIX

Tape compression

Hello everyone I want to use compression in my tape when I backup some file. For example I have several files that use 50gb. If I backup this I need to use two cartridge because without compression I can backup 36gb. My question is with flag I need to use to compress and I can use 72gb in... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

5. Shell Programming and Scripting

How to avoid CR after compression

Hi all, I am having few files which needs to be concted into a single file and then it is compressed and FTPed from the UNIX server to the Windows server. For the above purpose i am using gzip command to compress the files after concetenation. And i am FTP ing the compressed file in the... (3 Replies)
Discussion started by: Codesearcher
3 Replies

6. UNIX for Dummies Questions & Answers

Un-compression types...

Hi Folks, As I am familiar wih both types compresion forms: gun-zip and .rpm. My questions is how do I uncompress gunz.zip type? As the .rpm I can double click and it will extract...Can someone shed some light on this and thank you... M (2 Replies)
Discussion started by: Mombo_Z
2 Replies

7. UNIX for Dummies Questions & Answers

.z file compression

Hello, I have a .z file which i understand to be UNIX. I'm on PC (no UNIX boxes) and have tried many different unzipping programs to extract this .z file, but only PicoZip has allowed me to view what is inside (telling me, i think, that it's not corrupt), but i have not been able to extract... (3 Replies)
Discussion started by: Gonecat
3 Replies

8. UNIX for Dummies Questions & Answers

file compression

Is it possible to unzip / compress a file that was zipped using WinZip? thanks, kristy (2 Replies)
Discussion started by: kristy
2 Replies
Login or Register to Ask a Question