I have a server running Ubuntu 12.04 LTS with only a single drive. There are 2 more empty hot swap bays in the chassis. I want to add a little redundancy by adding a RAID 1 to the system.

The current single disk was partitioned with ubunutu LVM. The /boot partition is a separate ext2 partition.

The LVM partitions:

I obviously don't want to lose any data, I'm trying to prevent reinstalling the OS and reconfiguring everything. (The machine is used for scientific computations, it has an attached QNAP system for data storage).

When performing read / write operations on /home one of my users was getting I/O errors. I suspect the sata controller was failing, there has been some issues in the past with bad sata cables. I decided to add a SATA controller, and now I'm looking to setup a RAID 1 just in case the errors are produced by a failing hard disk. I am open to more options but I want to replace the possibly failing drive completely with 2 new ones in a raid array.

I am thinking this: Right now I installed 2 new drives into the system that are empty. I am going to configure a hardware raid 1 array on the two new drives. Use either clonezilla or dd and clone the current single OS disk to the raid array remove the original OS disk and boot up to the new array

Would this work? Would I have to modify the /boot partition to be able to boot to the new raid? Not sure if its possible since there are LVM partitions

Thank you, any input appreciated. Also open to other options.

  • I know this isn't exactly the solution your looking for, but I don't see any reason why you couldn't clone your bare metal OS to a VM where the VM host is freshly installed on a RAID 1. Not only would you get the benefits of a RAID setup, but you also get all the benefits of a VM like state-saving and image cloning.... just an idea. – Chad Harrison Aug 29 '13 at 19:47
  • What type of 'hardware' RAID1 controller did you install? Hopefully it isn't a cheap 'fakeraid' controller. Have you already setup the array? Does your installed system see the new drive? Does it see only one new drive, or is it seeing both drives? – Zoredache Aug 29 '13 at 21:48
  • My guess is that what you are describing should work perfectly. A full DD copy of the old drive to the new one should just work, as long as the RAID controller is supported properly. You should remove/disable the old drive as soon as the clone is done. If you are using DD, the UUIDs of the filesystems won't change, so I don't think you would have to do anything to update your /etc/fstab or /boot/grub/grub.cfg files, which is what you would need to do if you were building new filesystems. – Zoredache Aug 29 '13 at 21:53
  • The main reason for this change is due to some file system errors on the old / current drive. Will a dd copy also copy filesystem errors and marked bad blocks? I tried running fsck on the old drive, and it can't get past 1.9% which is when it hits the section of the drive thats damaged. Never completes so I was unable to repair the file system. – Joe deNecola Sep 3 '13 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.