a. Ext2fs
1.The Second Extended File System (Ext2fs) was designed
by Remy Card and Wayne Davison. It was
implementedby Remy Card and was further enhanced by Stephen Tweedie and
Theodore Ts'o.
2. Ext2fs
is an extensible and powerful file system for Linux. It is the most successful
file system so far in the Linux
community.
3. Extfs
was mostly based on the original Minixfs code and implementation. However
it removed the original 64MB
limit on partitions and increased the file size name to 255 characters.
4. The
ext2fs file system has not only the advantages of extfs but also provides
a better space allocation management,
allows the use of special flags for file management, the use of access
control lists and is extensible.
b. Why Undelete?
1.If
a user deletes a file (whose undelete attribute is set) accidentally or
if he deletes it and then changes his mind, he
can recover back his valuable data using undelete.
2. Let
us compare undelete to a tape back up system if one is in place.
3. A
tape back up system usually backs up the system at midnight and so any
information added that day cannot be
recovered. If all work has been done the same day then the tape back up
system cannot help at all.
4. Even
if a user can obtain all or part of his erased information from the backup
system, it requires some time
and effort on the part of the system personnel to recover the data. These
services may not be immediately available
to the user and he may need the information right away.
5. So the undelete command can be of invaluable help to a user.
II. Undelete in Linux
a. Currently the undelete flag in Unix can be accessed in Unix using the
chattr and the lsattr commands.
b. The
chattr command can be used to change the a file(s) extended attributes.
This command can manipulate among
other attributes the attribute 'u' for file undeletion.
c. The
lsattr command can be used to list a file(s) extended attributes.
d. As
the man page for the chattr command puts it : When a file with the 'u'
attribute set is deleted, its contents
are saved. This allows the user to ask for its undeletion.
e. This
is exactly what we plan to do in this project this semester, provide the
undelete feature in the ext2 file system.
III. Project Design
a. What we’ll do?
1. This implementation will use the undelete inode. This inode
is the reserved inode # 6. This inode can’t have links
to it except itself, so it will not be connected to anything in the filesystem.
In this way this directory will be
hidden from the rest of the system.
2. We need to create a system call named "lsdel" that bring the
list of the files already deleted that is in the
undelete directory (inode 6).
3. We also need another system call named "undelete".
This call brings a file already deleted to the "real world".
This means that the user can recover the file that was deleted.
b. Bottlenecks
1. After some research we discovered that the undelete
directory (inode 6) wasn’t implemented in the extended
two filesystem. So we have to create it.
2. We have to implement a special utility to check
the user’s permissions before he can see the deleted files in the
directory, so he can’t access files that don’t belongs to him.
3. If the undelete directory is not periodically
cleaned, it will eventually fill up. Therefore, we need a way of
determining when files should be deleted from the undelete directory.
c. Division
of labor
1. Given to the nature of this project, we can’t
assign specific parts of it to the group members. Therefore, we
have to work together. No one can do anything without the knowledge of
the others. Otherwise, we would
create pandemonium.