Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-20-2009, 04:16 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 4

Rep: Reputation: 0
Question Mount raid device to recover data

So, we've been undergoing some problems with our server as of late, the most recent being faulty disks...

In a nutshell, our RAID 1 array was rendered broken and we were advised that core lib files were missing and the OS needed to be reloaded... a quote from our server host:

"The OS is not healthy. This server will need a reinstall.
Libs are missing."

This was after having replaced what we though was a faulty /dev/sdb.

So they reloaded the OS (Debian 5.0.2 x86_64) on 2 FRESH drives, and installed the old /dev/sda as /dev/sdc once the reload was completed.

Here's the output of /etc/fstab on the fresh install so we know what we're working with:
debian:/BAK# cat /etc/fstab
# /etc/fstab: static file system information.
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/md0        /               ext3    errors=remount-ro 0       1
/dev/md2        /home           ext3    defaults        0       2
/dev/md1        /tmp            ext3    defaults        0       2
/dev/sda3       none            swap    sw              0       0
/dev/sdb3       none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd0       /media/floppy0  auto    rw,user,noauto  0       0
Now, whether the OS actually needed to be reloaded or not isn't my concern at this stage, so I've skipped past the questioning of that. I do know, however, that /dev/sdc is readable and if I can figure out how, I can recover the needed files from it.

The thing I don't know how to do is mount /dev/sdc{2,3} in order to retrieve the needed files (yes, I have backups but we're talking 200+GB worth of files which would take ages to re-upload)

Here's the output of fdisk -l for /dev/sdc:
Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004dd94

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          13      104391   83  Linux
/dev/sdc2              14      117360   942589777+  fd  Linux raid autodetect
/dev/sdc3          117361      181356   514047870   fd  Linux raid autodetect
/dev/sdc4          181357      182401     8393962+   5  Extended
Here's the output of 'mdadm --examine --scan /dev/sdc2'
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=75537f93:26498f83:9866e678:b39dd5a2
and 'mdadm --examine --scan /dev/sdc3'
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=8b08e957:4a1fed49:e9ac3995:dd47625c
Ok, so at least I know the array is still defined, sweet. But, how do I mount it?

The one problem I see myself running into is /dev/md1 and /dev/md2 are currently in use by the new system, so I cannot mount it there.

Thanks for your time and help and please let me know if you need any further info.

I should also note, reloading the OS is a viable option if needed as we haven't started configuring the server yet. So if we need to reinstall the OS and assign the NEW RAID arrays to something other than /dev/md1 and /dev/md2 then we can do that; though I'd rather not have to wait another few hours for them to queue me up and complete this if I don't have to hehehe.

Last edited by Keldek; 08-20-2009 at 04:24 PM. Reason: more info
Old 08-20-2009, 04:51 PM   #2
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Have you tried just mounting the partition, for example:

mount /dev/sdc1 /mnt/<mount_point>

where <mount_point> would be a directory under /mnt

Being as this was a RAID1 array you should be able to just mount it. For example if you created a directory under /mnt called old_sdc1 and then used the following command:

mount /dev/sdc1 /mnt/old_sdc1

You should be able to:

cd /mnt/old_sdc1

to see the contents.


Old 08-20-2009, 04:56 PM   #3
LQ Newbie
Registered: Aug 2009
Posts: 4

Original Poster
Rep: Reputation: 0
No, when trying to mount /dev/sdc normally I get the following output:
mount: unknown filesystem type 'mdraid'
I think I've solved the problem though with 'mdadm --assemble /dev/md5 /dev/sdc2'.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot recover data, raid problem enid Linux - Hardware 2 06-26-2009 12:19 PM
Recover data from RAID 0 (fake RAID) from Win XP KiAnKo Linux - Hardware 4 04-23-2009 12:28 PM
recover data from raid 0 drives.... Peter_Karlsen Linux - Hardware 8 12-02-2008 01:12 PM
Restore RAID 0 and Recover data troskin Linux - Newbie 2 10-12-2007 03:50 PM
Software RAID to recover data from HW RAID ocschwar Linux - Hardware 5 02-25-2005 10:05 PM > Forums > Linux Forums > Linux - Server

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

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