Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running NDB mysql. the log files fills up the /var directory. therefore i cant start the ndbd service now. as a temporary fix, i have deleted the log files and again working fine. but again the log files fill up the /var directory.

i got plenty of space in other partition. therefore i would like to swap the partition from one directory to /var.

here if my input from df -h

Filesystem    Type    Size  Used Avail Use% Mounted on
              ext3     54G  2.9G   49G   6% /
              ext3     99M   14M   81M  14% /boot
none         tmpfs   1013M     0 1013M   0% /dev/shm
              ext3    9.7G  9.7G     0 100% /var

there are plenty of space in /dev/mapper/VolGroup00-LogVol00. Therefore i will like to swap 10 G space from this directory to /var.

could you please help me out to solve this problem?

share|improve this question

migrated from May 5 '10 at 4:39

This question came from our site for professional and enthusiast programmers.

This is clearly not a programming question, voting to close and move. – unwind May 4 '10 at 10:49

You're lucky that RHEL4 uses LVM by default. LVM is a flexible partitionning tools that allows you to modify partitions really easily.

You can modify the size of a LVM partition by using the following commands. The first one modifies the size of the partition (replace X by the new size) and the second adapts the filesystem.

lvresize -L XG /dev/mapper/VolGroup00-LogVol00
resize2fs /dev/mapper/VolGroup00-LogVol00

Make sure you have enough free space and that you will not be destroying data. You've been warned.

The problem with your setup is that the /var partition doesn't have LVM, it's a just a regular partition. Therefore you will not be able to reclaim space on that. What I suggest is that you create a new LVM partition out of the space you got from your LVM, transfer the data and use that as your new /var.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.