RAID 1: how recover RAID and data?

  • Hello,


    I don't understand what is happening.
    I'm using OpenMediaVault 3.0.99 (Erasmus)

    • 1 mounth before, I had a RAID 1 alert so I bought a new HDD.
    • After trying RAID reconstruction, I had mail alert because the old HDD had one bad sector...
    • Today, RAID was not available yet.
      I tried reboots: nothing
      I tried to check all HDD on my computer: I couldn't mount them to see the data's inside
    • After removing the fail HDD and keeping the new: I have no data yet
    • After plugin the fail HDD and keeping the now: I have no data yet but RAID is available now for repair.

    To avoid mistake and data lost, what please I have to do?


    Informations


    blkid


    lsmod | grep raid


    cat /etc/mdadm/mdadm.conf


    /etc/default/mdadm


    This topic checked

    • Offizieller Beitrag

    What would be useful is post the information as requested here do this from the root prompt there is no need to change directory to /srv/dev/disk-by-label
    As a pointer /dev/md127 shows as stopped, 'if' I'm correct the entry in your mdadm.conf says spare and and is from one of the drives output in blkid

  • Hello,


    RAID > 0 is used to avoid Data Lost.
    One drive is cloned in another.
    Maybe not for yourself, some of us needs RAID at home.
    Notice that I have professional reasons to use it at home to.


    Regards,


    Envoyé de mon SM-G935F en utilisant Tapatalk

  • What would be useful is post the information as requested here do this from the root prompt there is no need to change directory to /srv/dev/disk-by-label
    As a pointer /dev/md127 shows as stopped, 'if' I'm correct the entry in your mdadm.conf says spare and and is from one of the drives output in blkid

    Hello,


    I will try this.
    I think we couldn't write on this topic.
    Thank you.


    Regards,


    Envoyé de mon SM-G935F en utilisant Tapatalk

  • You can't write on the link I posted but following the requested information then post here.

    I can't: the posted topic is pinned.
    I'm writting there the informations to post.

    You can mount degraded RAID1 and try to salvage data.

    How can I do it, please?

    • Offizieller Beitrag

    Ok according to your output there are no active raid arrays, the output of blkid shows 2 drives which are part of a Raid 1 /dev/sda and /dev/sdb


    Try this mdadm --assemble --verbose --force /dev/md127 /dev/sd[ab]


    post the output of cat /proc/mdstat

  • Ok according to your output there are no active raid arrays, the output of blkid shows 2 drives which are part of a Raid 1 /dev/sda and /dev/sdb


    Try this mdadm --assemble --verbose --force /dev/md127 /dev/sd[ab]


    post the output of cat /proc/mdstat

    Thank you.
    I tried but I don't have my datas yet:

  • mdadm --zero-superblock /dev/sdb then


    mdadm --add /dev/md127 /dev/sdb


    cat /proc/mdstat

    I tried.
    I have this:


  • 18496.7 minutes / 60 / 24 = only ~13 days remaining.


    Why exactly do people prefer availability (that obviously does NOT work) over data protection?


    And I really don't understand why you continue to use a failed concept (RAID-1) instead of starting with backup now...

    I have a backup but not for every datas.
    Then, I prefer trying to recover else I will lose some times to download ISO's (bad speed connexion).


    For the fail disk, it's just because I'm afraid to make mistakes.
    If it's impossible:
    • Can I take the old HDD (in spare)?
    • Can I repair the bad sector on the actual fail HDD?


    If it's impossible to retrieve datas (on the old HDD in spare), it's better for me.


    Thank you.


    Envoyé de mon SM-G935F en utilisant Tapatalk

    • Offizieller Beitrag

    Personalities : [raid1]
    md127 : active raid1 sdb[2] sda[1]
    976631488 blocks super 1.2 [2/1] [_U]
    [>....................] recovery = 0.0% (2628/976631488) finish=18496.7min speed=875K/sec
    bitmap: 5/8 pages [20KB], 65536KB chunk

    Ok one of those drives is faulty!! having no idea what you did prior to your posting regrading 'reconstruction' I could conclude that /dev/sda is fine due to the fact that drive drive came up when the raid was reassembled.


    Anything changes, configuration for a software can only be done from the cli, the failing hard drive has to be marked as failed before removing it from the raid, this site will explain how to do this


    This line which you posted # definitions of existing MD arraysARRAY /dev/md/ntx-010b:RAID1 metadata=1.2 spares=1 name=ntx-010b:RAID1 UUID=fe4404b3:c566b890:581501be:50dd69c4 clearly shows a drive as a spare but with no working array.
    Somehow you had managed to stop that which was clear from this root@ntx-010b:/srv/dev-disk-by-label-Donnees# mdadm -S /dev/md127mdadm: stopped /dev/md127root@ntx-010b:/srv/dev-disk-by-label-Donnees# cat /proc/mdstatPersonalities : [raid1]unused devices: <none>


    So it was somewhat difficult to understand what and where you were at, it is also helpful to use insert code from the post menu after each cli command it makes it easier to read.


    To try and stop the recovery/resync mdadm --stop /dev/md127

  • I prefer trying to recover


    Ok, the funny part about RAID-1 is: if one disk fails in theory you have all your data still available since RAID-1 implements a mirror. You can throw one disk away and still work with the other since they should contain an identical set of data. Of course this does not work as expected since mdraid only tries to mirror data but takes not care of actually mirroring the data (it simply doesn't care about data at all)


    RAID-1 was ok-ish twenty years ago when we had no better options. Today it's just insane to rely on something that inefficient and obviously not working. If wasting another disk for redundancy then please think about better ways to do this. And still you need backup since RAID NEVER provides data protection.


    So why still relying on RAID-1 (reassemble the array with a 2nd disk) and not using the new disk to copy data over from the remaining RAID-1 member and now starting to implement a better strategy also taking care about data protection (with 2 disks you could use rsnapshot between those for example)

  • if your raid is active then mount it somewhere and try to read data.
    What type of FS is there on md127?

    Hello,
    It is btrfs.


    Ok, the funny part about RAID-1 is: if one disk fails in theory you have all your data still available since RAID-1 implements a mirror. You can throw one disk away and still work with the other since they should contain an identical set of data. Of course this does not work as expected since mdraid only tries to mirror data but takes not care of actually mirroring the data (it simply doesn't care about data at all)


    RAID-1 was ok-ish twenty years ago when we had no better options. Today it's just insane to rely on something that inefficient and obviously not working. If wasting another disk for redundancy then please think about better ways to do this. And still you need backup since RAID NEVER provides data protection.


    So why still relying on RAID-1 (reassemble the array with a 2nd disk) and not using the new disk to copy data over from the remaining RAID-1 member and now starting to implement a better strategy also taking care about data protection (with 2 disks you could use rsnapshot between those for example)

    I will work on it, I need money for RAID 5 or 10 but I will work on it.
    I have backups but not for any datas (ISO's, phone ringtones, wallpapers, drivers, game ROMS and very old video games).
    I will lose wallpapers and maybe, very old video games only.
    The others datas have a backup.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!