Removing MD Raid Drive as part of LVM

  • Hello,


    i have a defect drive in one of my 2 MD Raids. I have to return that drive to manufacturer and want to remove that drive.


    Current setup:
    md0 raid5 with 4x 3TB drives (remains untouched)
    md1 raid5 with 4x 2TB drives (one defect and needs to be removed, not replaced!)


    all together in 1 LVM


    Please, can you help me step by step how to remove one drive out of the md1 ? I have 7TB free out of ~ 13TB, enough space to "work".


    Thank you (help in german also welcome :) )
    Patrick

    • Offizieller Beitrag

    Sorry, I don't have any experience with LVM. You english is just fine :) Why don't you want to replace the drive? While not safe, the array will working with the missing drive until you get a new one.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


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


    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!

  • Sorry had no time to answer your question.


    LVM does not play any role in this. You do not have to migrate any data.


    Simply remove the disk from /dev/md1


    mdadm /dev/md1 -r /dev/sdx


    This will remove the broken disk.


    Then you can remove the disk from the case and RMA it. After you got the new disk, put it in.


    Then add it to the raid with


    mdadm /dev/md1 -a /dev/sdx


    Thats it. Nothing to be done on LVM as your raid layer below is protecting it.


    Also find a good summary here:
    http://wiki.hetzner.de/index.p…ustausch_im_Software-RAID


    What is the reason why you asking about removing a drive instead of replacing it? Yes you replace it - even if the replace takes some days before the new drive will arrive.


    And of cause, if you lose another drive in md1 you will be in trouble. But there is basically not much that you can do on LVM layer.

    Everything is possible, sometimes it requires Google to find out how.

  • Thanks for the replies, i will try this later this week. I received a new disk from WD - replacement for my defect WD Green was a WD Black. Yes, it's much faster but i sold it now because in raid i only have the disadvantage of 2,5x power consumption compared to WD Green.
    Today i ordered a new wd green as replacement and try your inputs.


    The first question reducing the amount of drives was - i planned not to buy an "old" green drive and replace it by a new 3TB WD Red into the other raid 5 setup. But if there are problems doing that i will replace the drive instead removing.

  • i don't know what happened exactly.


    as i plugged in the new harddrive the existing raid was 2 active and 2 spare - one of the "old" ones changed from active to spare as well as the new one. i tried different things to change this third drive from spare back to active but i failed.


    the last step was to create a superzeroed new raid with the existing 3 disks but without success.

  • Hmm, interesting. It looks anywhere between something odd happend and you fixed it in the wrong direction.


    Unfortunately we cannot help anymore. At that point the data is lost and you are dead :(

    Everything is possible, sometimes it requires Google to find out how.

Jetzt mitmachen!

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