RAID1 recovery complications
Hi, LinuxQuestions.org! Let me start by saying that you've been a useful source of information for years. Always among the top search results, this forum has participated in countless solutions. I just want to say thank you for the expertise, patience, and diversity of content! This site has gotten me out of a pickle on more than one occasion. Thanks!)
Trying to recover data from an ext4 partition on a disk that was previously RAID1, specifically /home, without using external storage.
I am unable to mount the intended partition.
Fdisk shows them but /dev doesn't.
Xubuntu (during installation and now) showed only 1-10GB partition as well.
1. I'm lost. (I've worked on the issue, as time permitted, over the course of weeks (maybe months). Plus, I was half-asleep last night --and progressed to where I am now. I woke up to a working Xubuntu installation and vaguely remember inserting the cdrom. So, assume I don't recall anything more than what I've posted. If you want more information, my memory won't help. I will need to be told how to figure it out if it isn't a common command.
2. The last linux installation (which used the /home) was Bodhi linux, which I understand doesn't support RAID. (Yes, I'm confused by that.) I used the BIOS settings to configure RAID and I remember installation was bumpy (testing several bios configurations and using xubuntu to get the disk ready) but I can't account for my actions.
3. Installation of either dist has been a headache. Both insallation scripts (Bodhi & Xubuntu) reported mounted partitions when scanning the disks. Choosing the option to unmount failed in both installers, regardless of the BIOS settings.
This was apparently a working RAID1 system running Bodhi Linux a couple days ago. Originally, I believe I used mdadm on the live-Xubuntu, partitioned the drive, and then rebooted and installed Bodhi. Howeever, there were several installation attempts using various BIOS configurations. I don't know exactly what I did but trial'n'error got Bodhi running. Once I had a working Bodhi system, I do remember concluding is the fakeRAID but I didn't think Bodhi Linux supported it and don't know how to tell for certain. I thought maybe RAID support had been added in latest version. My current dilema started when I tried to re-install Bodhi again yesterday.
I am currently working in Xubuntu 12.04 as it was installed (in my sleep).
If I remember correctly, all RAID is disabled in the BIOS, but I still had problems during installation. Somehow I managed to screw things up so that (in the partition manager during installation, I could only see the first physical partition (10Gb) sda1 ("pdc_dhcjgfgdd1"), which is what I had been using for root. So, I installed Xubuntu's / there and decided to get SOMETHING running on the machine. Now that I've got a full linux running, I would like to figure out what I messed up, how to fix it, and understand the probem in case I use RAID again in the future.
mtab looks like RAID is being used...
I am unable to 'mount -t ext4 -o force /dev/sda6 /mnt/tmp' because my /dev contains:
'fdisk -l sda/sdb':
I would like to abandon the whole RAID thing, repartition one of the drives for /, swap, /home and the other as /backup-storage. That wouldn't be a problem for me, except the whole RAID issue is complicating matters.
Before a "/backup-storage" partition can be created, I want to salvage my previous home directory. (In fact, the only data I care to salvage is either sdx6 partition. My current / (Xubuntu) is expendable. )
It is practically as important to understand the problem as it is to resolve it. I have tinkered with the BIOS and attempted installation of two or three distributions with various settings and I'm pretty frustrated. If I come out of this with a more comprehensive understand of RAID in linux, it will have been worth it. URLS for RAID quickrref or tutorials would be apprecaited too.
Read it. Understand it. Turn all BIOS RAID (fakeraid) stuff off, turn AHCI mode on in BIOS (if you have it) and go mdraid.
I conclude my woes have been attributed to the fact that a livecd doesn't want to display a used raid partition as a valid installation target--a feature if you intend to preserve data on your drive--a lesson for anyone who is not accustomed to raid and wants to install a-new. I didn't realize that linux was viewing the RAID metatags and trying to not-mess-up my data for me.
If someone finds this thread in the future and you don't see partition numbers on your disks in /dev/....
'partx -l /dev/sdb' and 'partx-l /dev/sda' verfied the partitions are in tact on both of my drives.
'partx -a /dev/sdb' caused /dev/sdb6 to appear but I was unable to mount it or any other partitions; "busy"? Maybe this could be useful for someone reading this later though.
To solve the problem, I took one complication out of the equation: sdb. In this case, it can simply be removed. Yeah,--duh. :o Its mirroring! (The nap may have helped too.) I physically disconnected the second harddrive. (warning: If it were raid0 (or striping), this would mean further complication.) With fakeraid off in bios, that left me with a much less complicated situation... a hard drive, which used to be raid, that I need the data from partition #6.
To get the linux livecd to play nice (or 'mean', if you're the data on the drive), I just had to remove the RAID metatags:
'dmraid -E -r /dev/sda'
Then I proceeded as a routine single-harddrive installation. I was able to reinstall OS onto sda1 and had no issues mounting sda6 to recover my information.
From here, I imagine I can configure raid1 on sda then add sdb, and my data will mirror to the other drive or de-raid, repartition, and use sdb for more space. I'll decide later. If anyone has more detail, suggestions, or can explain why I was unable to mount partitions once they appeared in /dev, I will look for followups. I hope my experience is useful to someone in the future--good luck!
Emerson, thanks for the link. I am familiar with the concepts of hardware/firmware/software raid but that filled in a few gaps. It seems clear to me now that I'm using firmware/"fake"-raid but when I started the whole ordeal a few weeks ago, I didn't have a clue. Aside from looking-up the hardware involved, can you tell me how to determine if you're on hardware/firmware or software raid from a terminal?
It seemed that dmraid and my fakeraid setup may have been working cooperatively (before I tried to erase re-install on first partition) as dmraid is what I used to confirm I had a working raid1. When I started looking into configuring a soft-raid setup, I found raid already seemed to exist. So I rolled with it relying on whatever configuration the BIOS and installation created for me. I assumed dmraid automagically out-smarted the fakeraid. (After trading 'Documents and Settings' for '/home' more than a decade ago, I'm no longer surprised when linux makes user-friendly advancements.) I'm not sure what exactly happened but I would like to understand better.
I've never tried dmraid, thus I do not know how to handle it. To see your mdraid in terminal just do
To be completely honest, its been months since I've looked into this... but for the sake of follow-up...
If I remember correctly, the whole issue boiled down to a conflict between the motherboard and linux both attempting to handle RAID. It over-complicated everything and the technical term for the results is "silliness".
Remember, kids... disable RAID in your BIOS. Linux's "software RAID" does the job as effectively as some low-cost RAID solutions with the added benefit of more comprehensive control. Unless you spend the big-bucks on hardware RAID, you want to let your friendly linux take care of it. The cheap RAID systems are fooey.
|All times are GMT -5. The time now is 02:25 PM.|