It turns out that after running umount /usr successfully in single user mode, yast2 disk fails since there are some files that yast2 needs in the unmounted /usr partition. This left me only with the option of using the console tools. Below is the sequence of commands that I run to add 5G to my /usr partition.
modprobe dm_mod
lvextend -L +5G /dev/mapper/system-usr
shutdown -r 0
resize2fs /dev/mapper/system-usr
The first command to load the device mapper kernel module was necessary since the module was not loaded automatically in my case. I was only able to resize the file system after a reboot because I could not figure out a way to mount the partition in single user mode but I believe it should be possible.
Thankfully, increasing the size of an lvm partition in Ubuntu does not need it to be unmounted.
ReplyDeleteDecreasing the size would surely need it unmounted but it would be very hard since the Ubuntu recovery environment programs e.g. bash and recovery-menu use the /usr partition.
I think the reason why I was able to increase the size of a partition in ubuntu 10.04 while it was mounted is because the file system is ext4 unlike ext3 for openSUSE 11.1.
ReplyDelete