Category Archives: ubuntu

LVM + RAID1 = Perfect solution to upgrade woes

As said before, I’m rebuilding an old system and have run into sneaky issues. In trying to upgrade from Ubuntu 12.04 to 14.04, it ran out of disk space at the last minute, and retreated to the old install. Unfortunately, this broke its ability to boot.

Digging in, it looks like Grub 2 (the newer version) can’t install itself properly due to insufficient space at the beginning of the partition. Booting up from the other disk drives (from a different computer), I have dug in to solve the problem.

How do you repartition a disk drive used to build a RAID 1 array, that itself is hosting a Linux Volume Group?

It’s not as hard as you think!

raid1A mirror RAID array means you ALWAYS have double the disk space needed. So…I failed half of my RAID array and removed one of the drives from the assembly. Then I wiped the partition table and built a new one…starting at later cylinder.

POOF! More disk space instantly available at the beginning of the disk for GRUB2.

Now what?!? Creating a new RAID array partition in degraded mode, I add it the LVM volume group as a new physical volume.

lvmThen I launch LVM’s handy pvmove command, which moves everything off the old RAID array and onto the new one.

Several hours later, I can reduce the volume group and remove the older RAID array. With everything moved onto the newly resize partition, I can then destroy and rebuild the old disk with the same geometry as the new one, pair it up, and BAM! RAID array back in action, and let it sync back up.

This should line things up to do a GRUB2 chroot installation.

With LVM it’s easy to shrink and expand partitions, reclaim some spare space, and move stuff around. But you are nicely decouple from the physical drives.

With RAID1, you have high reliability by mirroring. And as a side effect, you always have a space disk on hand if you need to move data around. I once moved live MythTV video data off the system to reformat my video partition into xfs.

Out with old and in with the new

startrek-ubuntu-bootupI have been waiting a long time to resurrect an old friend of mine: my MythTV box. I built that machine ten years ago. (I’d show you the specs, but they’re locked away ON the machine in an antique mediawiki web server). It runs Root-on-LVM-on-Raid top to bottom (which, BTW, requires LILO).

It was great project to build my own homebrew DVR. But with the advent of digital cable and EVERYTHING getting scrambled, those days are gone. So it’s sat in the corner for four years. FOUR YEARS. I’m reminded of this through periodic reports from CrashPlan.

I started to get this idea in my head that I could rebuild it with Mac OSX and make it a seamless backup server. Until I learned it was too hold to not support OSX. So it continued to sit, until I learned that I could install the right bits for it to speak “Apple”, and hence become a Time Machine capsule.

So here we go! I discovered that I needed a new VGA cable and power cord to hook up the monitor. After that came in, I booted it up…and almost cried. Almost.

As I logged in, I uncovered neat stuff and some old commands I hadn’t typed in years. But suffice it to say, it is now beginning its first distro upgrade (probably more to come after that), and when done, I’ll migrate it off of being a Mythbuntu distro and instead pick mainline Ubuntu (based on GNOME).

One that is done, I hope to install docker so I spin up services needed (like netatalk) much faster and get ahold of its ability to provide an additional layer of home support for both my and my wife’s Mac laptops.