[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recovering data from a Raid 1Sata HD



Yes you can mount the single raid1 disk.  Your wheezy system should have
recognized your drive as a md device when booted.  Run the commend 'cat
/proc/mdstat'.  It will show you the current md devices and their status.  This
is what I get after connecting a drive to my system over a usb connection.  It
added drives /dev/sdg[1-3] to my system drive list (ls /dev/sd*).  I had to
assemble the drive partitions into md devices with the commands 'mdadm
--assemble /dev/md5 /dev/sdg1', 'mdadm --assemble /dev/md6 /dev/sdg2' and 'mdadm
--assemble /dev/md7 /dev/sdg3'.

cat /proc/mdstat
Personalities : [raid1]
md7 : active (auto-read-only) raid1 sdg3[3]
      211690544 blocks super 1.2 [3/1] [__U]
     
md6 : active (auto-read-only) raid1 sdg2[3]
      1048564 blocks super 1.2 [3/1] [__U]
     
md5 : active (auto-read-only) raid1 sdg1[3]
      31456184 blocks super 1.2 [3/1] [__U]
     
md2 : active raid1 sda3[3] sdb3[5]
      938881600 blocks super 1.2 [2/2] [UU]
     
md1 : active raid1 sda2[3] sdb2[5]
      4192192 blocks super 1.2 [2/2] [UU]
     
md0 : active raid1 sda1[0] sdb1[1]
      33554368 blocks [2/2] [UU]
     
unused devices: <none>

Where my original system devices are md0, md1 and md2.  You will also see that
this is a degraded array with the notation [3/1] [__U] which means that the
original array had 3 drives and now has one.

If you have just booted the system with the drive connected it may have
assembled the md devices for you.  Look for the drive partitions for the old
drive and you will see the md device your system has assigned to it.  It might
me something like /dev/md127, /dev/md126 and so on depending on how many
partitions the drive has. 

Now mount the array with 'mount /dev/md5 /mnt/src' after creating the directory
/mnt/src first.  Of course your device names and drive names will be different. 
If the original array device was a swap partition (as my md6 above is) it will
not mount.  Once you are finished and have unmounted the array you should stop
the array(s) with the command 'mdadm --stop /dev/md[5-7]'.  Warning ... of
course be careful and not try to stop the arrays your system is using.  I think
mdadm will warn you that the array is in use and cannot be stopped. 


Hope this helps.

...Bob


Reply to: