configuring LVM?

Discussion in 'Installation/Configuration' started by cwolf, Jul 11, 2006.

  1. cwolf

    cwolf New Member


    I've installed CentOS 4.2 (fully updated) and my disk config is as follows:
    [root@localhost ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
                          2.0G  218M  1.7G  12% /
    /dev/sda1              99M   23M   72M  24% /boot
    none                 1004M     0 1004M   0% /dev/shm
                          2.0G   36M  2.0G   2% /home
                         1008M   34M  924M   4% /tmp
                          2.0G  830M  1.1G  44% /usr
                          102G  330M   96G   1% /var
    I want to resize mount-point "/" to 1024MB instead of 2048MB. Then I want to resize "/var" with the 1024MB previously belonging to "/". I've succesfully resized "/home" to 1024MB and back to 2048MB again to test the procedure, but it needs to unmount the mount-point that's being resized. Unmounting "/" or "/var" isn't possible.
    [root@localhost ~]# umount /
    [root@localhost ~]# umount /var/
    umount: /var: device is busy
    umount: /var: device is busy
    unmounting "/" seems to work, but executing resize2fs gives:
    [root@localhost ~]# resize2fs /dev/VolGroup00/LogVol00 1024M
    resize2fs 1.35 (28-Feb-2004)
    /dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!
    Also "umount -l /" or "umount -l /dev/VolGroup00/LogVol00" shows the "still mounted message".

    I was under the impression that LVM is much more user-friendly when it comes to diskspace management, so what can I do, to unmount and resize every mount-point on my system?

  2. falko

    falko Super Moderator ISPConfig Developer

Share This Page