A note on storage upgrade switchovers using external USB drives
So, I just finally finished a hard drive upgrade (3x1TB -> 3x4TB) where I'm using gpt partitioning, UEFI booting with grub2 (located on the EFI partition), and a large raid-5 with lvm on top for / and a data storage partition.
Ran into a couple fun things in the process.
First, grub2 is buggy as shit. So I had to move /boot into a separate partition (luckily I left room for it) because even though grub2 could read the old raid5+lvm, it couldn't access the lvm in the new raid5. Why? no idea. My old system was (mostly) happily loading kernels and ramdisks from /boot on the root partition (via raid5/lvm), but this didn't work out so well on the new setup.
So, I move all the /boot stuff into a new 896MB RAID-1 mirrored across all the disks. I finally get the grub configuration set up close enough that I can coax it into trying to boot, and then I find out that genkernel's initramfs can't access USB storage. Why? Again I have no idea. All the relevant modules seemed to be loaded, and I found some other references to the problem on google, but no solution. So I figure, close enough, I'll just swap the drives in and it should work.
This brings me to the next problem: The BIOS wouldn't even attempt to boot like that (even though it would boot from those drives over USB).
I fire up system rescue CD from a USB drive, and pretty quickly I figure out the problem. The USB enclosures were remapping to a 4096 byte sector size, and the partitioning goes by sector counts. So, with a different sector size, nothing lines up, and in fact the GPT partition table isn't even visible.
Luckily I made all my partitions line up to memorable positions, so I could recreate them from memory, and finally the BIOS sees what it needs and I can coax grub into loading the 2nd grub.cfg and hack some menu entries to make it boot my system (I'll sort that mess out later).
So, if anyone else is in the process of upgrading storage using external drives for part of the switchover, maybe some of this info would be helpful...
Posted Dec 21, 2014, 7:32 AM UTC
This is a bit off topic, but if that data is important to you, you should be doing raid 6 with drives at that size.
Your chances of an unrecoverable read error during a rebuild with disks that size is WAY higher than you would think, especially if you are not using enterprise drives. Just FYI, your chance if successfully rebuilding us only 38% with 3x4TB using standard desktop drives.
I'm not worried - I will periodically check drive readability (read out entire contents of each component drive). If any issues come up I'll deal with it. I've seen this concern raised but I've had my 3x1TB array rebuilt about 15 times (some bug causing a drive to go out of sync at reboot) and haven't had a problem. By that 38% statistic, I should have had a problem on my smaller array by now.
In fact I just badblocks'd each drive overnight and it was okay. I really think something got lost in the shuffle in calculating the average uncorrectable error rate.
However, that in mind, there is a typical pitfall - let your array run continually without a periodic scrubbing and I could see where those problems come in: If the magnetic domains are a little unstable, one might imagine bad blocks showing up occasionally and not becoming apparent until the rebuild attempt if a periodic scrub isn't performed (which the drive should do itself during read unless they programmed it like jackweasels). If they didn't do that correctly, I should notice issues appearing before some massive data loss sets in.