CentOS7, software RAID1 and encryption. How to recover some data
I have to ask for help because I do not dare destroy it.
I will not do anything with these disk anymore 'cos I'm too scared of destroying the data i need. I got 2 disks that was in a CentOS 7Linux software RAID1(mirror) system with my boot system and other partitions. On one of those extra partitions I got drivers that I need bad. Although it's CentOS the RAID1 and encryption should be equal with eg. Arch as this is not dependent of the architecture itself (right?) All the drives except boot and those needed for that are encrypted with a password that I know. I just replaced these drives with others and installed a fresh Rocky Linux system but I need drivers from these. As I've understood it a RAID1 system can be broken without damaging the data so it should be(?) possible to fix the data from one of these drives. As long I can get those drivers from one of these 2 disks, everything is mostly not important. Although it could be really great to look into some configs that are places in /etc as that also will help out a lot as those are system specific. As you see one partition got mounted(only from this disk) and asked for the encryption password and that worked, too bad it's not on this one. If I remember correctly it's on the md127 partition that has the drivers. If I try to mount the partitions that didn't automount(udiskie) I get this: Code:
┌─[basher52@ArchGamer]~ A long time ago when I had disk problems with windows someone told me to clone the partition in question and than work on that, if any error was done I can always use a copy of it. Is this a plausible here, just to be extra careful so to speak. Some info:... FDISK: Code:
Code:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS |
You said
Code:
All the drives except boot and those needed for that are encrypted with a password that I know. Raid 1 is mirroring, so it is simple to connect just one of each mirrored drive pair and activate the array. You did not say, but with raid 1 I would assume only 2 drives involved. If using raid 10 or raid 1 with 4 or more drives you would have a much different scenario. Once the array is activated then by knowing the password you should be able to open and mount the device and read the data needed. If I am correct that there are only 2 drives in the raid 1 array then connect the one drive and activate it. A quick search for "linux activate a raid 1 array with 1 drive" gave this as the first link. The instructions seem pretty clear. |
@computersavvy
Well something like that page and that, did the work, but i was scared ass * to trash it. Took me some hours, just to be sure to not to do anything wrong, as I've done before. Too bad you're not doing this daily so you know it when it's needed :P Thanks for the answer though. Had one little problem with this though and that was that the device's partition already was 'connected' to an md-device but it couldn't as I did this on anoither machine, but "mdadm stop" finally released it and made it all work. |
All times are GMT -5. The time now is 12:27 PM. |