LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-15-2013, 02:12 PM   #1
adrov
LQ Newbie
 
Registered: May 2013
Posts: 6

Rep: Reputation: Disabled
How to mount partition / disk inside RAID1


Hello,

I have server and suddenly one of the drives died, SMART is reporting tons of errors. I would like to mount the 2nd disk, which is still working and make backup of it, before I do anything else on it, but I can't seem to mount it at all. I have to admit, I'm very new to Linux.

Some outputs.

Code:
root@rescue:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md0 : active raid1 sdb1[1]
      104320 blocks [2/1] [_U]

unused devices: <none>
----------------------------------------------------------

Code:
root@rescue:~# fdisk -l

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f015

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63      208844      104391   fd  Linux raid autodetect
/dev/sdb2          208845    16787924     8289540   fd  Linux raid autodetect
/dev/sdb3        16787925  2930272064  1456742070   fd  Linux raid autodetect

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders, total 208640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
root@rescue:~

Also what would be the best way to backup /dev/sdb, would like to see some actual examples, I've browsed trough google, but found nothing specific...

Last edited by adrov; 05-15-2013 at 02:50 PM.
 
Old 05-15-2013, 02:41 PM   #2
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
Quote:
Originally Posted by adrov View Post
Code:
Disk /dev/md0 doesn't contain a valid partition table
root@rescue:~
This would point to a not fully mountable system, but and you did say mounting it didnt work.
Did you mount it as follows:
Code:
$ mount /dev/md0 /somemountpoint
If so, could you clarify what mount reports here?
And could you try doing the same from a live-CD/USB setup, you might not be able to mount if using the RAID system.
 
Old 05-15-2013, 02:49 PM   #3
adrov
LQ Newbie
 
Registered: May 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Code:
mount /dev/md0 /somemountpoint
Does work, but the /somemountpoint is pretty much empty, grub loader in it only... Shouldn't be there more then 100MB of files?

Last edited by adrov; 05-15-2013 at 02:51 PM.
 
Old 05-15-2013, 03:02 PM   #4
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
Well, you just mounted your boot partition. Lets start looking for your actual data partition.

if you do:
Code:
$ ls /dev
It should give you a list of all devices detected by your OS. Then it should become a matter of trying to mount every md till you find the right one (there should be an easier way for this, but for the moment it escapes me fully :S)
 
Old 05-15-2013, 03:15 PM   #5
adrov
LQ Newbie
 
Registered: May 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
ls /dev outputs:

Code:
md0                 ptyd6  ptyse  ptyy6   tty36     ttyd2  ttysa  ttyy2
md1                 ptyd7  ptysf  ptyy7   tty37     ttyd3  ttysb  ttyy3
md127               ptyd8  ptyt0  ptyy8   tty38     ttyd4  ttysc  ttyy4
md2                 ptyd9  ptyt1  ptyy9   tty39     ttyd5  ttysd  ttyy5
I've tryed all:

Code:
root@rescue:~# mount /dev/md0 /mt0
mount: /dev/md0: can't read superblock

root@rescue:~# mount /dev/md1 /mt1
mount: /dev/md1: can't read superblock

root@rescue:~# mount /dev/md2 /mt2
mount: /dev/md2: can't read superblock
 
Old 05-15-2013, 03:18 PM   #6
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
Quote:
Originally Posted by adrov View Post
Code:
mount /dev/md0 /somemountpoint
Does work, but the /somemountpoint is pretty much empty, grub loader in it only... Shouldn't be there more then 100MB of files?
So here it did mount, but later on it didnt. Was this one still mounted? Make sure you only mount one raid partition at a time.
 
Old 05-15-2013, 03:20 PM   #7
adrov
LQ Newbie
 
Registered: May 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I'm sure I've mounted one at time. But it's always that superblock error for all except the md0, which is boot partition I guess.

Is it safe to run "fsck /dev/md1" for fix stuff like superblock perhaps?

Last edited by adrov; 05-15-2013 at 03:27 PM.
 
Old 05-16-2013, 02:26 AM   #8
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
As I recall you should never run fsck outside of the raid. But only on filesystems (like on /) when running raids.

Could you boot a liveCD/USB and then try the mounting of just your alive drive, and still whatever you do do not fsck it there. Might corrupt all your data.
 
  


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
Trying to mount single disk from a Raid1 Synology NAS r0k Linux - General 6 05-24-2013 04:24 AM
Raid1 array says /dev/md0 does not have a valid partition table, won't auto mount bhepdogg Ubuntu 12 10-30-2009 03:50 PM
mount does not show the disk partition saawan Linux - General 1 06-12-2009 02:29 PM
[HOW] mount a whole disk not just a partition duyuyang Linux - Software 5 11-27-2008 01:30 AM
How do you mount a XP partition inside Virtual PC? chobits Linux - Newbie 0 12-27-2004 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:26 PM.

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