How to add undelete capabilities to an ext3 file system

Claudiu Perta claudiu.perta at gmail.com
Wed May 6 07:33:06 UTC 2009


Hi,
We are two students in computer science and we are working on adding 
undelete capabilities to the ext3 file system.

In our current solution, we modified the ext3 kernel module and used the 
EXT2_UNDEL_DIR_INO reserved inode. Basically, whenever we remove a 
file/directory, we first save a copy of the inode along with the 
complete path of the file/directory to remove; then we delete the inode 
but not the data blocks of the file.  This way it is possible to restore 
a previously deleted file to its original position in the file system.

We handle deleted files with a FIFO-based policy. The dimension of the 
FIFO queue is defined by the user, when the file system is created.

To avoid having on the FIFO queue too many  temporary files, a user 
defined filter is applied before saving the inode and the path of a 
deleted file. The filter consists of pairs (directory name, file 
extensions) which can be added/deleted on-line by the user (we are using 
ioctl() to communicate between kernel and user space). All these 
information are kept on a file accessed via EXT2_UNDEL_DIR_INO inode; 
this file is non linked to the root directory, so it is not visible to 
the user.

We would like to know what you think about this solution and if there is 
a better approach to address this problem.

Thanks,

Antonio Davoli & Claudiu Perta




More information about the Ext3-users mailing list