Why is my RAID array not active?

  • I have a RAID6 and it is not active. I had 6 disks and added a 7th one. I did grow the array and reshaping was finished. After rebooting the last disk was missing, the array was not active and I could not access SSH or Web-GUI. My OMV4 is on a seperate disk! I try to find out what's wrong.


    I added the missing disk with mdadm --manage --add /dev/sdx.


    The "new" disk showed up as spare and this triggered an automatic rebuilt.


    After rebuilding I rebooted and got to step 1 where the array was inactive and the disk was not part of the array.


    Now I have some questions.


    1 - Is it possible that my OMV configuration is somehow broken and that would cause the Web-GUI and SSH not to be availabe?
    2 - Is it possible that the last disk has errors that could cause this? It had several pending sectors and I copied it full so all of them where corrected and then the SMART status was green again and no error came up on short test.
    3 - Why is the array not starting as degraded with one missing disk then?
    4 - Is it possible that the last disk still has a filesystem EXT4 from previous usage and that this is causing the problem upon startup?


    (Yes, I will change from RAID to snapraid as soon as possible.)

    • Offizieller Beitrag

    Have a look at this it might be helpful.


    The error regarding the array should not prevent the GUI from running nor disable SSH, there could be a problem with OMV itself, but what I couldn't say.
    When you added the disk I take you didn't wipe it via the GUI before adding it to the array?

  • Yes, I had a problem adding it via GUI. I put a filesystem on it and made a samba share to check the disk out. Then I removed the samba share and tried to add the disk. I could'nt add it in the GUI. I tried to delete the filesystem for that disk in the GUI but I think this also failed.


    In the end I added this disk to the array via command line. The GUI (and command line) then showed a reshaping. This was finished and I checked this both in command line and also in GUI. The state was clean, 7 disks where on it and the size was increased to 13TB from 10 TB.


    BUT I still had the entry for the EXT4 filesystem for the added disk in the GUI. I suppose GUI and command line where not in sync. I was unsure if this was just a cache problem so I shut down (or rebooted) the server and cleaned my browser cache.


    Upon reboot I could not access via Web GUI.


    I just checked all my disks again. Despite I added the last disk yesterday manually and it rebuilt the array this disk does not show up in the array after a reboot and with blkid I see that the disk has a label "SDH" and filesystem "ext4" which I gave to it before adding to the array.


    I now think about wiping this disk and then adding it again.


    I also think about what should be the right entry in /etc/fstab for my array. Maybe fstab got changed from gui or command line and that's why it does not mount on startup. But that's nothing I have thought about a lot.


    Since I cannot login via SSH I am "unable" to post more details.


    It would also be interesting how to start the omv overall from command line.

    • Offizieller Beitrag

    What you need to is to wipe that disk before adding to the array, this thread might be of some help, but as to your GUI and SSH problem I don't know, what you could try is unplug your raid then just boot the server from the o/s drive and see what happens.


    If you do that there will be a 1.5 min delay whilst the boot process tries to locate your array, which it won't but will continue, then you can test SSH and GUI login again.

  • Thanks for the link to the discussion about RAID. I can confirm that my OMV RAID6 is in an inactive state now but it had been in a degraded state once already, when a disk failed while the system was up. So everything you discussed in the other thread is pretty accurate. (Also, I now understand that RAID is probably not what I need or want, but what is missing is a clear voice of what else would fit (probably Snapraid) and how to set it up from having a RAID in OMV.)


    BACK TO MY PROBLEM:


    I unplugged all 7 array disks, booted from a gparted-live flash storage and did


    fsck -f /dev/sda1


    This gave no errors.


    I have another partition /dev/sda5 which is the swap. Nothing else on the OS's drive. Fsck on /dev/sda (not the partition but the whole drive) gives a message about a bad superblock but I think this is normal since the relevant thing should be the partition, right?


    So I am pretty sure the filesystem for openmediavault is okay.


    This leaves only one option: The OMV4 installation itself is broken.

    • Offizieller Beitrag

    This leaves only one option: The OMV4 installation itself is broken.

    Could well be if you have already tried to boot from the SSD and you still have no GUI or SSH.


    You could probably move down the SnapRaid, something that I have been looking at along with the union file system plugin, But to that it would backing up and starting again, at least that's my understanding but I may be wrong, but clean drives with a clean start makes sense.


    There is a SnapRaid howto here.

  • Yes, I booted from SSD and every time I am stuck with emergency mode. I tried to update/upgrade the system there and got a new kernel but that did not change anything.


    I probably have two problems here: The OMV is not okay and my 7th disk doesn't stay in the array.


    Snapraid: I would buy 2 large disks, add them as Snapraid in the OMV GUI and then transfer the data from my RAID to that Snapraid-array. This would be my favorite approach.

  • I installed a new OMV and deleted the filesystem of my 7th disk in the Web-GUI. It is now not any more appearing in the GUI for file systems.


    But fdisk -l still shows a partition with a linux filesystem on that disk. Does "wipe" mean I have to press it under the GUI for hard disks? Will only this really wipe a disk? Or will this make the disk not any more appearing in the GUI for hard disks?


    EDIT: I now wiped it with this option under the GUI for disks. Obviously this is the right thing to do.


    I could also use mdadm to partition my disk with the same partition of one of the other working arrays. But I still wanted to know what to do in GUI.


    (I tried to put the partition of my first array disk onto the 7th with sfdisk -d /dev/sda /dev/sdg according to here, but I get the error that "/dev/sda does not contain a recognised partition table".


    I now used parted to delete the partition and the label. Do I have to put a new partition on the disk?)


    Now, a question would be how to re-establish an existing array via GUI. mdadm -D /dev/md127 shows my array inactive with 6 out of 7 disks. But in the GUI there is no hint of this.

    • Offizieller Beitrag

    Does "wipe" mean I have to press it under the GUI for hard disks?

    Wipe in the GUI will wipe any signatures on the disk, you can then add it to your array, but I would add the disk via ssh. Without searching the forum I can't remember if you have to stop the array first then add the disk, which will probably be added as a spare then grow the array.


    Edit: After you wipe the drive you should be able to 'grow' the array from the GUI by selecting the new drive.

  • Stopping the array will make it disappear (from /dev/md127). Then it is not possible to add a disk any more.


    I used mdadm --assemble --scan (after stopping it) and then added the disk.


    The GUI did not know about my (inactive) array. So I could not grow it there. I think this was because it was inactive. Now, that I started it again by assembling and adding the disk it is also in the GUI.


    Thanks a lot for your help today! I learned a lot.


    (I will have to look forward to finishing the reshaping to make sure the 7th disk will stay in the array this time!)

  • My array is perfectly in order now. So my OMV was messed up.


    One thing to add: I think I might have not grown the filesystem in the GUI before. I think I added the 7th disk (as spare) in command line, then reshaping began and was finished. But I did not grow the filesystem (because I had no GUI at that moment). And then after reboot the array was missing this disk again. I wondered why.


    I think the missing filesystem is the reason why the old GPT table (because I did not wipe) on it confused mdadm upon next startup.


    EDIT: The right thing to do on command line after successfully reshaping would probably have been this:


    mdadm --grow /dev/md127 --size=max

    • Offizieller Beitrag

    I think the missing filesystem is the reason why the old GPT table (because I did not wipe) on it confused mdadm upon next startup.

    I would guess that was the case, it's always wise to wipe a disk that way everything should just work, but at least you identified that is was a corrupted OMV and it's now back working. :thumbup:

Jetzt mitmachen!

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