New Ubuntu version, Feisty Fawn, and I decide to upgrade. A little problem: my /boot is too little. I won’t tell you how little I did it because I’m not that proud of my choice, now. Anyway, I have a 4-disk system managed by LVM, with a single XFS partition over it. luckily, one of them was spare (I planned to put windows on it, then I didn’t need it and was yet free), because XFS can only be grown, never shrinked (funny choice, by the way). So, I had to create a new boot partition, migrate the contents there, and make the old boot partition join the LVM. Since this involved something delicate (yes, that plain, old boot partition) I did things with care. Not enough, since I forgot one thing and had to put the server up again making things locally. Anyway, if you’re brave, you can technically make all that I talked about with your system online and running. How? This is the roadmap:
- partition the new disk. I made a 400 megs boot partition (/dev/sda1) and left the rest for the LVM (/dev/sda2)
- By the way, two other disks (/dev/sdc and /dev/sdd) were one-partition and completely to the power of LVM (so, /dev/sdc1 and /dev/sdc2), whereas another one had the 1G swap (/dev/sdb1), old boot (/dev/sdb2) and one more PV for LVM (/dev/sdb3). So LVM had /dev/sdb3, /dev/sdc1, /dev/sdd1
- Now, mkfs.ext3 the boot partition, mount it, copy the old boot, umount old boot (I remember something like logd or the like was using it: simply shut down the daemon), mount new boot in its place.
- Dear Mr. Grub, which fucked me. REMEMBER to change all the “root” referrings in /boot/grub/menu.lst to reflect the position of the new boot partition. My old value was (hd1,1) because it was /dev/sdb2, but now, with /dev/sda1, everything becaom (hd0,0). Now, you can run grub-install /dev/sda (first disk of the system, bet it is always the best MBR) and grub update the MBR so to point to the new /boot position (in fact it queries the system to look in which device /boot is mounted and work accordingly).
- Add the old /boot and new spare space in the disk to LVM (that is: make /dev/sda2 and /dev/sdb2 useable with pvcreate, then add them to the VG with vgextend, and at last increase the LV which you prefer with physical extents using lvresize - don’t bet on my memory being so good, check this). Now your LV is bigger, and run: xfs_growfs /. This will enlarge in a moment and painlessly your root partition.
- If you did everything good, you should be already ok. Try reboot to check. Now, in my case it stopped because I forgot the menu.lst update (me stupid), but otherwise everything should work correctly. Again, reboot isn’t strictly necessary, it’s just to check everything’s right now (and it is much better than noticing it when some REAL problem force you to reboot)
So, here’s the end, and after that I could update to Feisty with its funny I-do-it-all-myself update manager. End of the Dilbertian Space.
