Steps in Recovering Deleted Files in ReiserFS Partition

Asked By 40 points N/A Posted on -
qa-featured

Hi,

I want to get back suddenly deleted file in reiserfs. Is it possible? If yes, how can I undelete files in reiserfs? Please, tell me in details.

Thanks

SHARE
Answered By 0 points N/A #152443

Steps in Recovering Deleted Files in ReiserFS Partition

qa-featured

You can try the following solution for accidentally deleted files. But don't use these steps for normal filesystem inconsistencies.
– As you think that you have lost data, do not do anything else on that partition, here you may do data to be overwritten by new data.
– Unmount that partition using like :
umount /home
– Now you have to find out the actual device this partition refers to. You can get this information using the file /etc/fstab. We will assume that here device is /dev/hda3.
– Now run the following command :
reiserfsck –rebuild-tree -s -l /root/recovery.log /dev/hda3

After the above command finishes, it can take long time for a big partition to finish, now you can check at the logfile /root/recovery.log
– Mount your partition using :
mount /home
– Now look at the lost+found directory in root of partition. In this case it can be :
/home/lost+found
– This directory contains all the files that could be recovered. Because, the filenames are not preserved for a lot of files. You will find some sub-directories – filenames within those are preserved.
– Look through the files and copy back what you need.

Answered By 590495 points N/A #330609

Steps in Recovering Deleted Files in ReiserFS Partition

qa-featured

“ReiserFS” is a journaled, general-purpose file system originally designed and implemented by a team at Namesys headed by Hans Reiser. This file system is currently supported on Linux but without quota support licensed as GPLv2. Unlike Ext2, Ext3, and FAT32 file systems, the ReiserFS file system does not have an undelete utility.

Note: when you accidentally deleted a file, don’t do anything else on that partition because you may cause that data to be overwritten by new data. To protect the data from getting overwritten, you need to unmount that partition. For example, run the command:

umount /home

Next, you need to find out what actual device this partition refers to. You can usually get this information from “/etc/fstab.” For example, the device is without quotes “/dev/hda3,” you can run the following command:

reiserfsck –rebuild-tree -S -l /root/recovery.log /dev/hda3

You need to be root to do this. When the command is finished, you can check the log file in “/root/recovery.log” if you need more information. After this, mount the partition again with this command:

mount /home

Now, look for the “lost+found” directory in the root of the partition. This directory contains all the files that can be recovered. Unfortunately, this doesn’t preserve the filenames for most files. Look for your files and copy back what you need. If you need more help, go to ReiserFS undelete/data recovery HOWTO.

Related Questions