Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Make clone of Debian


    I have one physical server running Debian 5 and i would like to upgrade it to 6. Before I will launch upgrading procedure I need to be sure that everything will be OK. From this reason I wanted to do image of the disk and run it under virtualization to perform dry run.

    The physical server have 2 HDD configured as software raid 1.

    # cat /proc/mdstat
    Personalities : [raid1]
    md3 : active raid1 sda4[0] sdb4[1]
          108326208 blocks [2/2] [UU]
    md2 : active raid1 sda3[0] sdb3[1]
          979840 blocks [2/2] [UU]
    md1 : active raid1 sda2[0] sdb2[1]
          7815552 blocks [2/2] [UU]
    md0 : active raid1 sda1[0] sdb1[1]
          96256 blocks [2/2] [UU]
    So the question is how to make a clone of this debian to be able boot from single non raid volume in virtualization.

    I decided to make image using dd of one of the member disk, because they should contain identical partitions and data on it. Then recover image under virtual machine to its virtual disk. After restoration I tried to boot virtual machine. But Grub reports error 2 in stage 1.5 which means that selected disk doesn't exists.

    Any advices?

  2. #2
    The problem is that the /boot configs are still looking for RAID. Entering rescue mode to correct all that, updating grub and initramfs, etc is just too much work. Using clonezilla as primary backup and an rsync tool like luckybackup should give enough security as to not losing anything. Clonezilla will restore machine as it is, and in that <1% chance it fails, you can reinstall and use rsync copy with CRC verification to manually restore. It is good practice these days just to setup server in VM that way you can just migrate a copy or take a snapshot.

  3. #3
    Just Joined!
    Join Date
    Nov 2011
    New Zealand
    Back in my Windows days before virtualisation was even though about I use to get another hard drive, same type and size, pull out the first drive in the RAID 1 array and replace it with the new drive. I then let everything sync up again and did the upgrade. If it spat the dummy for whatever reason I still had the first drive from the original array so I would pull out the two current drives, put my "saved" drive back in and boot off that to get the server up and running again, add one of the other drives back in to synch and scratch my head wondering what went wrong during the upgrade - come back with a strategy and repeat until successful.

    Only had to do it once but it saved the day! As said, make sure you have good backups too cause that'll save your bacon if it all goes pear shaped.

    Must admit, never done it with a Linux box before so will have to give it a go and see

  4. $spacer_open
  5. #4
    Thank you jj3666 and nixblog,

    Both suggestions require presence in server room. Data center is 100 km away from our office and there is very noisy and cool environment. If I go there I need to be perfectly prepared with 100% scenario. As you can imagine visiting such data center is not like walk in the tree avenue with nice girl. Another fact is that the server is in production so I have to tell clients about outage before.

    Because all of that i prefer to do image remotely. Making backup with one drive from RAID1 is good idea which I've also considered, but again. I will do this as I will have 100% working scenario to don't spend more time in data center as required.

    I don't have any experience with Clonezilla. I'm going to get some... I just read some basics about it and there is either Live CD / USB or server edition. I presume that Live version would be the solution to make image and then restore in to Virtual Machine. At this moment I can't imagine how to avoid problems with boot config, initramfs etc. Can you please describe procedure with more details?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts