My Raspberry Pi crashed, then my RAID was gone at reboot.

  • I guess I was asking my Pi to do just a little much. I have omv_3.0.51_rpi2_rpi3.img installed on a Raspberry Pi 3. It's not pure omv_3.0.51_rpi2_rpi3.img as I've updates on it a few times.


    Using two external Seagate STEL5000600 drives, I built a RAID1 and started moving all my media to the system. It's been running great for a few weeks, and has appeared to be rock solid. Most of what I use it for is a SMB server to provide shared storage between my systems. Tonight I took it to a new level, and set up an rsync job to backup one of my remote servers. The rsync of 10G wasn't an issue for it, but when i was running a tar/gz to snapshot that rsync, the pi crashed. It felt hot to the touch. I let it cool down, and when it rebooted my RAID1 was nowhere to be seen. The Pi sees the drives, and the partitions, but I can't get a RAID out of it.


    As requested in the sticky thread "Degraded or missing raid array questions":


    Code
    # cat /proc/mdstat
    Personalities : 
    unused devices: <none>






    Code
    # blkid
    /dev/mmcblk0: PTUUID="000b5098" PTTYPE="dos"
    /dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="7D5C-A285" TYPE="vfat" PARTUUID="000b5098-01"
    /dev/mmcblk0p2: LABEL="omv" UUID="5d18be51-3217-4679-9c72-a54e0fc53d6b" TYPE="ext4" PARTUUID="000b5098-02"
    /dev/mmcblk0p3: UUID="fa36508a-b3c4-4499-b30a-711dd5994225" TYPE="ext4" PARTUUID="000b5098-03"
    /dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="90ad1b6d-4dda-49fb-9f51-cbc47c97efac"
    /dev/sdb2: PARTLABEL="Basic data partition" PARTUUID="62d5ea9e-c7df-447e-93e6-fef40ec53719"
    /dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="ac7b8699-c6a8-4cf1-b8c7-f72b3408f6e4"
    /dev/sda2: PARTLABEL="Basic data partition" PARTUUID="75e67b85-d287-4c4e-9648-d7e5bdb823c7"





    Code
    # mdadm --detail --scan --verbose


    When I used gdisk to look at the partition tables earlier it said that my checksum was incorrect, and that I needed to rebuild from the backup copy. I did that, but there was no change.


    Thoughts, suggestions?

  • Progress


    I ran this command:


    Code
    mdadm --create /dev/md0 --assume-clean --level=1 --raid-devices=2 /dev/sda /dev/sdb


    The raid1 was rebuild, and I could mount it again. Whew! Right?


    And then I rebooted the pi, just to make sure the fix was persistent. The raid1 is gone again. No /dev/md0


    I needed to update /etc/mdadm/mdadm.confwith the new UUID


    But... The RAID still isn't there on a reboot. It does come back if I run: mdadm --assemble --scan --verbose
    So, progress. I didn't need to recreate the drive, but I'd like it to be available at boot, right?


    A friend sent me this reference: http://projpi.com/diy-home-pro…raid-array-with-usb-hdds/
    Apparently the Pi has an issue sometimes with booting faster than USB drives become available.


    I added rootdelay=5 to the end of the boot command in /boot/cmdline.txt


    My md raid is back at reboot!!!


    I hope you don't mind my using the openmediavault forum as a sounding board while I worked through what was really a md issue. :)
    I'll leave this here in case it can help anyone else.

    2 Mal editiert, zuletzt von ChrisKnight () aus folgendem Grund: Solving my own problems..

    • Offizieller Beitrag

    Just a few comments...


    1 - I recommend against using raid on an RPi. Too many bad things have happen probably because of the usb issues.


    2 - I would've wiped those drives before creating the array. You still have microsoft partitions on them.


    3 - Using the --create command on an existing array is very dangerous. I would say half the time, people lose data doing that. I would have used --assemble --force.


    4 - Glad it is working for you and it is always good to hear a positive story. Maybe it will help others.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • 1) Fair enough, but then why have the RAID functionality in the RPI image of openmediavault?


    2) I did! When I first plugged the drives in openmediavault raid creation tools didn't even see the drives. I had to 'dd if=/dev/zero of=dev/sda bs=8k count=10000' and then I could create the array. I think those partitions being there are a result of me trying to fix the array by following gdisk's suggestions and rebuilding the partition table from the backup. fidsk and gdisk are back to saying the "primary GPT table is corrupt" so I think running the create stomped on those erroneous partition entries.


    3) Needless to say, I didn't put in my post every little thing I tried. I tried a half dozen variations of --assemble --force commands, all with the result of 'missing superblock'. The only way I could re-create that was with --create. Let me tell you, I was not feeling confident when I issued that command.

    • Offizieller Beitrag

    but then why have the RAID functionality in the RPI image of openmediavault?

    Because I don't want to create/maintain a custom OMV package. And it is just a suggestion. raid works on the rpi but it is slow and has issues. I don't like raid on usb devices on any platform.


    I was not feeling confident when I issued that command.

    I never feel confident when I tell people to use that command (happens very rarely).

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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