List:General Discussion« Previous MessageNext Message »
From:Wm Mussatto Date:August 26 2011 5:13pm
Subject:Re: Caution : Hard Disk Full
View as plain text  
On Fri, August 26, 2011 00:44, Johan De Meersman wrote:
> ----- Original Message -----
>> From: "Adarsh Sharma" <adarsh.sharma@stripped>
>>
>> Today by chance I am checking the space in mysql  data directories.
>
> By chance? That should be automated, as should a million other standard
> checks. Install Nagios.
>
>> When it becomes full, I am sure my server down. Can anyone Please let
>> me know the steps I need to follow in this condition.
>
> Pretty obvious: add space or remove data.
>
> Given that you say it's MyISAM data taking up the space, you simply need
> to optimize the tables to reclaim free space inside the datafiles - but
> make sure there's enough free space for a full copy of the remaining data,
> so start optimizing the smallest tables first. For InnoDB it's quite a bit
> more trouble.
>
> If there's no data you can delete, you could have a look at wether there's
> tables that don't need to be written to anymore - or set up archiving
> tables for exactly that purpose; you can convert those to compressed
> MyISAM, that should save quite some space, too.
>
> Adding disks, well... if you set up the server with LVM or MD that
> shouldn't be too hard, but it looks like you didn't. Welcome to
> screwville. You'll need to swap out the disk for a larger one (yes,
> downtime) and copy all the data. That, or *add* a disk, set that one up
> with LVM, copy the data there and then add the old disk as a second
> physical volume and expand the logical volume.
>
>
> And this, dear pupils, is why we tell the marketeers to go screw
> themselves until they can provide a three-year volume estimate.
>
I would only add, while you are in there, add two disks and use MD to
create raid 1 and the put LVM on top of that.  With MD you can replace one
of the underlying drives with a larger one move that in and then replace
the other bring that in and increase the available space.  BTW: on modern
processors, I've found MD to be faster than Hardware Raid unless you go
real high end.  Plus you can put the disks on separate controllers.   Not
a trivial exercise, but you are not locked it.
------
William R. Mussatto
Systems Engineer
http://www.csz.com
909-920-9154

Thread
Caution : Hard Disk FullAdarsh Sharma26 Aug
  • Re: Caution : Hard Disk FullJohan De Meersman26 Aug
    • Re: Caution : Hard Disk FullWm Mussatto26 Aug
  • Re: Caution : Hard Disk FullPrabhat Kumar29 Aug