LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-08-2011, 02:43 PM   #1
ken_ken_ken
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
get data off a RAID partition - rescue from server crash


Hi. I need help.
first, I am very inexperienced, so experts beware.

I have a snyology server. I have installed all my drives as single drives (no RAID), but the new DSM still built a RAID-1 anyway for the drive, which obviously doesn't have a mirror. If you need, I can find out what they actually call it.

My volume 3 = drive 3 (2TB disk) was recently installed and crashed. I have removed it and have been trying to open the data partition through UBUNTU. So far I can see that the RAID is recognized by their 'Disk Utility' tool, but says 'not running, partially assembled'. I have installed mdadm and have looked around. I want to read my data out, copy it to another disk, and then I will re-install the drive to the server clean.

I dont really understand enough to do anything senseful.But here are a few things that I have found out so far:

ken@ubuntu:~$ mdadm -D /dev/md127
mdadm: must be super-user to perform this action
ken@ubuntu:~$ sudo mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Mon Sep 19 14:53:19 2011
Raid Level : raid1
Used Dev Size : 1950362048 (1860.01 GiB 1997.17 GB)
Raid Devices : 1
Total Devices : 1
Persistence : Superblock is persistent

Update Time : Thu Oct 6 14:37:06 2011
State : active, FAILED, Not Started
Active Devices : 0
Working Devices : 1
Failed Devices : 0
Spare Devices : 1

Number Major Minor RaidDevice State
0 0 0 0 removed

0 8 21 - spare /dev/sdb5

ken@ubuntu:~$ sudo mdadm --examine /dev/sdb5 | egrep 'dev|Update|Role|State|Chunk Size'
[sudo] password for ken:
/dev/sdb5:
State : clean
Update Time : Thu Oct 6 14:37:06 2011
Device Role : Active device 32768
Array State : . ('A' == active, '.' == missing)

ken@ubuntu:~$ sudo fsck -v -n -f -b 2654208 /dev/sdb5 **
[sudo] password for ken:
fsck from util-linux-ng 2.17.2
fsck: fsck.linux_raid_member: not found
fsck: Error 2 while executing fsck.linux_raid_member for /dev/sdb5

Remember, I only want to get my data off - but so far I havent find the best way.

Best,
ken
 
Old 10-10-2011, 02:08 AM   #2
kasl33
Member
 
Registered: Oct 2004
Location: Bremerton, WA
Distribution: Arch, Debian, Ubuntu, Ubuntu-Server, CentOS, OSX Lion
Posts: 352

Rep: Reputation: 47
Wow, for an "inexperienced" user, you did an EXCELLENT job in getting information about the disks.

That said, is Ubuntu just not mounting the disk? Try this:

Code:
blkid | grep /dev/sda5
Once you have done that (you might have to put sudo in front of the command), tell me what "type" it is (vfat, ext3, ext4, and so on).

Once you have figured out the type, try this:

Code:
sudo mkdir /media/mydisk
mount -t ext4 /dev/sda5 /media/mydisk
REPLACE ext4 WITH WHATEVER TYPE YOURS IS

Now you should see the disk mounted in the /media/mydisk directory and you should be able to see the files.

Now, because your info gathering skills were definitely there, I'm going to guess that this was way too simple of a solution and that there is something waaaay more complicated. If not, then good riddens!
 
Old 10-10-2011, 04:58 PM   #3
ken_ken_ken
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
not yet ..

Thanks for the compliments! Yea, I have been trying similar commands but I did not find blkid yet.

here is the go:

Code:
ken@ubuntu:~$ sudo blkid | grep /dev/sdb5
/dev/sdb5: UUID="9794ec00-12a3-f3c8-346a-d3741e3547c1" LABEL="Toaster:4" TYPE="linux_raid_member" 
ken@ubuntu:~$ ken@ubuntu:~$ sudo mount -t linux_raid_member /dev/sdb5 /media/external
ken@ubuntu:~$: command not found
ken@ubuntu:~$ ken@ubuntu:~$ sudo mount -t ext4 /dev/sdb5 /media/external
ken@ubuntu:~$: command not found

BUT the raid was partially assembled.

Code:
ken@ubuntu:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md127 : inactive sdb5[0](S)
      1950362240 blocks super 1.2
       
unused devices: <none>
So I stopped it.

Code:
ken@ubuntu:~$ sudo mdadm --stop /dev/md127
mdadm: stopped /dev/md127
ken@ubuntu:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>
ken@ubuntu:~$ sudo mount -t ext4 /dev/sdb5 /media/external
mount: wrong fs type, bad option, bad superblock on /dev/sdb5,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
So? What do you think?
 
  


Reply


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
Best way to simulate data loss, corruption, partition wiping, etc & then "rescue" it? linus72 Linux - General 8 06-28-2009 07:26 PM
How to recover data from RAID 1 partition edortizq Linux - Newbie 1 03-13-2009 03:12 PM
recovering data from a software raid partition f14f21 Linux - Newbie 3 11-06-2008 07:29 AM
Trying to rescue data from a corrupted jfs partition jchance Linux - Hardware 1 09-15-2006 01:27 PM
HD crash raid howto rescue dancarl Linux - General 1 07-17-2002 01:39 PM


All times are GMT -5. The time now is 12:07 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration