Extend Raid 1 storage

  • Hi, could someone give me clues about how to extend the storage?


    Currently I have two 4TB drive in Raid 1. Recently the space is not enough, so I buy a new 8TB disk and hope to have a 8TB Raid 1 storage. That is


    From

    /mnt/sdb (4tb)

    /mnt/sdc (4tb)

    sdb and sdc forms a RAID 1, so available space is 4tb


    To

    /mnt/sdb (4tb)

    /mnt/sdc (4tb)

    new /mnt/sdd (8tb)

    sdb and sdc forms a Raid 0, and then do Raid 1 with sdd, so totally 8tb available



    But I have no experience to achieve it, so some questions need your help:

    1. can this be done simply in web gui?

    2. I guess the idea is to physically remove one of the 4TB disk, then insert new 8TB disk and do sync. Finallly install the removed 4TB disk back and convert those two 4TB disk to Raid 0. is this correct? If possible, please teach me more details. Thanks:)

  • You can not do this through the GUI it is all CLI


    I have never tried it - will spin up a VM now and check - but 99% this will not work as the RAID0 can not be added.


    Will try it and advise back shortly


    Craig

  • Actually i was wrong - have just done it on a Centos 7 and it worked fine


    But it is going to be messy for a beginner and can only really be done if you have somewhere else to copy the data as you set this up.


    I personally would recommend maybe looking at UnionFS or MergeFS etc as a better solution - depending on what you plan on keeping on there


    Craig

  • Hi Craig,


    Thanks for your reply. I have a bit question after reading the description.

    1. Can't I simply copy the existing 4TB to my new 8TB disk and change the type of both 4TB disks?

    2. I am not sure whether it's mandatory to format both 4TB disks if I want to convert them from Raid 1 to Raid 0. (Is there any metadata for Raid to work on those disk? or Raid information is stored on system disk and data disks simply contains data?)


    I am working on Linux everyday so it's fine for me to use CLI but just has no experience about creating Raid.

    If possible, could you share your steps? (commands without description is fine for me)


    Thanks in advanced :)

  • Ok yes you can do it.


    1) Create a Standard partition and filesystem on the 8TB drive

    2) Copy all of your data across from the 4TB drive onto the 8TB drive

    3) Use Gdisk - delete the partitions on your 4TB Drives, create new partitions (slightly shorter than the total drive) make sure you mark them as fd00 (RAID type)

    4) from the CLI create a RAID0 of the 2 x 4TB drive - wait until this has finished creating, then create a new RAID 1 set using the new /dev/md0 device - use the -missing command when you create it

    5) Create filesystem, mount it etc and copy all your data across from the 8TB drive - now at this point you have no protection for your data if either 4TB drive fails

    6) Use Gdisk again and delete the partition on the 8TB drive, create a new partition again mark it as fd00

    7) from the CLI add this drive to the RAID1 set using mdadm

    8) pray nothing goes wrong with the 4TB drives while you wait for this to sync



    Craig

  • Hi Craig,


    Thanks a lot. I referenced your idea and finally extend it recently.

    Here is full commands for others who might need to do in the future.



    Assuming /dev/sdb and /dev/sdc are existing 4TB drive, and we are going to add /dev/sdd which is 8TB drive


Jetzt mitmachen!

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