Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: How To Access RAID Disks From Another Device?

  1. #11
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How To Access RAID Disks From Another Device?

    OK well that all looks very encouraging - my version is 1.2 so the "--examine" looks a bit different, but the important thing is it is correctly detecting the RAID partition type.

    Was the array resyncing to a spare drive when the NAS died by any chance? It looks like it's ignoring the 'active' device and trying to assemble from the 'spare' and another (missing) device.

    It worries me a bit that it seems to have assembled TWO arrays - my guess is it put the active device in md0 and tried to make another array in md1 out of the spare. Let's try

    Code:
    sudo mdadm --detail /dev/md0
    Code:
    sudo mdadm --detail /dev/md1
    and try to figure it out. We may have to pull both apart and re-assemble giving it the partitions explicitly instead of using --scan. Or maybe we can remove the spare from md1 and add it back to md0.
    Last edited by steeldriver; May 19th, 2012 at 12:23 PM.

  2. #12
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Hi Steeldriver,

    ok, i'm a dope! I didn't realise that there was a page 2 to this message so I didn't see your reply until now! Duh!

    I turned off the PC and restarted it and now (of course!) it is saying something different to me. When I run "sudo mdadm --assemble --scan" it tells me:

    Code:
    mdadm: /dev/md0 has been started with 1 drive (out of 2).
    mdadm: failed to add /dev/sdb2 to /dev/md1: Invalid argument
    mdadm: failed to add /dev/sda2 to /dev/md1: Invalid argument
    mdadm: /dev/md1 assembled from -1 drives and 1 spare - not enough to start the array.
    mdadm: failed to add /dev/sdb2 to /dev/md1: Invalid argument
    mdadm: failed to add /dev/sda2 to /dev/md1: Invalid argument
    mdadm: /dev/md1 assembled from -1 drives and 1 spare - not enough to start the array.
    running "sudo mdadm --detail /dev/mdX" tells me:

    Code:
    /dev/md0:
            Version : 0.90
      Creation Time : Fri Mar 27 06:32:58 2009
         Raid Level : raid1
         Array Size : 1020032 (996.29 MiB 1044.51 MB)
      Used Dev Size : 1020032 (996.29 MiB 1044.51 MB)
       Raid Devices : 2
      Total Devices : 1
    Preferred Minor : 0
        Persistence : Superblock is persistent
    
        Update Time : Sun May 20 16:44:28 2012
              State : clean, degraded 
     Active Devices : 1
    Working Devices : 1
     Failed Devices : 0
      Spare Devices : 0
    
               UUID : f4bbf855:b2d100c6:39ef04d2:f61103c6
             Events : 0.1473386
    
        Number   Major   Minor   RaidDevice State
           0       0        0        0      removed
           1       8        1        1      active sync   /dev/sda1
    and, rather dissapointingly ...

    Code:
    mdadm: cannot open /dev/md1: No such file or directory
    You are right, as I was having problems with the NAS I did try replacing the poorer disk with a new disk hoping that would cause it to spring back into life ... it didn't. And it confirmed to me that there was a fault with the device itself, not just a disk problem. It sounds like trying that did not help. Sorry for that.

    When I look at the disk utility it tells me that each disk has two RAID components. One of 1GB (sda1 and sdb1) and one of 999GB (sda2 and sdb2). I am assuming that the data is in the "2"s and the "1"s are maybe where the device keeps some software etc.

    In case it helps, here are the latest "sudo mdadm --examine /dev/sdX2" results:

    Code:
    /dev/sda2:
              Magic : a92b4efc
            Version : 0.90.00
               UUID : 00000000:00000000:00000000:00000000
      Creation Time : Sat May 19 05:43:43 2012
         Raid Level : -unknown-
       Raid Devices : 0
      Total Devices : 2
    Preferred Minor : 1
    
        Update Time : Sun May 20 15:08:26 2012
              State : active
     Active Devices : 0
    Working Devices : 2
     Failed Devices : 0
      Spare Devices : 2
           Checksum : 82b4eeca - correct
             Events : 1
    
    
          Number   Major   Minor   RaidDevice State
    this     0       8        2        0      spare   /dev/sda2
    
       0     0       8        2        0      spare   /dev/sda2
       1     1       8       18        1      spare   /dev/sdb2
    and

    Code:
    /dev/sdb2:
              Magic : a92b4efc
            Version : 0.90.00
               UUID : 00000000:00000000:00000000:00000000
      Creation Time : Sat May 19 05:43:43 2012
         Raid Level : -unknown-
       Raid Devices : 0
      Total Devices : 2
    Preferred Minor : 1
    
        Update Time : Sun May 20 15:08:26 2012
              State : active
     Active Devices : 0
    Working Devices : 2
     Failed Devices : 0
      Spare Devices : 2
           Checksum : 82b4eedc - correct
             Events : 1
    
    
          Number   Major   Minor   RaidDevice State
    this     1       8       18        1      spare   /dev/sdb2
    
       0     0       8        2        0      spare   /dev/sda2
       1     1       8       18        1      spare   /dev/sdb2
    I have a feeling I need to go down the "pull everything apart route" that you talked about. Sounds fun!

  3. #13
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How To Access RAID Disks From Another Device?

    I was wondering if you'd tossed the whole thing out the window in frustration

    Right. So my concern given the history of the failure is that if you DO get it to assemble, it MAY resync whatever tut was on the spare drive over the top of your good data. I don't know enough about RAID to know whether that is likely or even possible.

    What you do next should depend on how important this data is to you. You may want to consider make a low-level copy of the entire partitions (e.g. dd or partimage) before you do anything further.

    I guess we already have copies of the RAID metadata on this forum, but I suggest also doing

    Code:
    $ sudo mdadm --examine /dev/sd[ab]2 > raid.status
    and saving the file somewhere permanent e.g. another USB stick since you are doing this all from Live boot.

    Having thought about this some more this morning, I think since this was a RAID1 (mirror) array there is nothing to be gained by trying to force assemble / create / add the other ('Spare') device. What I would do next is simply try to mount md0 (the one that appears to have assembled - and started - with the single supposed good device). I would try:

    Code:
    $ sudo fdisk -l
    to see if it is now showing an fs type for md0 (mine doesn't - but I think that's because I'm running LVM2 on top so there's no actual fs directly on my md), otherwise I would guess and try ext3

    Code:
    $ sudo mkdir /mnt/raida
    
    $ sudo mount -t ext3 -o ro /dev/md0 /mnt/raida
    Last edited by steeldriver; May 21st, 2012 at 02:42 PM.

  4. #14
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Hi Steeldriver,

    Maybe I should have thrown it out the window!!!

    OK, I think you are right about taking a low level copy first. So i'll find a disk to do that with (I'm guessing it will take a little while ... to find the disk as well as to do the copy!) and report back. (I assume I need to copy this onto an empty drive in the PC, I couldn't copy it across the network into spare space on an extisting drive?)

  5. #15
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How To Access RAID Disks From Another Device?

    well I've run partimage off a systemrescue cd to image a ~100GB laptop drive direct to an nfs-mounted NAS share so yes that should be possible to do that - for a TB drive you're right though, it will take a while

    fwiw I think simply attempting to mount the md0 device ro should be fairly safe - I was more recommending it before trying any of the more forceful mdadm assemble / create / add operations - your call though

  6. #16
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Well the dd copy has been running for about 6 hours now ....

    A progress bar .... or any hint of life .... would be really useful.

    I wish I'd tried the mount first.

    ho hum

  7. #17
    Join Date
    Mar 2010
    Beans
    58
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How To Access RAID Disks From Another Device?

    So.. WAS THIS ISSUE SOLVED?? I was so happy to find this post... sadly no clear solution.

    My problem is similar. Unable to access 2disk mirror in my NAS, I'm sure the disks haven't failed physically.
    Now I'm trying to access them with an USB Live version of Ubuntu.. In the Disks utility I can see the drive but other than "Software RAID Component (version 0.90.0) ",no further information is given and it can't be mounted.

    I'm still under warranty, but the support people are no help at all and ALL MY DATA's on there ! To make it worse I found this article on my nas:
    http://www.randomtech.be/2012/03/26/...e-information/

    Please put me out of my misery.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •