Re: Running out of disk space

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Sun, 23 Oct 2016 11:28:13 +0200
Message-ID: <nuhvqo$ih9$1_at_dont-email.me>


On 23.10.2016 05:27, Gordon Burditt wrote:
> Does symlinking pieces of tables actually work?

Depends on the meaning of "work".

> ... 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.

Precisely. It still works in the sense of "no data is ever lost", but some operations will recreate files that have been symlinks before as plain files.

There are however other options to distribute data/index files onto multiple disks. CREATE TABLE has options DATA DIRECTORY and INDEX DIRECTORY for placing specific files.

Note: in MySQL 5.6 this works for both MyISAM and InnoDB. In earlier versions only for MyISAM. Starting with MySQL 5.7 the feature was removed for MyISAM though.

See https://dev.mysql.com/doc/refman/5.6/en/create-table.html and https://dev.mysql.com/doc/refman/5.6/en/symbolic-links-to-tables.html

(Note: on top of the page there is a selector box to view the same manual page for different MySQL versions)

> presumption here is that JohnnyTables.MYI and JohnyTables.MYD can't
> fit together on the largest disk partition, RAID partition, or
> logical volume you can make.

If such limitation exists, your hardware or operating system is simply not fit to run a database of the intended size. Received on Sun Oct 23 2016 - 11:28:13 CEST

Original text of this message