Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Alas, there is nothing to suggest that there was ever the start of a filesystem there, or anything else that I can recognize. It doesn't look like the result of something wiping that area either, so I don't know what else might have gone on to cause that.
"Migrate Selected Extent(s)" refers to moving all or part of an LV from one PV to another. That's not something you want to be fooling with when things are already broken. Now if you think that might have been something you did before when you were rearranging your storage, that might explain things, but would also greatly complicate recovery.
One final thing to try would be to run testdisk on just /dev/mapper/VolGroup00-LogVol02, tell it that there is no partition table, and let it try to find valid backup super blocks from the ext3 filesystem. It wouldn't have detected those when it was looking at just the one disk because it would see that the start of the filesystem couldn't have been on that disk. You'll need to start testdisk from the command line and include /dev/mapper/VolGroup00-LogVol02 as an argument. It won't show that as a candidate device otherwise.
Ok, I didn't pay attention to it, because the program warned about selecting "None", while defaulting to "Intel". Now started again with selection "None".
I notice the line at the very bottom of that screen, "EXT3 Large file Sparse superblock Backup superblock, 2000GB / 1863 GiB". That is very promising. You might be able to recover something by running "e2fsck /dev/mapper/VolGroup00-LogVol02", but you really should be doing that on an image of that LV written to another disk. The changes done by fsck will make the filesystem structure consistent, but that can be very much at the expense of the data. For example, you could end up with all of the files moved to lost+found with their original names lost and replaced by names derived from their inode numbers.
You can safely try e2fsck with the "-n" option just to see what it would do if allowed.
So is it worth running this analysis till completion?
I considered that option for e2fsck too when the SATA disk was outside of LVM, but this disk/partition is bigger than any other disk I have. I cannot fit the image anywhere.
I would let testdisk run, and see what it offers to do. I don't have any experience with testdisk recovering filesystems, but it supposedly has some capability in that regard.
If I were in your position, I'd be getting another 2TB disk to hold a copy rather than risking my data. But, that's up to you.
It looks like there is little point in letting testdisk run. I did a test by zeroing out the first 32MB of an 8GB filesystem, and testdisk just suggests running e2fsck to reconstruct the super block from a backup super block. With that much of the filesystem overwritten, the root directory was clobbered, and testdisk couldn't do much else. 32MB is what was in the overwritten segment on your small disk.
I did run e2fsck on that damaged filesystem, letting it fix all the problems it found, and it was able to recover all but the top-level directory. What had been "home/rnichols" was now "lost+found/#393217/rnichols". Below that, almost everything was still intact -- a few missing files, some files damaged, but most were OK. I did lose the original names (there was just one, "home") for everything in that top level directory.
I still don't recommend doing that without a backup copy.
I think I can live with the result of a fair recovery attempt, whatever the result is. I would just like to do it correctly.
How does the correct command look like? Shall I use just the LVM PV or shall I add one of the suggested backup super blocks?
I tried the -n option (but without -b) and seems there's a lot to fix. Eventually that test ended with a segmentation fault!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.