You are here
I have a problem I cannot seem to solve. A few days ago my mediawiki appliance, which has been running without flaw for >4 years, stopped working. When I try to access it I get the error:
Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (localhost))
If I go into webadmin the MySQL server is not running; if I click the 'start mysql" button I get the following error:
MySQL is not running on your system - database list could not be retrieved.
Sometimes it also states that it could not create a temporary folder; after a bit of fiddling it turns out this was due to the virtual hard drive bing 100% full, which was unexpected as when I set up the wiki origonally its drive was 3X the installed size, the wiki is quite small, and there are no images on it.
So I went through an extensive cleanup, removing old kernels, apt-get clean/autoclean/autoremove to remove unused packages, etc. There is now 2% free space, and the wiki starts.
I wanted to make this a more permenant fix, so I tried to double the HDD space following these instructions. In short, I cloned the drive as a .vdi, enlarged it to 2X the old size, and then used the live CD of gparted to expand the existing drive into the free space. However, when I rebooted the wiki (using the cloned/expanded drive) it still shows the old size. I reloaded the gparted live CD in the VM and double checked; it confirmed that the drive was resized properly.
Anyone know why the new drive size doesn't work & how to fix it?
Thanks
Bryan
Try resize2fs
I suggest you try this:
It should give a result like this: or maybe like this: So then run resize2fs. E.g. or Also regarding cleaning up on your appliance; my strong suspicion is that you have collected a lot of cruft that could be safely removed. There was a bug a few years back that meant that Webmin would dump heaps of cache files and log files into /etc (where settings are normally kept) and because TurnKey also has etckeeper (A neat little app that store everything from /etc in version control) it was not uncommon for /etc to grow out of control... My guess is you have that issue...I recommend that you install ncdu and use it to have a dig around and see what is taking up all the space...
Install with
then launch it withThanks for the ideas. The
Thanks for the ideas.
The resizing didn't work.
Which I then tried to resize with
But when I check the available space the total drive space and the avaiable space remains the same. Anyone know what's going on with that?
NCDU showed me the way. I had 14.3 GB in /etc/.git, which is most of the drive. I dug around the forums and found this command that fixed things up nicely (one of your posts, Jeremy, as I recall):
cd /etc/
git gc
.git went from 14.3GB to 102 MB!
Thanks!
Bryan
Ah-ha! I'm pretty sure I know what's happening!
So if you were adding 10GB to your current LVM then you would do this:
then do the resize2fs again... PS glad ncdu helped you hunt down your wasted space! :)That did the job!
That did the job - probably don't need the extra space now that its all celaned up, but it isn't going to hurt either.
Thanks for walking me through this.
Bryan
Glad we got it all worked out!
Add new comment