首页 | 公司简介 | 数据恢复 | 成功案例 | 技术中心 | 客户服务 | 服务报价 | 联系我们 | 技术论坛  
 
  北京总部: 4006-505-808
  上 海 部: 021-58358765
  深 圳 部: 0755-83692929
  浙 江 部: 13666673722
  广 州 部: 020-83821091
  重 庆 部: 023-86870422
  福 建 部: 0591-83300680
  哈尔滨部: 13946167430
  其它地区: 4006-505-808

中国石油管理局-Oracle数据库恢
工商银行山东分行-AIX删除LV数
濮阳市地方税务局-CHKDSK后数据
台湾HD公司-FreeBSD Nas无法启
promise乔鼎硬盘阵列数据恢复成
IBM EXP300 磁盘阵列数据恢复成
NAS 8100无法挂载数据卷
Liteon-Dell 2850服务器数据恢

RAID损坏后 对数据的完整备份
LINUX FSCK数据出错灾难应急方
误删除、误格式化数据灾难应急
误GHOST、误一键恢复灾难应急方
磁盘未被格式化,是否格式化数据
raid磁盘阵列OFFLINE后的应急方
硬盘出现异响应急处理
您当前的位置:首页 >> 技术中心 >> 软件数据恢复文栏 >> 正文

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管理员密码丢失解决方法
返回首页 | 联系我们 | 关于我们 | 招聘信息 | 友情链接 | 网站地图 | 合作伙伴

版权所有 北京北亚数据恢复中心
24小时免费咨询电话:4006-505-808 或 800-810-5880
中关村部:北京市海淀区中关村大街11号E世界A座832B室
皂君庙部:北京市海淀区学院南路68号吉安大厦C座(汇智楼)528室
京ICP备07502730