{"id":12,"date":"2012-03-19T19:18:49","date_gmt":"2012-03-19T11:18:49","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=12"},"modified":"2012-03-19T19:18:49","modified_gmt":"2012-03-19T11:18:49","slug":"%e5%8a%a8%e6%80%81%e7%a3%81%e7%9b%98%20ldm%e7%bb%93%e6%9e%84","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/12.html","title":{"rendered":"\u52a8\u6001\u78c1\u76d8 LDM\u7ed3\u6784"},"content":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u52a8\u6001\u78c1\u76d8\u7684\u7ed3\u6784\u76f8\u5bf9\u666e\u901a\u5206\u533a\u8868\u4f1a\u6709\u4e9b\u590d\u6742\uff0c\u8fd9\u91cc\u8d34\u51faLDM\u7684\u7ed3\u6784\u4ee3\u7801\uff0c\u4ec5\u4f9b\u7f16\u7a0b\u7231\u597d\u8005\u53c2\u8003\uff0c\u5982\u679c\u5927\u5bb6\u60f3\u7ba1\u7406\u52a8\u6001\u78c1\u76d8\u63a8\u8350\u5927\u5bb6\u4f7f\u7528<a href=\"http:\/\/www.diskgenius.cn\/\" target=\"_blank\">DiskGenius<\/a>\u6765\u7ba1\u7406\u3002<\/p>\n<p><a id=\"ematt:2\" href=\"\/blog\/content\/uploadfile\/201203\/935c5ded1df7362feefdc461949cd53f20120319113212.gif\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" src=\"\/blog\/content\/uploadfile\/201203\/935c5ded1df7362feefdc461949cd53f20120319113212.gif\" width=\"635\" height=\"647\" \/><\/a><\/p>\n<p>&nbsp;<a id=\"ematt:2\" href=\"\/blog\/content\/uploadfile\/201203\/935c5ded1df7362feefdc461949cd53f20120319113212.gif\" target=\"_blank\"><\/a><\/p>\n<p><a id=\"ematt:1\" href=\"\/blog\/content\/uploadfile\/201203\/935c5ded1df7362feefdc461949cd53f20120319112759.gif\" target=\"_blank\"><\/a><\/p>\n<pre class=\"brush:cpp; toolbar: true; auto-links: true;\">struct privhead {\t\t\t\/* Offsets and sizes are in sectors. *\/\r\n\tu16\tver_major;\r\n\tu16\tver_minor;\r\n\tu64\tlogical_disk_start;\r\n\tu64\tlogical_disk_size;\r\n\tu64\tconfig_start;\r\n\tu64\tconfig_size;\r\n\tu8\tdisk_id[GUID_SIZE];\r\n};\r\n\r\nstruct tocblock {\t\t\t\/* We have exactly two bitmaps. *\/\r\n\tu8\tbitmap1_name[16];\r\n\tu64\tbitmap1_start;\r\n\tu64\tbitmap1_size;\r\n\tu8\tbitmap2_name[16];\r\n\tu64\tbitmap2_start;\r\n\tu64\tbitmap2_size;\r\n};\r\n\r\nstruct vmdb {\t\t\t\t\/* VMDB: The database header *\/\r\n\tu16\tver_major;\r\n\tu16\tver_minor;\r\n\tu32\tvblk_size;\r\n\tu32\tvblk_offset;\r\n\tu32\tlast_vblk_seq;\r\n};\r\n\r\nstruct vblk_comp {\t\t\t\/* VBLK Component *\/\r\n\tu8\tstate[16];\r\n\tu64\tparent_id;\r\n\tu8\ttype;\r\n\tu8\tchildren;\r\n\tu16\tchunksize;\r\n};\r\n\r\nstruct vblk_dgrp {\t\t\t\/* VBLK Disk Group *\/\r\n\tu8\tdisk_id[64];\r\n};\r\n\r\nstruct vblk_disk {\t\t\t\/* VBLK Disk *\/\r\n\tu8\tdisk_id[GUID_SIZE];\r\n\tu8\talt_name[128];\r\n};\r\n\r\nstruct vblk_part {\t\t\t\/* VBLK Partition *\/\r\n\tu64\tstart;\r\n\tu64\tsize;\t\t\t\/* start, size and vol_off in sectors *\/\r\n\tu64\tvolume_offset;\r\n\tu64\tparent_id;\r\n\tu64\tdisk_id;\r\n\tu8\tpartnum;\r\n};\r\n\r\nstruct vblk_volu {\t\t\t\/* VBLK Volume *\/\r\n\tu8\tvolume_type[16];\r\n\tu8\tvolume_state[16];\r\n\tu8\tguid[16];\r\n\tu8\tdrive_hint[4];\r\n\tu64\tsize;\r\n\tu8\tpartition_type;\r\n};\r\n\r\nstruct vblk_head {\t\t\t\/* VBLK standard header *\/\r\n\tu32 group;\r\n\tu16 rec;\r\n\tu16 nrec;\r\n};\r\n\r\nstruct vblk {\t\t\t\t\/* Generalised VBLK *\/\r\n\tu8\tname[64];\r\n\tu64\tobj_id;\r\n\tu32\tsequence;\r\n\tu8\tflags;\r\n\tu8\ttype;\r\n\tunion {\r\n\t\tstruct vblk_comp comp;\r\n\t\tstruct vblk_dgrp dgrp;\r\n\t\tstruct vblk_disk disk;\r\n\t\tstruct vblk_part part;\r\n\t\tstruct vblk_volu volu;\r\n\t} vblk;\r\n\tstruct list_head list;\r\n};\r\n\r\nstruct ldmdb {\t\t\t\t\/* Cache of the database *\/\r\n\tstruct privhead ph;\r\n\tstruct tocblock toc;\r\n\tstruct vmdb     vm;\r\n\tstruct list_head v_dgrp;\r\n\tstruct list_head v_disk;\r\n\tstruct list_head v_volu;\r\n\tstruct list_head v_comp;\r\n\tstruct list_head v_part;\r\n};<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u52a8\u6001\u78c1\u76d8\u7684\u7ed3\u6784\u76f8\u5bf9\u666e\u901a\u5206\u533a\u8868\u4f1a\u6709\u4e9b\u590d\u6742\uff0c\u8fd9\u91cc\u8d34\u51fa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[22,21,20,30],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-Technical_literature","tag-diskgenius","tag-ldm","tag-20","tag-30"],"views":2125,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}