Oct
7
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
Defined tags for this entry: free software

