mjh5598
asked on
mysql on debian will not start -disk full error is incorrect.
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_ro ot
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
/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_ro
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
ASKER
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???
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???
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
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
ASKER
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-KgyC Bt
rider:~# lvdisplay
--- Logical volume ---
LV Name /dev/vg_house/lv_swap
VG Name vg_house
LV UUID 5wgIA9-ecVd-xW33-CYRT-uqXr -nXwh-yfzC fI
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-Q1WA 77
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.
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
rider:~# lvdisplay
--- Logical volume ---
LV Name /dev/vg_house/lv_swap
VG Name vg_house
LV UUID 5wgIA9-ecVd-xW33-CYRT-uqXr
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
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.
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
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
ASKER
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
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
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.
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks again...
* 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