º¹±¸ÇÒ ÈÀÏÀÌ 12 ºí·°º¸´Ù ±æÁö ¾Ê´Ù¸é ÀÌ ¸ðµç ÀÚ·áÀÇ ºí·° ¹øÈ£´Â inode ¿¡ ÀúÀåµÇ¾î ÀÖ´Ù. ÀÌ´Â 'stat' ¸í·ÉÀ¸·Î Áï½Ã inode ¸¦ Ãâ·ÂÇØ ÀÐÀ» ¼ö ÀÖÁö¸¸, 'fsgrab'¸¦ »ç¿ëÇÏ¸é ´õ ½±°Ô ÇÒ¼ö ÀÖ´Ù. 8Àå¿¡¼ ºÃ´ø ¿¹¸¦ ´Ù½Ã º¸ÀÚ.
debugfs: stat <148003> Inode: 148003 Type: regular Mode: 0644 Flags: 0x0 Version: 1 User: 503 Group: 100 Size: 6065 File ACL: 0 Directory ACL: 0 Links: 0 Blockcount: 12 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996 atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996 mtime: 0x313bf4d7 -- Tue Mar 5 08:01:27 1996 dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996 BLOCKS: 594810 594811 594814 594815 594816 594817 TOTAL: 6
# fsgrab -c 2 -s 594810 /dev/hda5 > recovered.001 # fsgrab -c 4 -s 594817 /dev/hda5 >> recovered.001
³¡ºÎºÐÀÇ 'recovered.001'´Â ÇÊ¿ä ¾øÀ» ¼öµµ ÀÖÁö¸¸ º°·Î Áß¿äÄ¡ ¾Ê´Ù. ¹°·Ð Çϳª ¶Ç´Â ±× ÀÌ»óÀÇ °ü·ÃµÈ ºí·°µéÀÌ µ¤¿© ¾²¿´À» °¡´É¼ºµµ ÀÖ´Ù. ¸¸¾à ±×·¸´Ù¸é ¿îÀÌ ¾ø´Â °ÍÀÌ´Ï ±× ºí·°¿¡ ´ëÇؼ± ÀØ¾î ¹ö·Á¶ó.
¹®Á¦´Â ÈÀÏÀÌ 12 ºí·°º¸´Ù ±æ¶§ ³ªÅ¸³´Ù. À̶§´Â À¯´Ð½º ÈÀϽýºÅÛ¿¡ ´ëÇØ ¾à°£Àº ¾Ë°í ÀÖ¾î¾ß ÇÑ´Ù. ÈÀÏÀÇ ÀÚ·á´Â 'block' À̶ó ºÒ¸®´Â ÁýÇÕü¿¡ ÀúÀåµÈ´Ù. ±×¸®°í ÀÌ ºí·°µéÀº ¼øÂ÷ÀûÀ¸·Î ¹øÈ£°¡ ¸Å°ÜÁ® ÀÖ´Ù. ¶ÇÇÑ ÈÀÏ¿¡´Â ¼ÒÀ¯ÀÚ, Æ۹̼Ç, Á¾·ùµîÀÇ Á¤º¸°¡ º¸°üµÇ¾î ÀÖ´Â 'inode' ¶ó´Â °ÍÀÌ ÀÖ´Ù. ÀÌ·¯ÇÑ ºí·°°ú inode´Â ¼øÂ÷ÀûÀ¸·Î ¹øÈ£°¡ ¸Å°ÜÁ® ÀÖ°í ´Ù¸¥ ¼ø¼¸¦ °®´Â´Ù. ±×¸®°í µð·ºÅ丮´Â ÈÀÏ À̸§°ú inode ¹øÈ£·Î ±¸¼º µÈ´Ù.
ÆÛ¹Ì¼Ç Á¤º¸ µîµî°ú ¸¶Âù°¡Áö·Î inode ¶ÇÇÑ ÈÀÏ µ¥ÀÌÅÍÀÇ À§Ä¡¸¦ º¸À¯ÇÑ´Ù. óÀ½ 12 µ¥ÀÌÅÍ ºí·°Àº inode ±× ÀÚü¿¡ ÀúÀåµÇ´Âµ¥ À̸¦ direct blocks¶ó ÇÑ´Ù. ±×·¯°í ³ª¸é inode ´Â 'indirect blocks'À» Æ÷ÇÔ Çϴµ¥ ¿©±â¼ ºí·°Àº ºÎ°¡ÀûÀÎ direct blocks ¹øÈ£¸¦ Æ÷ÇÔÇÑ´Ù. ¶ÇÇÑ inode´Â indirect blocks ¹øÈ£ ¸ñ·ÏÀ» Æ÷ÇÔÇÑ µÎ¹èÀÇ indirect blocks ¹øÈ£¸¦ °¡Áö°í, ¶Ç À̸¦ Æ÷ÇÔÇÑ ¸ñ·ÏÀ» °¡Áø ¼¼¹èÀÇ indirect blocksÀ» °¡Áø´Ù.
´Ù½Ã ÀоÀÚ : ÀÌ´Â º¹ÀâÇÏÁö¸¸ Áß¿äÇÏ´Ù. ÀÚ, ºÒÇàÇÏ°Ôµµ ÃÖ±ÙÀÇ Ä¿³Î ¼öÇàÀº ÈÀÏ deletionÀÇ ¸ðµç indirect blocks ÀÌ 0ÀÌ´Ù.±×·¡¼ 12ºí·° º¸´Ù ±ä ÈÀÏÀ̶ó¸é ÇÊ¿äÇÑ ¸ðµç ºí·°ÀÇ ¹øÈ£¸¦ ¹ß°ßÇÒ ¼ö ÀÖ´Ù´Â°Í Á¶Â÷ º¸ÁõÇÒ ¼ö ¾ø´Ù. ±×·¯ÇÑ °ÍÀ» ¾Ë¾Æ³¾ À¯ÀÏÇÑ ¹æ¹ýÀº ±× ÈÀϵéÀÌ Á¶°¢³ªÁö ¾Ê¾Ò´Ù°í °¡Á¤ ÇÏ´Â °ÍÀÌ´Ù. ¸¸¾à »ê»ê Á¶°¢ÀÌ ³µ´Ù¸é ¹®Á¦°¡ ÀÖ´Ù. ÈÀÏ¿¡ indirect block ÀÌ ÇÊ¿äÇÏ´Ù¸é Á¶°¢³ªÁö ¾ÊÀº °ÍµéÀº ´ÙÀ½°ú °°ÀÌ ³ªÅ¸³´Ù.
#Blocks Contents 12 Data (direct blocks) 1 Indirect block 256 Data (blocks in the indirect block) 1 Doubly indirect block [1 Indirect block of the doubly indirect block 256 Data ] (256 times -- one for each indirect block in the doubly indirect) 1 Triply indirect block [[1 Doubly indirect block 256 Data ] (256 times -- one for each indirect block in the doubly indirect block of the triply indirect block) ] (256 times -- one for each doubly indirect block in the triply indirect block)
¿©·¯ºÐÀÇ ºí·° Å©±â´Â ¸ðµÎ 1024 bytes ÀÌ°í À̴ ǥÁØ°ªÀÌ´Ù. ºí·°ÀÌ À̺¸´Ù Å©´Ù¸é ¾à°£ÀÇ ¹øÈ£µéÀÌ ¹Ù²î¾î ³ªÅ¸³´Ù. Ưº°È÷: °¢ ºí·° ¹øÈ£°¡ 4 bytes µô´Ù¸é blocksize/4 ´Â °¢°¢ÀÇ indirect block ¿¡ ÀúÀåµÇ´Â ºí·° ¹øÈ£ÀÌ´Ù. ±×·¡¼ ¸Å¹ø ¸ñÂ÷¿¡ ³ªÅ¸³ª´Â 256 À̶ó´Â ¹øÈ£¸¦ blocksize/4 ·Î ¹Ù²Ù´Â °ÍÀÌ´Ù.