Extend a partition
Hello
I am a jr linux administrator, that manages a linux enviroment that was built before I got here so most of the management procedures are already established, I just follow them. The problem is now, I was given the task to establish a working linux enviroment for our developers. So I'm running red hat linux kernel 2.6.18 and LVM2. They have asked me to extend the home directory from 2GB to 10GB. I used the following command LVEXTEND -L8G /dev/rootvg/home, with success My LVdisplay now shows 10G for /dev/rootvg/home but when I do a df -h it still shows /home as 2G. Is something else I should of done, thanks. |
yes, lvm is not a file system, you have a filesystem inside it, presumably ext3. unmount the filesystem and run "resize2fs /dev/rootvg/home" and it should expand the filesystem to fill the LV. See the resize2fs manpage for further details.
|
I umount /home which is an ext3 and ran the resize2fs;I get the following error:
device or resource is busy while trying to open /dev/rootvg/home couldn't find valid filesystem superblock. |
I think you have to unmount the whole lvm
maybe this might help out http://www.practicalweb.co.uk/blog/1...filesystem-lvm |
Quote:
Have you already run the partprobe command? Code:
AS ROOT |
I ran the partprobe, but I don't see what that really did for me, and unmount the whole lvm. I think would defeat the purpose of lvextend.
|
You can resize2fs a mounted file system as long as it is increasing in size. (If you are shrinking it it has to be unmounted.)
Do a 'mount -a' to remount it, then 'resize2fs /dev/mapper/rootvg-home' again. It should work. Here I do a 'resize2fs' against a mounted file system. Nothing to do as it was already the size of the Logical Volume, but just as an example. Code:
[root@athlonz ~]# df -h |
Keeping it mounted worked, thanks guys, you made me look like a genius.
|
All times are GMT -5. The time now is 02:58 PM. |