HDD Device ids are mixed up

  • Need some help before I make this worse please.


    I physically added some HDDs to my server today and upon power up the drive ids of the existing drives were incorrect. I have since disconnected the new drives but I am still having problems.

    I have the OS on a 120GB SSD and 4 2TB data drives in Raid 5. I (obviously) need to recover the RAID array get my data.


    This is the configuration before the problem.









    This is what I have now. Note that File System data is also mixed up.





    If I disconnect the 4 data drives the OS drive is /dev/sda. If I reconnect the 4 data drives it moves the data drive to dev/sde. The cabling has not changed. Please help me normalise the situation before I re-attempt connecting my new drives.

    • Offizieller Beitrag

    Devices are named by udev and the kernel based in first come first serve. This means that /dev/sda can become /dev/sdb or /dev/sdX after a reboot or plugging new devices. This is only a visual thing because internally OMV is using predictable device names because of exactly that reason you see right now. Device names like /dev/sdX are not predictable.

  • The RAID is degraded because one disk is missing. MD should not take care about the device names because it scans the devices for metadata on startup.

    Thank you. The four disks that are part or the Raid are listed on disk screen in the GUI. They are now dev/sda sdb, sdc, sdd. What's the correct process to recover from this?


  • Code
    root@openmediavault:~# blkid
    /dev/sdc: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="8a0d3006-e460-91                                                   fa-4331-0d1cba174bb1" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sda: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="ebca366d-84ed-77                                                   09-4aaf-83aaaaf356b3" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sdd: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="5f518e47-ee41-ea                                                   87-683e-1d4d8b859b39" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sde: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="26d0739d-6d84-f7                                                   d9-4af2-6b4d8950d322" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sdb1: UUID="a8f206e8-92b8-43fe-a5b9-7fd3a58dba34" BLOCK_SIZE="4096" TYPE="e                                                   xt4" PARTUUID="c0477fe9-01"
    /dev/sdb5: UUID="a69ea4ac-0d3d-4c7d-8724-1403c2955695" TYPE="swap" PARTUUID="c04                                                   77fe9-05"
    /dev/md127: LABEL="Vol0" UUID="0ed1d785-1052-4684-8ff0-3fd868c09cd8" BLOCK_SIZE=                                                   "4096" TYPE="ext4"
    root@openmediavault:~#

    Einmal editiert, zuletzt von barrydick () aus folgendem Grund: power cycle

    • Offizieller Beitrag

    Thank you. The four disks that are part or the Raid are listed on disk screen in the GUI. They are now dev/sda sdb, sdc, sdd. What's the correct process to recover from this?



    Code
    root@openmediavault:~# blkid
    /dev/sdc: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="8a0d3006-e460-91                                                   fa-4331-0d1cba174bb1" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sda: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="ebca366d-84ed-77                                                   09-4aaf-83aaaaf356b3" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sdd: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="5f518e47-ee41-ea                                                   87-683e-1d4d8b859b39" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sde: UUID="940050c6-21c4-9b95-5f99-f61b6f06e88b" UUID_SUB="26d0739d-6d84-f7                                                   d9-4af2-6b4d8950d322" LABEL="MediaServer:ARY0" TYPE="linux_raid_member"
    /dev/sdb1: UUID="a8f206e8-92b8-43fe-a5b9-7fd3a58dba34" BLOCK_SIZE="4096" TYPE="e                                                   xt4" PARTUUID="c0477fe9-01"
    /dev/sdb5: UUID="a69ea4ac-0d3d-4c7d-8724-1403c2955695" TYPE="swap" PARTUUID="c04                                                   77fe9-05"
    /dev/md127: LABEL="Vol0" UUID="0ed1d785-1052-4684-8ff0-3fd868c09cd8" BLOCK_SIZE=                                                   "4096" TYPE="ext4"
    root@openmediavault:~#

    It seems you've rebooted the system in the meanwhile because the output of blkid does not match the output of mdadm anymore. Please post cat /proc/mdstat and mdadm --detail /dev/md127, too.

  • Bash
    # mdadm /dev/md127 -a /dev/sdc
    Code
    root@openmediavault:~# mdadm /dev/md127 -a /dev/sdc
    mdadm: added /dev/sdc


    ok. Thanks I've done that. The GUI shows its busy adding that drive.

    Working on the assumption that fixes the RAID, I take it I'm ok to power down and add my new drive(s) afterwards?

  • votdev thanks very much for your great support. Your solution worked but unfortunately the RAID array became degraded again about a day later so it seems I have a hardware issue to deal with. The good news is that I managed to backup my data so its no longer urgent. Thank you again.

  • barrydick

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

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