Announcement

Collapse
No announcement yet.

Recover a Raid 1 array

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Recover a Raid 1 array

    Kubuntu 10.04 64 bit

    I have two identical disks that were set up as a RAID 1 Array. The box they were in, which I know little about, has died, and I need to rebuild the array. The disks are installed in the machine, the BIOS sees them, and GParted has correctly identified them as being in an array. When I try mdamd --assemble ... mdamd comes back with the message "mdadm: no recogniseable superblock on /dev/sdb" and aborts. From my reading I am guessing that the original array was made with a BUILD command, rather than a CREATE command. So I must rebuild it also using BUILD. How then do I discover what chunk size was used? I know, or can deduce all the other information required.

    Other questions:
    1. This array was originally in a 32 bit machine. Will I be better off trying to recover it on a 32 bit machine, rather than the 64 Bit machine?

    2. If I use the wrong chunk size, will the data on the disk be destroyed?

    Thanks for your time


    #2
    Re: Recover a Raid 1 array

    Your not giving enough information;

    I take it you did not create the array since you're unsure of so many details.

    Is one drive bad or are you just trying to restart a good array?
    What mdadm --assemble command did you use exactly?
    What are the UUID's of the partitions in question?

    and no, the kernel architecture will not matter (32 vs. 64 bit).

    FYI: if it's a RAID1 array and you have only one good partition, all your data is intact. You just have to start the array in a degraded state.

    Start by opening a terminal and typing sudo blkid -c /dev/null -o list and posting the results.

    Generally, most people use the defaults and chunk is an option. You might just try and start the array with one partition only and copy the data off.

    Please Read Me

    Comment


      #3
      Re: Recover a Raid 1 array

      You are correct. I did not set up the array. It was in fact in a Galaxy MGB-RAID-PRO NAS box. From my understanding of this thing, it doesn't give you many choices anyway.

      mdadm --assemble /media/md01 /dev/sdb /dev/sdc
      mdadm: no recogniseable superblock on /dev/sdb
      mdadm: /dev/sdb has no superblock - assembly aborted

      blkid -c /dev/nul -o list
      device fs_type label mount point UUID
      -------------------------------------------------------------------------------
      /dev/sda1 ext4 / 2b420b9c-44d5-4b79-a440-8a83b553d3be
      /dev/sda5 swap <swap> cba025ad-69f4-42ae-966f-34fb8f88e48d
      /dev/sdc1 linux_raid_member (not mounted) 3dafcf68-750a-5da3-28cb-2c94abe97a24
      /dev/sdc2 linux_raid_member (not mounted) 43ea9dd9-edc4-2c97-470f-f5f58f09b91a
      /dev/sdc3 swap (not mounted)
      /dev/sdb1 linux_raid_member (not mounted) 3dafcf68-750a-5da3-28cb-2c94abe97a24
      /dev/sdb2 linux_raid_member (not mounted) 43ea9dd9-edc4-2c97-470f-f5f58f09b91a
      /dev/sdb3 swap (not mounted)

      The disks were configured as RAID1 and both are in tact, undamaged, at least as far as we can tell at this point.

      I think mdadm --build /media/md01 /dev/sdb /dev/sdc is what I need to do.

      Thanks for your time.

      Comment


        #4
        Re: Recover a Raid 1 array

        The command should be

        mdadm --build /media/md01 --level=raid1 --raid-devices=2 /dev/sdb /dev/sdc

        Which leaves chunk at the default of 64.

        Comment


          #5
          Re: Recover a Raid 1 array

          The UUID's look correct (they match) so you might try creating a correct /etc/mdadm/mdadm.conf file and then do:

          mdadm -A --scan

          An mdadm.conf entry might look like:

          ARRAY /dev/md01 level=raid1 num-devices=2 UUID=3dafcf68:750a5da3:28cb2c94:abe97a24
          ARRAY /dev/md02 level=raid1 num-devices=2 UUID=43ea9dd9:edc42c97:470ff5f5:8f09b91a

          If this fails, go ahead with the build option. I can't see that this would do any damage even if you selected the wrong chunk size. Once you run the build, determine the filesystem and run a filesystem check before you so anything else. If you get a bunch of errors, suspect an incorrect chunk size or file system.

          If you're concerned about the build command, as I suggested before you could try a degraded startup, thus leaving one partition totally out of the picture.

          Also - properly prepared RAID1 partitions can be mounted individually if they don't have a superblock (the main reason for the build vs assemble). I had a RAID1 assembled set fail awhile back and and I had to only remove the superblock from the remaining good partition and mount it.

          Any idea what file system it used? you might try a straight mount command of an individual partition but without a superblock, you'll have to guess at the file system. Ext2 and Ext3 would be the first best-guesses.

          Please Read Me

          Comment


            #6
            Re: Recover a Raid 1 array

            Each disk has three partitions; two are ext3 and the third is a swap.

            mount -t ext3 /dev/sdb2 /mnt work and the files I expected are there, and I will be able to recover them.

            Thank you very much for your help. Greatly appreciated.

            Comment


              #7
              Re: Recover a Raid 1 array

              Hey, good news.

              Please Read Me

              Comment

              Working...
              X