2

A tool that I am trying to install says:

MySQL server data directory needs to reside on an LVM volume

How do I check if my data directory is on LVM?

Rup
  • 33,765
  • 9
  • 83
  • 112
shantanuo
  • 31,689
  • 78
  • 245
  • 403

2 Answers2

3

Run df on the MySQL data directory; this will return the device where the directory resides. Then run lvs or lvdisplay to check if the device is an LVM one.

In my system:

perez:~ #df  /var/symdb/SYMDB
Filesystem                  1K-blocks     Used Available Use% Mounted on
/dev/mapper/OpenScapeUC-UC1  41284928 21346244  17841532  55% /

perez:~ # lvs /dev/mapper/OpenScapeUC-UC1
  LV   VG          Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  UC1  OpenScapeUC -wi-ao 40.00g
Chintan Khetiya
  • 15,962
  • 9
  • 47
  • 85
2

If you installed the OS then you would have chosen this option as part of the partitioning during installation. I assume you are looking to set up LVM snapshots (mylvmbackup) for MySQL?

If your seeing that message then i'm just guessing but you may not have an LVM volume, or at least MySQL data files aren't on it.

http://www.debian-administration.org/articles/410 is a guide for setting up with debian.

Try running lvdisplay on command line and is should display any LVM volumes if they exist.

pharalia
  • 709
  • 4
  • 6
  • The output of lvdisplay is # No volume groups found ## is it worth the exercise? – shantanuo Aug 20 '10 at 09:44
  • Tough call, I've never done it myself, other than at install time. Apparently you can do it in 3 minutes according to this post http://www.walkernews.net/2007/07/02/how-to-create-linux-lvm-in-3-minutes/ however you will need a blank disk / partition to do it. – pharalia Aug 20 '10 at 10:10