Menu

Remote Server at Data Center

Help
2012-05-27
2013-06-01
  • P.V.Anthony

    P.V.Anthony - 2012-05-27

    Thank you for sharing this raider script.

    Currently I am hiring a server from a vendor. The server is at their data center. The model of the server is Supermicro X9SCL-F (1U). I suspect it has a uefi. Is there any way to be sure that it uses uefi?

    The next question, is there a way to use raider without swapping the drive from port 01 to port 02 in step 2? I am not sure the vendor would swap the drive for me. This is because they charge for hardware raid. I am assuming that I am eating into their earning with regards to using software raid.

    The data on the server is just the os currently. So nothing to worry about losing data. I just need the software raid to work properly. Safety of the data is the most important.

    Here is the output of "raider --test R1".

    ------------- start -------------------------------
    raider --test -R1


    :: raider version 0.13.0 started
    :: Option: Single disk to RAID 1 (MIRRORING)


    :: Linux distro: CentOS release 6.2 (Final)
    :: Test Status (in lab): Tested successfully
    :: Advice: You may use raider on it!
    :: Disks selected (2):------------------------------------
    :: /dev/sda: Western Digital Model: WD1003FBYX-01Y7B1 Serial: WD-WCAW33455622 (1T)
    :: /dev/sdb: Western Digital Model: WD1003FBYX-01Y7B1 Serial: WD-WCAW33436298 (1T)


    :: /dev/sda partition table type: MBR/msdos
    :: Bootloader found in the boot sector: GRUB
    :: GRUB 1 version: 0.97
    :: Grub configuration file found in /boot/grub/grub.conf
    :: Initramfs generator: dracut
    :: Initramfs generator command: "dracut --mdadmconf --force /boot/initramfs-2.6.32-220.17.1.el6.x86_64.img"

    Everything seems to be ok! Check output messages and logfile.
    You can continue to step 2 running: # raider --run

    -------------- end --------------------------------

    Here is the output of "raider -d".

    ----------------------- start --------------------------
    raider -d
    raider - Version 0.13.0 (Rev: 134)
    List disks:

    Disk /dev/sda - 1T - Western Digital: WD1003FBYX-01Y7B1 - WD-WCAW33455622
    Partition Table: MBR/msdos
    ├──/dev/sda1 - Pri Linux ext3 107MB /boot
    ├──/dev/sda2 - Pri Linux swap / Solaris swap 4104MB swap
    └──/dev/sda3 - Pri Linux ext4 996GB /

    Disk /dev/sdb - 1T - Western Digital: WD1003FBYX-01Y7B1 - WD-WCAW33436298
    Partition table not found
    ------------------------ end ---------------------------

    I need some advice. I hope you can help me with this.

    P.V.Anthony

     
  • P.V.Anthony

    P.V.Anthony - 2012-05-28

    Let me re-phrase this as it does not make sense.

    ----------------- start ------------------
    The data on the server is just the os currently. So nothing to worry about losing data. I just need the software raid to work properly. Safety of the data is the most important.
    ------------------ end -------------------

    to this.

    ------------------ start --------------------
    The data on the server is just the os currently. So nothing to worry about losing data currently. I just need the software raid to work properly. After the raid is working, safety of the data is the most important.
    ------------------- end ---------------------

    Hope it is clearer now.

    Sorry for not making clearer earlier.

    P.V.Anthony

     

    Last edit: P.V.Anthony 2012-05-28
    • MCarreira

      MCarreira - 2012-05-28

      Raider is not able to do it automatically in the present version.
      But if you want to try it, this can be achieved with some manual intervention (editing some files).
      I will post some more information in a couple of hours, when I get near my computer.

       
      • MCarreira

        MCarreira - 2012-05-28

        The model of the server is Supermicro X9SCL-F (1U). I suspect it has a uefi. Is there any way to be sure that it uses uefi?

        I search info about this server and it does not seem to have a UEFI motherboard.
        Anyway! After you installed Centos, raider -d tells that the boot system is MBR (not UEFI).

        Now let's convert to raid without swapping disks.
        This must not be tried in a server with important data (which seems not be the case).

        The first thing is to run raider as root:

        #raider -R1
        

        After raider -R1 has been executed (after some minutes), it tells you to swap the disks.
        But to avoid changing them, we must edit /boot/grub/grub.conf and make some changes.
        Before editing grub.conf, let's add a line to it running this command:

        #grep ^kernel /var/lib/raider/DB/conf/menulst-raid.raider >> /boot/grub/grub.conf
        

        This will add a line to /boot/grub/grub.conf.

        Note: Don't add the line I wrote before, but the result of the command grep.

        Then edit /boot/grub/grub.conf (with gedit or nano) and substitute the old kernel line with the new line we added before.

        Now, in grub.conf, change the line:
        root (hd0, 0)
        with
        root (hd1,0)

        This will make grub to boot from the second disk.

        Now you can reboot.

        After rebooting, you will login as root (you can do it in graphics mode).
        You have booted in raid device in the second disk, and you can check it
        using these commands:

        #df -P
        

        the mountpoint / must be associated with the raid device

        #cat /proc/mdstat
        

        Raid arrays must be running with partitions in the second disk.

        Now edit the file /usr/lib/raider/step3.

        You can do it with gedit or nano

        Comment line 66 to line 85 (with a # in the beginning of each line)

        Add this command in line 86:
        LASTDISK=0

        Don't change line 87.

        Comment line 88 TO line 110.
        Comment line 152 TO 169

        In line 192 change:
        DISK[0]
        to
        DISK[1]

        Now you can run next command:

        #raider --run
        

        When it finishes, everything must be ok (I hope!)

        Reboot the system again. Now both disks must be running in raid 1.

         

        Last edit: MCarreira 2012-05-28
  • P.V.Anthony

    P.V.Anthony - 2012-05-29

    Dear MCarreira,

    Thank you very much for replying and for the detailed instructions.

    I was impatient and just did the normal "raider -R1". Then I just tried my luck and asked them to swap the drives. Guess what they agreed. That was lucky.

    Then I did "raider --run". Took about 187minutes to complete. Then rebooted.

    I am very happy to report that all went very well. I now have a great centos 6.2 running on software raid. Your script was the magic that I needed. It really saved me a lot of time and more importantly, saved me much stress.

    Thank you very very very much for sharing this raider. It has helped me a lot.

    Once again thank you for the detailed instructions. I am sure I will need it in the future. Not ever data centre would have agreed if they know that I was going to be doing software raid.

    P.V.Anthony

     
    • MCarreira

      MCarreira - 2012-05-29

      I'm glad everything worked worked for you.
      Thank's for yout feedback P.V.Anthony.
      In a future version, raider will have an option to run without having to swap disks.
      But first, raider must be more mature and the feedback from users is very important to achieve maturity and fix errors.
      For other users that read the above instructions, I advice them not to use it, because they are only applied to this particular distro, bootloader and partition type. It is only a hack not valid to other systems.

       
  • appp2

    appp2 - 2013-05-19

    I just performed this feat on a remote server and the instructions worked perfectly.

    Thanks for your dedication to this project. Hope you feel better soon!

     

    Last edit: appp2 2013-05-19
  • Steve

    Steve - 2013-06-01

    This worked for me as well! I gotta say, editing that file was pretty hair-raising.

    Still, this is a GREAT utility, I tried to do the remote RAID setup myself and scrambled the server somehow, had to get a re-install. Your script worked great! CentOS 6

     

Log in to post a comment.

MongoDB Logo MongoDB