Showing results for 
Search instead for 
Did you mean: 

LVM problem

Go to solution
Occasional Visitor

LVM problem

Beside others I partitioned the following two logical volumes on my hard drive (single hdd 500Gb with Fedora 9) - lvs:

LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol05 VolGroup00 -wi-ao 19.53G
LogVol06 VolGroup00 -wi-a- 205.06G

with the following mount points (/etc/fstab):

/dev/VolGroup00/LogVol05 /var ext3 defaults 1 2
/dev/VolGroup00/LogVol06 /var/lib/mysql ext3 defaults 1 2

When I populated my MySQL databases the process stopped and I found that /var is completely full. I checked /var/lib/mysql, which is there and contained the database I had installed. After removing the bigger DB df showed the following:

Size Used Avail Use% Mounted on
20G 5.0G 14G 28% /var

but nothing about /dev/VolGroup00/LogVol06 where I though I would have my databases stored.

Can anyone tell me why this problem occurred and how can I assign /var/lib/mysql to LogVol06

Ivan Ferreira
Honored Contributor

Re: LVM problem

First, ensure you can mount LogVol06:

mount /dev/VolGroup00/LogVol06 /mnt

Then, copy the content of /var/lib/mysql to /mnt

cp -av /var/lib/mysql/* /mnt

Now, ensure that the Mysql database is stopped and mount the LogVol06 into /var/lib/mysql

umount /mnt
mount /dev/VolGroup00/LogVol06 /var/lib/mysql

Post any errors that you may receive during this procedure.

Welcome to the forum, please remember to assign points to the answers you get. For more info see:
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Occasional Visitor

Re: LVM problem

Thanks Ivan, that solved my problem with the exception, that after rebooting I had to mount LogVol06 manually despite the fact that my /etc/fstab contains the line:

/dev/VolGroup00/LogVol06 /var/lib/mysql ext3 defaults 1 2

Is there any way to get it mounted at boot time?

Trusted Contributor

Re: LVM problem

add the entry in /etc/fstab

/dev/VolGroup00/LogVol06 /var/lib/mysql ext3 defaults 1 2
benoit Bruckert
Honored Contributor

Re: LVM problem

Be carefull in the order,
/var/lib/mysql should be after /var.
hope that help
Une application mal pansée aboutit à une usine à gaze (GHG)