LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-18-2013, 05:44 PM   #1
MultiSith
LQ Newbie
 
Registered: Mar 2013
Posts: 19

Rep: Reputation: Disabled
RAID1 recovery complications


GREETING:
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!)


GOAL:
Trying to recover data from an ext4 partition on a disk that was previously RAID1, specifically /home, without using external storage.

PROBLEM:
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.

BACKGROUND:
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.

STATUS:
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...
Code:
/dev/mapper/pdc_dhcjgfgdd1 on / type ext4 (rw,errors=remount-ro)
...nothing else mounted (not even swap--I think I encountered a problem formatting it so I skipped swap as a temporary installation)

I am unable to 'mount -t ext4 -o force /dev/sda6 /mnt/tmp' because my /dev contains:
Code:
sda
sdb
dm-0
dm-1
mapper/pdc_dhcjgfgdd -> ../dm-0
mapper/pdc_dhcjgfgdd1 -> ../dm-1
disk/by-id/ata-LITE-ON_DVD_D_LH-16D1P -> ../../sr1
disk/by-id/ata-Maxtor_6Y080M0_Y2Q9L4QE -> ../../sdb
disk/by-id/ata-Maxtor_6Y080M0_Y2QA0AXE -> ../../sda
disk/by-id/dm-name-pdc_dhcjgfgdd -> ../../dm-0
disk/by-id/dm-name-pdc_dhcjgfgdd1 -> ../../dm-1
disk/by-id/dm-uuid-DMRAID-pdc_dhcjgfgdd -> ../../dm-0
disk/by-id/dm-uuid-part1-DMRAID-pdc_dhcjgfgdd -> ../../dm-1
disk/by-id/raid-pdc_dhcjgfgdd-part1 -> ../../dm-1
disk/by-id/scsi-SATA_Maxtor_6Y080M0_Y2Q9L4QE -> ../../sdb
disk/by-id/scsi-SATA_Maxtor_6Y080M0_Y2QA0AXE -> ../../sda
cat /proc/mdstat:
Code:
Personalities : 
unused devices: <none>
When using 'mdadm --assemble' or '--build' (and in my boot log), I am getting (as error output):
Code:
device-mapper: table: 252:2: linear: dm-linear: Device Lookup Failed
three times.

'fdisk -l sda/sdb':
Code:
Disk /dev/sda: 82.0 GB, 81964302336 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    19531775     9764864   83  Linux
/dev/sda2        19533822   160086015    70276097    5  Extended
/dev/sda5        19533824    29296639     4881408   82  Linux swap / Solaris
/dev/sda6        29298688   158201855    64451584   83  Linux
/dev/sda7       158203904   160086015      941056    b  W95 FAT32

Disk /dev/sdb: 82.0 GB, 81964302336 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    19531775     9764864   83  Linux
/dev/sdb2        19533822   158201855    69334017    5  Extended
/dev/sdb5        19533824    29296639     4881408   82  Linux swap / Solaris
/dev/sdb6        29298688   158201855    64451584   83  Linux
The data I am after is on sda6 or sdb6. I don't see a reason either wouldn't be in tact. With the exception of putting Xubuntu / on sda1, this partitioning scheme reflects the original: 10gb-root, 5gb-swap, and about 65mb /home. (sda7 is fat32 was created during installation and is empty)


PREFERRED SOLUTION:
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. )

EXTRA CREDIT:
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.

Last edited by MultiSith; 03-18-2013 at 05:45 PM. Reason: corrected [code] tag to B
 
Old 03-19-2013, 08:37 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
http://skrypuch.com/raid/

Read it. Understand it. Turn all BIOS RAID (fakeraid) stuff off, turn AHCI mode on in BIOS (if you have it) and go mdraid.
 
1 members found this post helpful.
Old 03-19-2013, 09:31 PM   #3
MultiSith
LQ Newbie
 
Registered: Mar 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
[solved]

The Cause
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.

Useful troubleshooting:
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.

Over-complicated.
To solve the problem, I took one complication out of the equation: sdb. In this case, it can simply be removed. Yeah,--duh. 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.

De-RAID1
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!
 
Old 03-19-2013, 10:21 PM   #4
MultiSith
LQ Newbie
 
Registered: Mar 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
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?

Quote:
Originally Posted by Emerson View Post
Turn all BIOS RAID (fakeraid) stuff off, turn AHCI mode on in BIOS (if you have it) and go mdraid.
Quote:
Originally Posted by MultiSith View Post
If I remember correctly, all RAID is disabled in the BIOS
After my original post, I immediately confirmed that RAID has been turned off in the BIOS settings but I'm certain I had originally been trying to use it. Fakeraid was surely part of the original cause as I never configured dmraid. I don't recall seeing AHCI in BIOS but I'll double-check.

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.
 
Old 03-20-2013, 05:48 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I've never tried dmraid, thus I do not know how to handle it. To see your mdraid in terminal just do
Code:
cat /proc/mdstat
 
1 members found this post helpful.
Old 06-17-2013, 12:37 PM   #6
MultiSith
LQ Newbie
 
Registered: Mar 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
input complications chymeira Programming 3 11-21-2010 07:35 PM
RAID1 array rebuild fails at 99.9% recovery apomatix Linux - Hardware 3 06-06-2008 06:30 AM
BCM43xx Complications pauldontknow Linux - Wireless Networking 1 03-06-2008 08:17 PM
raid1 - recovery after crash proNick Linux - Newbie 8 01-21-2008 04:37 PM
Software RAID1 Recovery Issues (SARGE) jimbo1954 Linux - Server 2 04-24-2007 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration