We help IT Professionals succeed at work.

mysql on debian will not start -disk full error is incorrect.

1,697 Views
Last Modified: 2013-12-16
On my debian box, I get the following error:  
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!

I am unable to start mysql server. I am using debian 4.0 with lvm.
When i do a df -h, i get this:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_house-lv_root
                      493G  468G     0 100% /
tmpfs                 1.5G     0  1.5G   0% /lib/init/rw
udev                   10M   96K   10M   1% /dev
tmpfs                 1.5G     0  1.5G   0% /dev/shm
/dev/md0              274M   25M  235M  10% /boot

this is my first time using lvm  --so i do not know what i am looking for.  I know that i can write to the disk and there is more then enough space there.  I think there is some kind of bad check that goes on in the /etc/init.d/mysq script...
I tried to follow a couple of articles on the web --but no luck.  HELP.
thanks
mjh

Comment
Watch Question

Top Expert 2007

Commented:
Your root partition has run out of space.
* Create a new logical volume (use the admin tool of you distribution for this or man lvcreate)
* make sure mysql is shut down
* mount the new lvm to /mnt
* move everything from /var/lib/mysql to /mnt
* umount /mnt
* remount the mysql-lvm to /var/lib/mysql, edit entry in fstab
* chown mysql.daemon /var/lib/mysql
* start mysql and yous hould have enough space in that lvm to run mysql properly

Author

Commented:
how do i use lvcreate ?  I have one big logical volume of 1.5 Terrabyte and the / is on logical volume partition of 500g.  
But i know / has more then enough disk space because i can still write to the volume.  I believe none of the script are seeing it properly.
Or even lvm on debian is showing it properly.

how can i check this out???
Top Expert 2007

Commented:
You have a pv (physical volume) of 1,5T, but only a lv (logical volume) of 500G and thus the filesystem of your root partition is only 500G big. Run
pvdisplay
to get the info of you pv and how much space if free on that pv
run
lvdisplay
to show how big each lv. To create a lv with name mysql of 1TB use e.g
lvcreate -L 1024G mysql /dev/vg_house

Author

Commented:
this is the output from the commands you asked me about:

rider:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/md1
  VG Name               vg_house
  PV Size               1.36 TB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              357491
  Free PE               227955
  Allocated PE          129536
  PV UUID               G5c7Ul-v0wn-pvTF-Wd0N-769t-7hG5-KgyCBt

rider:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg_house/lv_swap
  VG Name                vg_house
  LV UUID                5wgIA9-ecVd-xW33-CYRT-uqXr-nXwh-yfzCfI
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                6.00 GB
  Current LE             1536
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg_house/lv_root
  VG Name                vg_house
  LV UUID                pMZrON-nXDG-Thb8-pxKc-otFn-31YL-Q1WA77
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                500.00 GB
  Current LE             128000
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1

I get this back when i execute your command...(i only need 100gig)

rider:~# lvcreate -L 100G mysql /dev/vg_house
  Volume group "mysql" doesn't exist

Can you tell me how i am using up 500g with / volume..it is impossible..i just have the standard files and backup files.
Can you help me narrow down what is going on ?  I do not think i am taking up all that space.
Top Expert 2007

Commented:
you can run at your root directory /
du -sh *
to get a list where the most space is used (can take some time). Then you can go to that directory and execute again
du -sh *
Till you get a clue where the space is used.

Backup files tend to get very big if not cleaned up from time to time.
hm help of lvcreate is a bit confusing. I tried:
lvcreate --size 4G --name mysql /dev/vg_house

Author

Commented:
How come i keep getting this??? :
rider:~# lvcreate --size 4G --name mysql /dev/vg_house
  Volume group "vg_house" doesn't exist


I just copied and pasted what you did...I am on debian.

BTW -the du -sh * command is great...thanks. I found the file that caused the problem.
How can i monitor disk usage on lvm?
df -h  is what i used to use.

thanks
mjh
Top Expert 2007

Commented:
lvm is nothing less ore more than a managment for harddisk space as you would do it with a real harddisk, so to monitor space you use still df. With lvm you have more options in management for the space as you have for real harddisks.

Author

Commented:
okay...i think i found my typo.
I was able to create the lv.
what are the next steps to making it a useable partition ????
thank you so far for your help.

mjh
Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks again...
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.