Oct 7
Free Software I recently reinstalled one of the boxes here, Lorien, from scratch. It was a brand new SATA disk and I used the Debian Lenny beta 2 installer. I'd never tried LVM before, I'd always used "normal" partitioning, but for some reason I figured I'd give this a shot. It all worked ok, but it left one problem. The amount of space Debian allocated to the root partition was pitifully small (less than 300 megabytes), and I hit a snag when a kernel upgrade came through, and wanted to install lots of stuff in that partition. So, first of all a warning, the guided partitioning is, and always has been in my opinion, not too optimal in the way it picks spaces for partitions. Secondly, here is how I fixed it, which is a slight pain since you can't have the root partition mounted.

Since I was going to have to resize my root partition, I used my Debian install CD again, but this time in rescue mode (just type rescue at the prompt). Then you can get a terminal up. I had inadvertently mounted my root partition as /target, so I began by unmounting it.

CODE:
umount /target

Next we need to reduce a partition. I chose to resize my home partition, original 200G to 199G, since I reckoned an extra gigabyte would be more than enough on the root partition.

CODE:
# Check the filesystem e2fsck -f /dev/lorien/home # Make it slightly smaller resize2fs /dev/lorien/home 199G # We are about to play with LVM lvchange -a n /dev/lorien/home # Tell it to reduce the size by 1 Gigabyte lvreduce -L-1g /dev/lorien/home # Done with LVM lvchange -a y /dev/lorien/home # Check the filesystem again e2fsck -f /dev/lorien/home

Finally, increase the size of the root partition.

CODE:
# Playing with LVM lvchange -a n /dev/lorien/root # Increase the LV by 1 G lvextend -L+1g /dev/lorien/root # Finished with LVM lvchange -a y /dev/lorien/root # Check the file system e2fsck -f /dev/lorien/root # resize it resize2fs /dev/lorien/root # Check one last time. e2fsk -f /dev/lorien/root

Posted by Colin Turner

Defined tags for this entry:
Bookmark Guided LVM in Debian  at del.icio.us Digg Guided LVM in Debian Mixx Guided LVM in Debian Bloglines Guided LVM in Debian Technorati Guided LVM in Debian Fark this: Guided LVM in Debian Bookmark Guided LVM in Debian  at YahooMyWeb Bookmark Guided LVM in Debian  at Furl.net Bookmark Guided LVM in Debian  at reddit.com Bookmark Guided LVM in Debian  at blinklist.com Bookmark Guided LVM in Debian  at Spurl.net Bookmark Guided LVM in Debian  at NewsVine Bookmark Guided LVM in Debian  at Simpy.com Bookmark Guided LVM in Debian  at blogmarks Bookmark Guided LVM in Debian  with wists Bookmark Guided LVM in Debian  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as(Linear | Threaded)
  1. No comments

Add Comment



To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

BBCode format allowed
Standard emoticons like :-) and ;-) are converted to images.
You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.