Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm facing with a pretty easy problem in my opinion.

I've extracted a working disk from a RAID1 and I'm looking to copy only data (FS and RAID configuration doesn't matter) into another location (another FS).

My problem is I'm not able to mount properly this disk into another linux.

I've first looked the partition table :

# fdisk -l /dev/sdc
Disk /dev/sdc: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63  1249535699   624767818+  fd  Linux raid autodetect
/dev/sdc2      1249535700  1250017649      240975   fd  Linux raid autodetect
/dev/sdc3      1250017650  1250258624      120487+  82  Linux swap / Solaris

I've understood I should use dmraid tools. Once installed :

# cat /proc/mdstat 
Personalities : 
md0 : inactive sdc1[1](S)
      624767744 blocks

unused devices: <none>

And some other informations :

# mdadm --examine /dev/sdc1
/dev/sdc1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 8f292f54:7e5aef72:7e5ab5fd:b348fd05
  Creation Time : Mon Jun  2 03:39:41 2008
     Raid Level : raid1
  Used Dev Size : 624767744 (595.82 GiB 639.76 GB)
     Array Size : 624767744 (595.82 GiB 639.76 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Tue Feb  7 22:34:59 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : a505b324 - correct
         Events : 15148


      Number   Major   Minor   RaidDevice State
this     1       8        1        1      active sync   /dev/sda1

   0     0       8       17        0      active sync   /dev/sdb1
   1     1       8        1        1      active sync   /dev/sda1

From here, I've tried to mount but I'm not comfortable with dmtools and how it's working.

# mount /dev/sdc1 /mnt/sdc1
mount: unknown filesystem type 'linux_raid_member'

# mount /dev/md0 /mnt/sdc1
mount: /dev/md0: can't read superblock

I've seen some options to alter RAID array with mdadm but I only want to copy data on its filesystem before wiping them... Anyone has a clue ?

share|improve this question
1  
Have a look at serverfault.com/questions/375390/how-do-i-mount-a-raid-disk, it might help. I asked this yesterday ;-) –  Devator Mar 31 '12 at 9:40
    
Good question/answer too, except I just have to run instead of assemble :-) –  Doomsday Mar 31 '12 at 12:41

1 Answer 1

up vote 1 down vote accepted

You need to do

shell># mdadm --assemble --scan

once done, you should be able to see that md0 became active when you type

shell># cat /proc/mdstat

if it is not the case, try

shell># mdadm --assemble --scan --run

and repeat

shell># cat /proc/mdstat

to see if md0 became active.

Once md0 is active, you can mount it with

shell># mount /dev/md0 /mnt/sdc1

and recover your data by copying it wherever you want.

share|improve this answer
    
Sure it was dead simple, thank you ;) –  Doomsday Mar 31 '12 at 12:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.