Imaging a Linux box that has 2 RAID Arrays

Posted on 2005-04-08
Last Modified: 2010-04-20
Hi guys,

Any help appreciated.

I have a linux box with 2 RAID arrays set up.
Disk 1+2: RAID 0
Disk 3-6: RAID 5

I want to be able to do this:

1)Make an image of my Linux O/S eg.ghost?
2)How do I do this with a RAID setup?
3)What would be the procedure for not only creating the image, but the restore process?

Thanks in advance.

Question by:Simon336697
    LVL 38

    Accepted Solution


    1. Create a boot floppy for restore process.
    As root:
    mkbootdisk /dev/fd0 `uname -r`   <== For RedHat/Fedora
    ---Create GRUB boot floppy:
    fdformat /dev/fd0H1440
    mke2fs /dev/fd0
    mount -t ext2 /dev/fd0 /mnt/floppy
    grub-install --root-directory=/mnt/floppy '(fd0)'
    cp /boot/grub/grub.conf /mnt/floppy/boot/grub/grub.conf
    umount /mnt/floppy

    --- Create LILO boot floppy
    fdformat /dev/fd0H1440 # Lay tracks on new diskette
    mkfs -t minix /dev/fd0 1440 # Create minix file system on floppy
    mount /dev/fd0 /mnt/floppy # Mount floppy
    cp -p /boot/chain.b /mnt/floppy # Copy chain loader
    cp -p /boot/boot* /mnt/floppy
    lilo -v -C /etc/lilo.floppy # Install lilo and the map onto floppy
    umount /mnt/floppy

    2. Use newer verion of Ghost, which have support RAID card driver, to do disk image (option "disk to disk" -> "image all").
    Or create a image file (too big to fit into CD, I think) on disk.

    3. Boot the machine with the image drive.
    Or restore to another drive and boot from the drive.
    If the boot loader fail, then use the boot floppy you just made to restore boot loader.
    (As root)
    grub-install /dev/sda1
    cd /etc; lilo -f /etc/lilo.conf

    I recommend you only do image on the OS disk (RAID 0 or RAID 1/mirror ?)
    The data disk just restore from the tape backup or some other backup media.

    If your OS disk is on mirror (RAID 1), then you just buy another same model disk and replace one.
    The old is the image.
    LVL 1

    Author Comment

    Hi wes!

    Gosh youre a legend!

    Can I just clarify something mate please.......
    Basically Im pretty new to this.
    Ive been asked to come up with a solution for us if our server goes down.

    Im confused about this because I cannot see in what situation you need to make an image of the RAID 1 disk because if 1 disk fails, then we still have availability through the other RAID 1 disk.

    Q.Is this correct that the server wont go down if one RAID 1 disk fails?

    Q.Do you guys or is it good practice to image the system disk eg.the RAID 1 disk for disaster recovery? Even though you still have availability if one disk fails? Whats the point in imaging a RAID 1 disk?

    - The RAID 1 disks are each 140GB
    - The 'linux' version we are using is VMWare ESX Server 2.5

    Q.If a RAID 1 disk goes down, should we still be able to function until we get the faulty disk replaced?

    Q.With the 3 steps you outline above,
    Is step 1 basically if you cannot boot?
    With step 2, are you first booting from a floppy that contains the ghost program? Is this the floppy that was created in step 1?

    Thanks so much for your help wes.


    LVL 87

    Assisted Solution

    With raid1 normaly there is no problem if one disk goes down. A reason to use raid for this might be the following:

    Some software error (virus, missconfiguration etc.) might cause even a raid 1 system not to function anymore, If it was backed up (using an image), that version could be easily restored.

    Mainly its just that even if you are using raid, you still need a backup, as raid mainly protects you from hardware errors and not from software errors.
    LVL 38

    Expert Comment

    A1. So you are using RAID1, not RAID 0. Yes. Just need a spare same model disk to replace the bad one (the LED
    indicator will tell you which one is bad).

    A2. RAID1 give you high availability, which your server is still running while one of disk fail.
         Backup or image covers you DRP (Diaster Recovery Plan), in case the side down and you have the image/backup
        to restore on other site in order for business continuity.

    A3. Yes.

    A4. Boot floppy for the situation that your disk image doesn't boot.
        Ghost tool gives you faster image procedure and clone to different size of disk or to a disk image file.
        It is separate floppy which you need to buy the software license.
        Ghost is not the floppy from step 1.
    LVL 12

    Assisted Solution

    What do you want to do with the image? If you're looking for a simple backup of your system in case the hardware fails, you could use systemimager ( It's not a trivial setup, but it does work pretty well once you're up and running.
    LVL 1

    Author Comment

    Thanks guys!!!
    LVL 87

    Expert Comment

    thanx, too.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now