megacli lost virtual disk raid configuration

7,920

Ok. so i managed to save my data. It seems that megacli doesn't provide a way to create a new virtual disk without initializing it and losing all the data. I rebooted the machine and entered the raid configuration utility hoping that i would be able to do it from there. Sure enough in the VD settings tab i created a new disk group and then i added the disks that were unconfigured. it has an option to initialize them , but left that unchecked. after a warning that this should be done only in recovery cases, it created the group and upon reboot everything was fine, apart from the disk UUID having changed. updated fstab with the new one and all is now fine. Thanks.

Share:
7,920

Related videos on Youtube

ramrunner
Author by

ramrunner

unix(openbsd,plan9) lisp

Updated on September 18, 2022

Comments

  • ramrunner
    ramrunner almost 2 years

    I've been running centos on x64 with an LSI raid controller

                description: RAID bus controller
                product: MegaRAID SAS 1078
                vendor: LSI Logic / Symbios Logic
    

    i was trying to delete one of my 6 virtual disks with megacli64 . the vd was 0. so i run:

    MegaCli64 -CfgLdDel -L0 -a0
    

    and it said:

    Adapter 0: Deleted Virtual Drive-0(target id-0)
    Failed while adding the configuration to OS.
    

    being ultra stupid in my confusion i rerun the command and noticed that my vd 1 (target id-1) was gone too. By checking the configuration i found the Enclosure:Ids of the disks involved in my vd1 that got deleted too. Is there any way to recreate the virtual disk without losing the data in the disks? from the megacli manual i couldn't find a way to retag.

    Thanks you all so much!

    edit: in addition i'm trying to save the config then edit it and restore it but cfgsave fails

    MegaCli64 -CfgSave -f raidconfmissingdrives -a0
    Failed to get config data.
    Exit Code: 0x01