Re: Running out of disk space

From: J.O. Aho <user_at_example.net>
Date: Sun, 23 Oct 2016 08:40:28 +0200
Message-ID: <e734asFdfhbU1_at_mid.individual.net>


On 10/23/2016 05:27 AM, Gordon Burditt wrote:

>>> If my server hard disk becomes full, is there a way to stretch out the MySQL DB over multiple hard drives? What needs to be done?
>>
>> Sure, there are different ways, not all of them are good.
>>
>> 1. Partitioning http://dev.mysql.com/doc/refman/5.5/en/partitioning.html
>>
>> 2. Move databases to different location and symlink the database to the
>> default place

>
> Does symlinking pieces of tables actually work? It seems to me
> that, for MyISAM databases at least, if you make symlinks for
> JohnnyTables.MYI, JohnnyTables.MYD, and JohnnyTables.frm, each
> pointing to its own (multi-terabyte) disk, it might work for a
> while, but for some operations like ALTER TABLE (the uses that
> require building or re-building indexes or data records) and REPAIR
> TABLE, it generates a new table (at least the *.MYI and *.MYD files)
> under a temporary name and renames them back, thus destroying the
> symlinks and putting all the data back on the disk for the data
> directory.

I wouldn't symlink the individual file, but the JohnnyTables, this should work with the alter table (never done it myself), draw back may be when yo drop the database, the symlink may be deleted but the actual files will still be on the other location.

[Quoted] I don't see symlinking as anything else than a short time temporary solution. A more robust solution would be using partitioning.

-- 

 //Aho
Received on Sun Oct 23 2016 - 08:40:28 CEST

Original text of this message