LVM - Reassign space to other partitions

Discussion in 'Installation/Configuration' started by cfuze, May 16, 2012.

  1. cfuze

    cfuze New Member

    So, I am running Debian Squeeze and I know I should be running LVM (at least I think I should so I can add physical volumes later on if need be). I am new to LVM overall and have everything up and going, but I ran the volume report and found this:

    Code:
    Filesystem	Type	Size	Used	Available	Use%	Mounted on
    /dev/mapper/server1-root						
    ext3	322M	133M	173M	44%	/
    tmpfs	tmpfs	7.9G	0	7.9G	0%	/lib/init/rw
    udev	tmpfs	7.9G	156K	7.9G	1%	/dev
    tmpfs	tmpfs	7.9G	0	7.9G	0%	/dev/shm
    /dev/sda1	ext2	228M	16M	201M	8%	/boot
    /dev/mapper/server1-home						
    ext3	1.4T	198M	1.3T	1%	/home
    /dev/mapper/server1-tmp						
    ext3	368M	28M	322M	8%	/tmp
    /dev/mapper/server1-usr						
    ext3	8.3G	961M	6.9G	12%	/usr
    /dev/mapper/server1-var						
    ext3	2.8G	464M	2.2G	18%	/var
    
    So basically my /var mount is 18% full and the /home partition has all the space. I will not be using the /home partition for users as this is a web server. What is the best way to reassign that space to the var partition or will it auto expand as needed?

    Thanks and apologies but I am a quasi-noob to certain parts of linux especially when using it as a server.
     
    Last edited: May 16, 2012
  2. falko

    falko Super Moderator Howtoforge Staff

    What you can try is: Move all stuff from /home to some backup folder (so that /home is completely empty), then copy everything from /var to the /home folder, unmount /home and /var, and mount /dev/mapper/server1-home to /var (don't forget to modify /etc/fstab if this works). Then copy the home stuff from the backup folder back to /home.
     

Share This Page