Decades ago when I was working under an “apprenticeship,” my mentor had a few words of advice. “Always have a Plan C,” she said. “Don’t you mean Plan B?” I asked. “No,” she said, “Plan C.”
At the time I took those words for the eccentric ravings of a jaded old woman, but many times thereafter I realized she was right. Friday was one of those times.
For the past few months I’ve had a small problem with partition sizes on my central machine — the one I rely on to be rock-steady. Originally when I built it, I allocated only 2Gb to the root partition, and ordinarily that would be enough considering the /boot and /home folders are separated out to other partitions. I have no real rationale for those things; I started doing that a long time ago and have stayed with it even up until now. (Actually, I do have a few rationales.)
However, what I have noticed with Crux is that jumping between kernels can take up to 1Gb of space, considering all the compiling and so forth. Maybe that’s not the case for everyone, but if I check the size of a decompressed tarball in /usr/src, after the kernel is built, the folder can occupy up to a whopping 600Mb. Don’t ask me where it comes from. I’m just an unwitting participant.
I have no complaint with that, and I certainly have no truck with the people who design those things. Six hundred megabytes or six, it makes no difference to me … except that if I jump from, for example, 188.8.131.52 to 184.108.40.206, I suddenly have more than a gigabyte in space taken up by system files.
So I was willing to try repartitioning those areas via the GPartEd Live CD; after all, I have more than 50Gb available on the drive, if you count all the unused space dedicated to /home. A long time ago the live version of GPartEd came in quite handy for me, and I used to keep a spare one around just for emergencies. I downloaded the most recent stable version, just for this occasion.
To make an already long story short, something went wrong while the resizing and shuffling were underway, the screen went black and the system hung with no response. It ran like that for more than an hour and a half (I was afraid to cut the power while the drive light was still flickering), but when it looked like it was done I disconnected the AC and tried it out.
And as you might expect, everything was scrambled. I don’t know what happened when GPartEd hiccuped, but the system halfway booted, then lost track of itself and exploded in a digital fireball of error messages.
Except that Plan B fell through when the last partition it had cloned — the /home partition — had somehow been invalidated, and couldn’t be restored. I crossed my fingers that maybe it was just a fluke error, but when I rebooted my account was dropped at /, and all the configuration files were missing.
I ran e2fsck against the “empty” home partition and came up with an endless stream of errors in sequence, so I reformatted that partition, made a new /home/kmandla folder … and went to Plan C.
Because I keep a plain-jane sync of my home directory on an external drive, just for backup purposes. Because I like to move the same configurations between machines. And because I always have a Plan C.😉
In all, the catastrophe was averted, nothing needed recompiled or rebuilt, and in actuality, that folder had been synchronized at a more recent date than the Clonezilla backup, so the files would have needed refreshed anyway. Of course, the original problem — tight space in the root partition — still stands, and because I am a glutton for punishment I tried the same repartitioning stunt again and got the same screwball behavior in GPartEd, but nothing was lost in the attempt(s).
I don’t mind a freak accident or two, just so long as no one gets hurt.