Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: How To Access RAID Disks From Another Device?

  1. #1
    Join Date
    May 2012
    Beans
    9

    How To Access RAID Disks From Another Device?

    I have a faulty NAS which has been running RAID 1. I need to extract the data from the disks (it is the NAS device itself that has failed, not the disks). I removed the disks and put them into a PC which I then booted up with Ubuntu 12.04 LiveCD. It can see the disks (through disk utility) but will not start the RAID array. The error message simply says "not enough components available to start the RAID array".

    I'm a Ubuntu newbie and don't know which direction to turn in. Can somebody point me in the right direction to accessing this data please?

    Many thanks!

  2. #2
    Join Date
    Mar 2012
    Beans
    59

    Re: How To Access RAID Disks From Another Device?

    First thing is: What NAS? If it uses a hardware RAID controller you could have problems.

  3. #3
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Quote Originally Posted by Bushflyr View Post
    First thing is: What NAS? If it uses a hardware RAID controller you could have problems.
    It is an Iomega ix2. The Iomega people have suggested that accessing the data is possible (but without explaining how )

  4. #4
    Join Date
    Apr 2012
    Beans
    4,593

    Re: How To Access RAID Disks From Another Device?

    does the LiveCD system include the mdadm package? I don't think the regular install does

    what does sudo fdisk -l see? does it at least identify the partition type?

    is there anything like /dev/md0 or /dev/md1 in /dev?

    if there is you could start by at least grabbing mdadm and then trying

    Code:
    $ mdadm --detail /dev/mdX
    (where X is the number of the md block device) although you might need a reboot after adding the mdadm tool to get it to detect - might work if you use a LiveUSB with persistence - if not you will need to actually install a system somewhere

    sorry, I'm pretty much a RAID n00b too

  5. #5
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Quote Originally Posted by steeldriver View Post
    does the LiveCD system include the mdadm package? I don't think the regular install does

    what does sudo fdisk -l see? does it at least identify the partition type?

    is there anything like /dev/md0 or /dev/md1 in /dev?

    if there is you could start by at least grabbing mdadm and then trying

    Code:
    $ mdadm --detail /dev/mdX
    (where X is the number of the md block device) although you might need a reboot after adding the mdadm tool to get it to detect - might work if you use a LiveUSB with persistence - if not you will need to actually install a system somewhere

    sorry, I'm pretty much a RAID n00b too
    Hi Steeldriver,

    Thanks for getting back to me. You have moved me forwards....

    The disk utility tells me that each disk contains two "RAID Components". In each case, the first one is 1GB and the second one is 999GB. The "device" names are /dev/sda1, /dev/sda2, /dev/sdb1 and /dev/sdb2.

    I ran "sudo fdisk -l /dev/sda2" and it told me:

    Disk /dev/sda2: 999.2GB, 999160274432 bytes
    255 heads, 63 sectors/track, 121474 cylinders, total 1951484911 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimal/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

    Disk /dev/sda2 doesn't contain a valid partition table

    mdadm was not installed so I installed it. I then ran "sudo mdadm --detail /dev/sda2" and got the error message "mdadm: /dev/sda2 does not appear to be an md device".

    Does that mean that this is a "sd" device (as it is sda2?). Whatever "sd" might mean .... ? (I got the same error on /dev/sda1).

  6. #6
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    I've just run "sudo fdisk -l" again and it has given a different result. I'm not sure whether that is because I have mdadm installed for for some of the other things I have been trying. Anyway, it tells me ....

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x0007ecea

    Device Boot Start End Blocks Id System
    /dev/sda1 1 2040254 1020127 83 Linux
    /dev/sda2 2040257 1953525167 975742455+ 83 Linux

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x0005b6f1

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 2040254 1020127 83 Linux
    /dev/sdb2 2040257 1953525167 975742455+ 83 Linux

    Does that help ????

  7. #7
    Join Date
    Apr 2012
    Beans
    4,593

    Re: How To Access RAID Disks From Another Device?

    Things like /dev/sda1, /dev/sdb2 are the regular block devices, your RAID array will get constructed out of (some of) those and a /dev/md0 or /dev/md1 or whatever will magically appear - running "mdadm --detail" on the underlying /dev/sdXx device won't work

    Likely your /dev/sda1 and /dev/sdb1 are the system partitions of the NAS itself and /dev/sda2 and /dev/sdb2 are the RAID

    Here are the relevant bits of the fdisk -l for my box to show how it should look:

    Code:
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63      112454       56196   83  Linux
    Partition 1 does not start on physical sector boundary.
    /dev/sda2          112455  3907029167  1953458356+  fd  Linux raid autodetect
    Partition 2 does not start on physical sector boundary.
    
    Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1              63      112454       56196   83  Linux
    Partition 1 does not start on physical sector boundary.
    /dev/sdb2          112455  3907029167  1953458356+  fd  Linux raid autodetect
    Partition 2 does not start on physical sector boundary.
    
    Disk /dev/md1: 2000.3 GB, 2000340168704 bytes
    2 heads, 4 sectors/track, 488364299 cylinders, total 3906914392 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Alignment offset: 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/md1 doesn't contain a valid partition table
    Notice that my /dev/sda2 and /dev/sdb2 are marked as partition type 'fd Linux raid autodetect' whereas your equivalent partitions are plain type '83 Linux'. EITHER that means it's not Linux software RAID in which case like Bushflyr said you are likely out of luck OR it means it couldn't auto-detect because mdadm wasn't installed at boot time.

    You *may* be able to force mdadm to detect AFTER boot but that's beyond my expertise - I don't want to suggest something that might corrupt your data. EDIT: it should be quite safe to at least try:

    Code:
     sudo mdadm --examine /dev/sda2
    Code:
     sudo mdadm --examine /dev/sdb2
    which will tell you if mdadm can detect a RAID superblock on either of the candidate partitions (I just did it on my running system and nothing bad happened).

    Hope this helps
    Last edited by steeldriver; May 18th, 2012 at 09:59 PM. Reason: added mdadm --examine

  8. #8
    Join Date
    Mar 2012
    Beans
    59

    Re: How To Access RAID Disks From Another Device?

    I'm pretty new too, but THIS BLOG would indicate that it's a mdadm RAID.

    Are you 100% sure that the hardware has failed? If you've tried power cycling it a few times with no luck you could try reassembling the RAID. I've been able to rebuild my RAID with no data loss by running:
    Code:
    sudo mdadm --assemble --scan
    I'm not 100% sure how safe it its for your data, but I don't think it will hut anything.

    Also, more (tangential) info HERE.

  9. #9
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Hi Steeldriver,

    Thanks for that. Yes, I see the difference.

    Running sudo mdadm --examine /dev/sdX2 gives me:

    Code:
    /dev/sda2:
              Magic : a92b4efc
            Version : 0.90.00
               UUID : 835b0566:a6ec46fd:dcb0858b:93e1599d
      Creation Time : Fri Mar 27 07:25:20 2009
         Raid Level : raid1
      Used Dev Size : 975742336 (930.54 GiB 999.16 GB)
         Array Size : 975742336 (930.54 GiB 999.16 GB)
       Raid Devices : 2
      Total Devices : 2
    Preferred Minor : 1
    
        Update Time : Wed May 16 10:26:52 2012
              State : clean
     Active Devices : 1
    Working Devices : 2
     Failed Devices : 1
      Spare Devices : 1
           Checksum : 17fa6f04 - correct
             Events : 2533112
    
    
          Number   Major   Minor   RaidDevice State
    this     2       8       18        2      spare   /dev/sdb2
    
       0     0       8        2        0      active sync   /dev/sda2
       1     1       0        0        1      faulty removed
       2     2       8       18        2      spare   /dev/sdb2
    and

    Code:
    /dev/sdb2:
              Magic : a92b4efc
            Version : 0.90.00
               UUID : 835b0566:a6ec46fd:dcb0858b:93e1599d
      Creation Time : Fri Mar 27 07:25:20 2009
         Raid Level : raid1
      Used Dev Size : 975742336 (930.54 GiB 999.16 GB)
         Array Size : 975742336 (930.54 GiB 999.16 GB)
       Raid Devices : 2
      Total Devices : 2
    Preferred Minor : 1
    
        Update Time : Wed May 16 09:10:18 2012
              State : active
     Active Devices : 1
    Working Devices : 2
     Failed Devices : 1
      Spare Devices : 1
           Checksum : 17d34214 - correct
             Events : 2503425
    
    
          Number   Major   Minor   RaidDevice State
    this     0       8        2        0      active sync   /dev/sda2
    
       0     0       8        2        0      active sync   /dev/sda2
       1     1       0        0        1      faulty removed
       2     2       8       18        2      spare   /dev/sdb2
    I think the table at the end is trying to tell me something useful but I am unsure how to translate it.

  10. #10
    Join Date
    May 2012
    Beans
    9

    Re: How To Access RAID Disks From Another Device?

    Hi Bushflyr,

    Thanks for getting back to me. I think I'm getting somewhere (or at least, I think you guys are getting me somewhere!! )

    I read through those links you suggested. Yes, the NAS is dead I power-cycled it many times. Looking at the SMART data, one disk was classified as "disk failure is imminent" so I also tried returning the better disk to the NAS with a new disk but it didn't want to play.

    I ran the sudo --assemble --scan command and got the following response:

    Code:
    mdadm: /dev/md0 has been started with 1 drive (out of 2).
    mdadm: /dev/md1 assembled from 0 drives and 1 spare - not enough to start the array.
    Disk utility has now changed what it says under Multi-Disk Devices. It previously simply showed "Array". It now has 3 entries:

    RAID Array /dev/md1 (inactive)
    RAID-1 Array
    1.0 GB RAID-1 Array

    Clicking on the first shows a state of "not running, partially assembled" and nothing eles.

    Clicking on the second one tells me a few more things:
    - Level = Mirror(RAID-1)
    - Metadata Version = 0.90.0
    - State = Not runnning
    - Components = 2
    - there is also a "Start RAID Array" button shown here (I have not clicked it)

    The third one tells me even more:
    - Level = Mirror(RAID-1)
    - Metadata version = 0.90.0
    - Partitioning = Not partitioned
    - State = DEGRADED
    - Capacity = 1.0GB(1,044,512,768 bytes)
    - Action = Idle
    - Components = 2
    - it then has 5 buttons (not clicked any of them!):
    - Stop RAID Array
    - Check Array
    - Benchmark
    - Format/Erase RAID Array
    - Edit components
    - It shows the Volumes as "1.0 GB ext2"
    - Then I am guessing it shows info about this volume:
    - Usage = Filesystem
    - Device = /dev/md0
    - Capacity = 1.0GB(1,044,512,768 bytes)
    - Type = EXT2(version 1.0)
    - Mount point: Not mounted
    - Then it shows 4 buttons (again, not clicked):
    - Mount volume
    - Check filesystem
    - Format volume
    - Edit filesystem label

    I am guessing that I can try mounting this volume but maybe I need to do something first?

    Many thanks!!

Page 1 of 2 12 LastLast

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
  •