Linux RAID-1 [2]

Well I have started on this having left it all week, it is now time to get the main computer set up to make this happen. As noted in my previous posting I am using this guide, although it has a different scenario for relocating /home in mind:

So making the backups was the first step. The regular backup from the Win7 PC was run with access to MainPC via Samba over the house network. Then a separate backup was made with a Ext4 formatted removable disk using the rsync command. This took an hour or three to copy 300 GB of data. At the moment it is actually moving towards live stage with another copy of the same data being made onto a second removable disk that is mounted as /media/patrick/newhome, with its own entry in /etc/fstab to remount it at each boot up. Once that copy is completed then the next step is to mount the removable drive as the new /home by changing /etc/fstab again. Then with the original disk now not required then I can move from there to set up the new RAID-1 array with the pair of disks as it was always meant to be. Life is a bit simpler on both my PCs because they each have a separate 120 GB SSD for the operating system and swap partition(s) which is not part of the software RAID-1 arrays, because booting off such an array can be difficult if not impossible to set up.
After relocating /home was completed the next step was to do a diff to see that the copying was exact. Oddly the diff command put out several messages about recursive directory loops. Probably these are due to symlinks that point in circles or something. Most of the other errors like no such file or directory are probably from dereferencing links that don’t yet point to anything.

From there I moved to mounting the new home drive as the actual home drive and then rebooting. Before doing this I ran the rsync command again, after stopping the diff command because there were too many issues reported. Things looked good and the system came back up with its new home drive and things seemed to be working well so I decided not to wait to see if any problems would show up from shifting the home partition, but to press on right there and then and set up the RAID array.

Following the same steps as in the test system I installed MDADM and followed the steps to create a RAID-1 array. Things however haven’t gone quite to plan and these last paragraphs are being written from the test system rather than MainPC. Even though the creation of the RAID-1 array looked OK, attempting to mount it would produce issues like saying dev/sda1 (the original home drive) was in use or the new mount name was busy. I decided to press on and reboot the system but then the normal startup stopped with an error about serious problems with /newhome, the mount point of the RAID-1 volume. It’s apparent that this sort of problem will simply stop startup of a Mint system in its tracks; there is no error recovery for this scenario (like ignoring the mount because the volume isn’t needed to start the system!) so as in my case it stops dead. Because I had not succeeded in getting /newhome to mount, there was no data on it and /home is running nicely on the spare disk in the removable bay, so /newhome was not an essential mount point for the system.

This means I now have to use a LiveCD/USB to start the system to a shell in order to comment out the line in /etc/fstab relating to the mount of newhome. I also realised after reviewing the steps I did with the test system that I forgot to check the modules were loaded into the kernel for RAID support. So the third post of this series (I thought there would only be two parts!) will be reporting on the subsequent steps needed to get the system started and the RAID fixed up and made operational. Due to issues with the NVidia card and built in Nouveau drivers (the ones I don’t use in the GUI) the regular LiveCD/USB startups are hanging (something like the first boot experience I had with this system) so I need to do some research to be able to force a text mode startup. Back soon I hope…