Arranging the pieces

How I moved Debian non RAID boot / to RAID1 with No Data Loss

My home server has grown over the years to be as large as some office servers and larger than others. AfTer a recent loss of a hard drive and all data I moved all data to RAID10 and am moving all boot/os files to RAID1.

System info

AMD FX-8370 Eight-Core Processor Clocked @ 4.34ghz

32G of RAM

Dual Gigabit Network cards one for the video cameras one for general use

Dual 3Ware RAID cards - 1 for RAID10 and 1 for RAID1

1TB of data storage in RAID 10 - All web content, custom software, software sources, MySQL data is stored on this drive.

1TB mounted on / for OS and other storage in RAID1

3TB mounted on /var/event for video storage

2TB available for backups and general use on network storage

Debain 7.8 as the base operating system. Many packages the list is here installed-packages.txt. Zoneminder has been installed from source building with the debian build system and tweaking some source to remove some irritating “features”

Onwards to the RAID1 Install

  1. Install Raid Card and drives
  2. Build bootable raid in BIOS of raid card
  3. Create / and swap partitions on new drive
  4. rsync / to the new drive
    • rsync -aAXv –exclude={“/var/www/*”,“/var/lib/mysql/*”,“/var/www/*”,“/var/event/*”,“/dev/*”,“/proc/*”,“/sys/*”,“/tmp/*”,“/run/*”,“/mnt/*”,“/media/*”,“/lost+found”,“/backups/*”} /* /mnt
  5. Update /etc/fstab with new UUIDs
  • Old Drive

sda1 e3718f53-87db-41eb-8a16-6fe7ead3fa74

sda5 6ea43f87-35c0-4402-a213-92149bf78c53

  • New Drive

sdc1 e302df78-76e9-40f2-8ea4-524a0fdfeaa1

sdc2 6a7cc5a7-017f-4c16-b332-3e25bd5da071

Update Grub conf with new UUIDs and install boot sectors

  1. Edit /mnt/etc/fstab replace UUIDs
  2. Edit /mnt/boot/grub/grub.conf replace UUIDs
  3. Shutdown and unplug the old drive for safe keeping
  4. Boot from http://sourceforge.net/projects/boot-repair-cd/files/ install the new drive boot sectors. This I think is the simplest method, I selected Auto Repair and pastebin-13683023.txt is what the boot CD did.

I am now on the new boot drive. This procedure appears to have been a success. Time will tell if there are missing objects on the system. I can tell now that the system appears to be stable with no missing data. All software is up and running normally.

=)

Print/export
QR Code
QR Code non-raid_to_raid1:start (generated for current page)