::::: : the wood : davidrobins.net

Shuffling partitions on cirith-ungol

News, Technical ·Saturday January 30, 2010 @ 03:05 EST (link)

My 2Tb USB HD (Western Digital MyBook Essential) arrived a few days ago (with a memory upgrade for the same machine); now I can sort out some space issues I've been having with the MythTV box, cirith-ungol. The root partition was sized at 10Gb when I partitioned it originally, which is too small now (building XBMC from SVN pushed it over the limit). Most of that HD (320Gb) and another internal (500Gb) was devoted to an LVM-joined video partition using IBM's JFS (because it seemed optimal for large video files).

Unfortunately, JFS can't be shrunk to regain some space for the root partition, and I figured it would be handy to have videos on a portable drive for watching them in other places. So I moved the video partition to the new disk (keeping the same paths so MythTV wouldn't have a heart attack and crap its database), resized the old partition with GNU parted from a Knoppix Live CD (because parted can't resize a mounted filesystem, although apparently resize2fs can, but it still seems a bit dicey). I mounted the remaining internal 500Gb disk as a spare; I may move it to the server machine or somewhere else, or put it in a USB enclosure.

The first Knoppix CD I burned was some "ADRIANE" build, which I figured was just a codename and I picked it since it had a recent date and was at the top of the list. Turns out it's some sort of speak-'n'-spell accessible version, so I had to delete it and download the correct version (both 6.2 / 2009-11-18).

It's pretty baroque that the best (command-line) way to resize partitions is to use fdisk (parted supposedly can do a partition and filesystem, but it's experimental and looks scary since the way to specify "don't move the start" is to copy the value from the print command, which seems subject to failure due to rounding between megabytes and cylinders, and in this case, didn't work—some "expected to relocate 512" error—although at least it didn't seem to break anything). With fdisk, it's necessary to delete and re-add the partition (with the same start cylinder). At least resize2fs knows to default to the partition size.

Honey got me a nice card for my birthday, and some white chocolate Lindt truffles, which she presented to me right at midnight. Happy 25 to me!

Books finished: Breaking Dawn, Flow My Tears, the Policeman Said, Everyday Anarchy.

DVDs finished: Babylon 5: The Complete First Season: Signs and Portents.