Raid 5, 3 HDD's, clean degraded

  • Hello guys,


    setup:

    /dev/sda SSD --> OS

    /dev/sdb HDD 14TB

    /dev/sdc HDD 14TB

    /dev/sdd HDD 14TB


    sdb, sdc and sdd are/were one RAID5

    Raid is /dev/md127


    I had to reinstall OMV 5. For reinstall I pulled out all SATA cable of HDD's. After install I put back and configure my system. Now I get messages:



    When I do mdadm --detail /dev/md127:


    In the WEBGUI I see all disks. In S.M.A.R.T. all disks have a "good" status.

    When I try RAID --> Recovery I see the missing /dev/sdd in the menu, but when I try to recover it:




    I don't think that the disk is dead, but I don't know how to go on. Any idea what to do?

    To buy a new disk is not that cheap :/

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • mdadm --manage '/dev/md127' --add /dev/sdd 2>&1' with exit code '1': mdadm: Failed to write metadata to /dev/sdd

    The above is probably due to this:

    md127 : active (auto-read-only) raid5 sda[0] sdb[1]

    the array is in a read only state


    try mdadm --readwrite /dev/md127 then try adding /dev/sdd

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

  • Hi Geaves,


    Code
    mdadm: failed to set writable for /dev/md127: Device or resource busy

    :/


    edit:
    With SMB I have access to the raid/shared folder. I can read & write

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

    Edited once, last by Darcu ().

  • Hm, stop the array mdadm --stop /dev/md127 then run the readwrite

    Code
    mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, moun                                   ted filesystem or active volume group?

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • Code
    mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, moun                                   ted filesystem or active volume group?

    I found this: https://superuser.com/question…mdadm-to-stop-raid5-array


    It is written that it may be a problem with SAMBA or users. I had no SAMBA access while using "mdadm --stop /dev/md127". Then I look into my WEBGUI. I have three users. When I go to my shared folder --> ACL



    I do not know: What is Group 1000? Is it normal? I can't find it in users or groups.


    Should I delete every user to stop the array and set readwrite?

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • Darcu

    Since you don't post the command:

    Are you running them as root?

  • cat /etc/fstab


    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • Darcu

    Since you don't post the command:

    Are you running them as root?

    yes,


    logged in as root


    e.g.

    Code
    root@MEDIASERVER:~# mdadm --stop /dev/md127
    mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • so using that link as a reference, which would have been the next step;


    umount /dev/md127

    mdadm --stop /dev/md127

    mdadm --readwrite /dev/md127


    then add /dev/sdd back using recover, then mount the file system

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

  • When I try to umount as root I get:

    Code
    root@MEDIASERVER:~# umount /dev/md127
    umount: /srv/dev-disk-by-uuid-6eb513cb-8151-4ec9-8f71-b3e518b31255: target is busy.


    When I try to log into SSH not as root (other user with all rights) and try umount /dev/md127 I get


    Code
    $ umount /dev/md127
    umount: /srv/dev-disk-by-uuid-6eb513cb-8151-4ec9-8f71-b3e518b31255: umount faile                                      d: Die Operation ist nicht erlaubt.

    Usually when I am logged in via root it is


    Code
    root@MEDIASERVER:~#

    but now it is only $


    I think I have to move to any directory, but I am too stupid :/

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • root@MEDIASERVER:~#

    logged in as root that is how it should be.


    Ok if I go back to your first post and my reply, the reason mdadm cannot write metadata to the drive you're trying to add is because it's in an active (auto-read-only) state, the output from cat /proc/mdstat.


    Everything I have got you do so far should have worked, even if SMB and docker are running you should be able to change the 'state' of the array, but in your case it fails, that would suggest that something is accessing the array.


    My only thought therefore is to disable smb and click save (all the shares will remain) then run systemctl stop docker this stop docker and any containers, then try mdadm --stop /dev/md127 if the stop fails go back to post 13

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

  • first of all: Thanks for your fast replies!


    I disabled SMB


    Then i tried to mdadm --stop... and stopped docker. I didn't install docker so far. So couldn't loaded.


    Code
    root@MEDIASERVER:~# mdadm --stop /dev/md127
    mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group                                 ?
    root@MEDIASERVER:~# systemctl stop docker
    Failed to stop docker.service: Unit docker.service not loaded.
    root@MEDIASERVER:~# umount /dev/md127
    root@MEDIASERVER:~# mdadm --stop /dev/md127
    mdadm: stopped /dev/md127
    root@MEDIASERVER:~# mdadm --readwrite /dev/md127
    mdadm: error opening /dev/md127: No such file or directory
    root@MEDIASERVER:~#

    umount and stop seem to work, but now it can't find the directory

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

  • That's interesting because it doesn't show /dev/sdd in the output of blkid and it should do.


    Ok this will be a first :) try mdadm --readwrite /dev/md/MediaServer:RAID

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

  • :'(

    Code
    root@MEDIASERVER:~# mdadm --readwrite /dev/md/MediaServer:RAID
    mdadm: error opening /dev/md/MediaServer:RAID: No such file or directory



    edit:

    OMV5: Fractal Design Node 304 - ASRock J3455 ITX - 16GB DDR3 - 400 Watt be quiet! - 32GB SSD - 3xWD Red Plus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!