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

Thread: mdadm won't mount Raid 1 disk - bad superblock

  1. #1
    Join Date
    Jun 2013
    Beans
    7

    mdadm won't mount Raid 1 disk - bad superblock

    Hi All, here's my situation:

    Had a 2-bay Synology Diskstation with 2 x 2TB drives. Synology uses mdadm to store files, in this case Raid1.

    The box crashed and array was damaged somehow. Drive's showed errors as well (ATA).

    ddrescued one of the drives to a new health 2TB drive, tried to reassemble, mdadm reports bad superblock. (same as when trying with original disks)

    So as of right now I'm scanning for Superblocks with PhotoRec(testdisk).

    My first question is: will testdisk be able to recover files from the non-assembled/mounted mdadm array? Can it even see those files without a /dev/mdX to scan?

    Second question - assuming it recovers a backup Superblock, how can I use that to get the raid back up?

    Thanks in advance!

    Fletcher

  2. #2
    Join Date
    Mar 2010
    Location
    Metro-ATL
    Beans
    Hidden!
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: mdadm won't mount Raid 1 disk - bad superblock

    Every time I've had an mdadm array fail, I just put in a new HDD to replace the failed disk and told the array to assemble. That would have the RAID rebuild itself over the next 2-24 hours. If you ddrescued the wrong disk (the one that didn't fail), then the disk array sees (2) 100% identical disks and doesn't know which is which. In RAID1, there is an A and a B disk internally even if we don't know which is which. The disks are not 100% mirrored. There are logical differences to help mdadm out.

    You've probably heard this before, but RAID is not a backup https://www.google.com/search?client...utf-8&oe=utf-8. RAID is for HA needs, High Availability, not backups. Backups are still necessary.

    I wish you luck with your data.

  3. #3
    Join Date
    Sep 2008
    Location
    Netherlands
    Beans
    367
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: mdadm won't mount Raid 1 disk - bad superblock

    I've mounted mdadm RAID1 members without the array being assembled.
    In other words: (Sometimes) it is possible to mount a mdadm RAID1 member as single non-RAID disk.
    Maybe it will help you.

    Remember that, once mounted as single read-write disk, it is out of sync with the other member(s).

  4. #4
    Join Date
    Jun 2013
    Beans
    7

    Re: mdadm won't mount Raid 1 disk - bad superblock

    Hi TheFu, both drives of the original RAID 1 array have the same issues, so there's no "good" disk. We were using this for high availability, not a sole backup. It is a way to have data onsite and quickly accessible if the user's copy becomes compromised. We have offsite, etc. That being said, two users did not heed my notice that this should be a redundant location only and used it as the primary location for a couple files.. so I'm trying to recover those.

    Any other input is much appreciated!

  5. #5
    Join Date
    Jun 2013
    Beans
    7

    Re: mdadm won't mount Raid 1 disk - bad superblock

    Hi SaturnusDJ, I did attempt this earlier on, it allowed me to see the files that formed the OS of the device but the point where the data started; "/volume1/" is empty when mounted normally. Thanks for the idea though!

  6. #6
    Join Date
    Sep 2008
    Location
    Netherlands
    Beans
    367
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: mdadm won't mount Raid 1 disk - bad superblock

    LVM maybe?

    Can you post partition layout?

  7. #7
    Join Date
    Jun 2013
    Beans
    7

    Re: mdadm won't mount Raid 1 disk - bad superblock

    You are exactly right Saturnus. Looks like the mdadm raid uses LVM for the "data portion".. not that I really know what that means I installed LVM2 on the maintenance system with old an new HD's attached. I used "lvm lvscan" but it sees nothing. I'm running of a live USB with no persistence so I hope it's not wanting a reboot. Is there any way LVM could be missing an existing LV? Is there a way to tell it to "force" it?

    Here is the latest suggestion from Synology support along with the partition info you asked for.

    Try running:

    lvm lvscan
    # it should say something like "inactive '/dev/vg1000/lv' [7.26 TB] inherit"

    vgchange -ay /dev/vg1000/lv #Correct the vg1000/lv with the one you got from lvmscan

    #Then try mounting the result from lvm scan to volume1

    The partitions are:

    /dev/sda1-5 -
    The ddrescued copy of sdc.
    /dev/sdbX - The ubuntu live usb
    /dev/sdc1-5 -
    One of the old damaged RAID 1 drives
    /dev/md2p1 - The forced mdadm volume
    /nas/ - the mount point for md2p1
    /nas/volume1/ - the place where all the data should be (where the LV gets mounted? or is this the LV?)
    Last edited by fharrington; June 27th, 2013 at 06:06 PM.

  8. #8
    Join Date
    Sep 2008
    Location
    Netherlands
    Beans
    367
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: mdadm won't mount Raid 1 disk - bad superblock

    Mdadm doesn't do LVM.
    Synology controlled the layers.

    That should work yes.

    Run these commands, elevated (so sudo):
    Code:
    partprobe
    Code:
    vgscan
    Code:
    vgchange -ay
    If it's LVM, you should be able to mount a partition that became available at /dev/mapper/.

    For correct partitions on the drive run this command:
    Code:
    parted /dev/sda print

  9. #9
    Join Date
    Jun 2013
    Beans
    7

    Re: mdadm won't mount Raid 1 disk - bad superblock

    here is the vgscan output.

    Code:
    root@ubuntu:/# partprobe
    root@ubuntu:/# vgscan
      Reading all physical volumes.  This may take a while...
      /dev/sdc5: read failed after 0 of 4096 at 4096: Input/output error
      No volume groups found
    root@ubuntu:/# vgchange -ay
      No volume groups found

    *please note that i changed my previous post to reflect the correct drive info (sdC was old raid 1 drive, sdA is ddrescued new healthy drive)

  10. #10
    Join Date
    Jun 2013
    Beans
    7

    Re: mdadm won't mount Raid 1 disk - bad superblock

    just a thought Saturn, if the superblock was bad on the original raid 1 drive and ddrescue made a "block for block" copy of it, wouldn't I still have a bad superblock? Since it holds the metadata could this be the reason i had to force mdadm to mount (assume-clean etc) and the reason lvm doesn't see an vm's? Would restoring from a backup superblock potentially fix these issues? I'm grasping at straws here, just an idea

Page 1 of 2 12 LastLast

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
  •