Linux Lite Forums

General => Off Topic => Topic started by: minesheep on January 03, 2020, 06:43:20 AM

Title: Data recovery : most important areas of Ext4 filesystem
Post by: minesheep on January 03, 2020, 06:43:20 AM
Faulty drive tried cloning, but didn't work. Where is the critical data for ext4 fs are stored? my drive size is exactly 31,406,948,352 bytes. Only first 512mibibytes seems not to be enough. No partition table just ext4 directly on the drive. The drive is filled with raw music without any headers. So photorec won't work. the drive is detected only untill I try to copy a lot of data (1gb+) off. Copying 512mb at time and connecting them to about 32gb image didn't work. Since I am doing this for personal use only even partitial recovery would be ok. Tried to open the whole image with audacity but the music jumps between multiple files because of lack of filesystem to manage the data. So I can copy data off the drive but getting all data the filesystem needs is my target now.
Title: Re: Data recovery : most important areas of Ext4 filesystem
Post by: minesheep on January 10, 2020, 06:35:16 AM
Tried cloning one 10gb file at 512mb at time
Code: [Select]
dd if=myimportantfile.raw of=/media/veracrypt1/part(x) bs=512M count=1 skip=x-1 where x is the part number when copying. when bs*count (512M*1) is the amount of data at one time. Got 17 full parts and 18 is only partitial. When using
Code: [Select]
dd if=myimportantfile.raw of=/media/veracrypt1/part19 bs=512M count=1 skip=18 that means reading file mibibytes 9216-9728 (yes they should exist), I get "dd: error reading 'myfile.raw': Input/output error". I get the same error also reding part20 = mibibytes 9728-10241 of the file. As said earlier this is still 90% recovery and is enough. So 9gb of 10gb recovered from the most important file
Title: Re: Data recovery : most important areas of Ext4 filesystem
Post by: supergamer on January 10, 2020, 07:49:25 AM
Have you tried to repair the file system with fsck. I have recovered some data before using it. Just an idea and it may or may not fix your issue.


https://www.tecmint.com/fsck-repair-file-system-errors-in-linux/ (https://www.tecmint.com/fsck-repair-file-system-errors-in-linux/)
Title: Re: Data recovery : most important areas of Ext4 filesystem
Post by: minesheep on January 11, 2020, 02:43:15 AM
In my case it was not filesystem damage because
Code: [Select]
sudo dd if=/dev/sdx of=/dev/null failed also. When i overwrote the data I got the drive working again. Same had also happened to my hdd that was unused few years I also fixed the hdd by overwrting it.It is called  data rot. Now I have working flash drive and almost all of my data. Since it was only raw music 90% data means 90% recovered audio.
Title: Re: Data recovery : most important areas of Ext4 filesystem
Post by: minesheep on January 19, 2020, 04:25:37 AM
I did f3write and then kept the drive hot for about 16hours and cold for 3 hours. After after that f3read succeed. So I still have working drive. I will never know the exact problem. Drive fixed with simple overwrite with random data with dd. after that it no longer disappeared when reading data, even whole drive. Drive size is still the same.