首页 | 公司简介 | 数据恢复 | 备份服务 | 成功案例 | 技术中心 | 客户服务 | 服务报价 | 数据恢复软件 | 联系我们 | 北亚博客  
 
  北京总部: 4006-505-646
  天 津 部: 4006-505-646
  上 海 部: 4006-505-646
  深 圳 部: 4006-505-646
  广 州 部: 4006-505-646
  重 庆 部: 4006-505-646
  南 京 部: 4006-505-646
  其它地区: 4006-505-646
北亚数据恢复软件Windows专业版
三星手机数据恢复软件V1.0
北亚苹果手机数据恢复软件V2.0
北亚硬盘录像机数据恢复软件 V
北亚vmware虚拟机数据恢复软件
北亚照片数据恢复软件
北亚摄像机数据恢复软件 v2.1
北亚Sybase数据库修复软件 V2.
raid磁盘阵列应急方案
HP EVA4400/6400/8400/P6000
iphone 通讯录丢失如何恢复?
xen server 存储库(sr)损坏后
RAID6结构原理详解(北亚数据
AIX下删除LV后的现场保护和数
RAID损坏后 对数据的完整备份
您当前的位置:首页 >> 技术中心 >> 软件数据恢复文栏 >> 正文

The structure of the Reiser file system

It can often be read that reiserfs only records the file system meta data in its journal. This is not entirely correct. It is true, that purpose of the journaling is to ensure the integrity of the meta data. However, reiserfs journals entire disk blocks as they have to appear in the file system after the journal transaction is committed. Since directories, stat data and small files are stored directly in the leaf nodes of the tree, some amount of data is also contained in the journal and could be used to reconstruct earlier versions of a file or directory.

The journal layout

Journal Header

The journal header is a single block which describes where the first unflushed transaction can be found in the journal. The journal header is the last block of the journal. In our example the journal's first transaction starts at block 18 and there are 8192 journal blocks. Therefore. the journal header is at block 8210. There are only 12 bytes of information in the journal header. The rest of the block is undefined.

The journal header

Name Size Description
Last flush ID 4 The transaction ID of the last fully flushed transaction
Unflushed offset 4 The offset (in blocks) of the next transaction in the journal
Mount ID 4 The mount ID of the flushed transaction

The transaction pointed to by the offset must have a higher transaction ID or a higher mount ID than the flushed transaction in order to be considered an unflushed transaction. If this is not the case, all transactions are considered flushed and the block pointed to by the offset is used to start recording new journal transactions.

Example:

00000000 e2 74 02 00 24 1c 00 00 1d 01 00 00 12 00 00 00  ât..$...........

The journal header example

Last flush ID: 160994
Unflushed offset: 7204 blocks
Mount ID: 285

In this example, the first unflushed transaction can be found at block 7222 (since the journal starts at block 18). However, the block found there does not contain a transaction description (see below) and therefore there aren't any unflushed transactions for the partition.

Transactions

Transactions describe changes in the file system. Instead of directly modifying blocks in the file system tree, instead the new or changed blocks are first written into the journal and mapped to their real location in the file system.

A transaction consists of a transaction description block, a list of blocks, and a commit block at the end. All those blocks are contiguous within the journal.

The journal transaction layout

Description block

The description block contains the transaction and mount IDs, the number of blocks in the transaction, a magic number, and the first possible half of mappings.

The journal transaction layout

Name Size Description
Transaction ID 4 The transaction ID
Len 4 Length (in blocks) of the transaction
Mount ID 4 Mount ID of the transaction
Real blocks Block size - 24 Mapping for blocks in transaction
Magic 12 Magic number. Should be "ReIsErLB"

The "Real blocks" field is theoretically dependant on the block size. The first 12 bytes of the block have the IDs and the length, and the last 12 bytes contain the magic string. Everything in between is used for the block mapping. However, in the Linux 2.4.x implementation, the struct for a description block defines

本新闻共13页,当前在第09页  
01  02  03  04  05  06  07  08  09  10  
11  12  13  

上一篇:Solaris硬盘分区结构
下一篇:各类unix和linux管理员密码丢失解决方法
返回首页 | 联系我们 | 关于我们 | 招聘信息 | 友情链接 | 网站地图 | 合作伙伴
版权所有 北京北亚宸星科技有限公司
全国统一客服热线:4006-505-646
北京总部:北京市海淀区永丰基地丰慧中路7号新材料创业大厦B座205室
京ICP备09039053

籧dot/f