Bug #35126 myisamchk: Disk is full writing zzz.MYI
Submitted: 6 Mar 2008 22:57 Modified: 15 Nov 2008 18:46
Reporter: Oleg Alexeenkov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.1.23-rc FreeBSD port: mysql-server-5.1 OS:FreeBSD (7.0)
Assigned to: Assigned Account CPU Architecture:Any
Tags: disk, full, MyISAMchk, Writing

[6 Mar 2008 22:57] Oleg Alexeenkov
Description:
i run 
myisamchk -v --recover --force /var/db/mysql/z/*.MYI
but during this process (~30G tables, ~40G expected index) ~4-8 hours
free space was ended and i recieve lot of messages:

2008/03/06-23:40:18 [11041] dbg - Fixing index 10
2008/03/06-23:40:18 [11041] dbg   - Searching for keys, allocating buffer for 61946206 keys
2008/03/06-23:40:18 [11041] dbg   - Last merge and dumping keys
2008/03/06-23:40:18 [11041] dbg myisamchk: Disk is full writing '/storage/2/db/z/z.MYI' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
/storage/2: write failed, filesystem is full

then i clean disk:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad6s1d    451G    249G    166G    60%    /storage/2

but myisamchk is staying 

  PID USERNAME       THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
11312 root             1  -4    0  3088M  3087M snaplk 2 388:14  0.00% myisamchk

and continue write me

2008/03/07-01:25:15 [11041] dbg myisamchk: Disk is full writing '/storage/2/db/proiska/filebase.MYI' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
2008/03/07-01:35:54 [11041] dbg myisamchk: Disk is full writing '/storage/2/db/proiska/filebase.MYI' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs

How to repeat:
big table, low disk space
myisamchk -v --recover --force /var/db/mysql/z/*.MYI
[7 Mar 2008 12:02] Oleg Alexeenkov
second retry:

2008/03/07-11:24:52 [30324] dbg - Fixing index 10
2008/03/07-11:24:52 [30324] dbg   - Searching for keys, allocating buffer for 61946169 keys
2008/03/07-11:24:52 [30324] dbg myisamchk: Disk is full writing '/storage/2/tmp/STc7nsda' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs

/storage/2: write failed, filesystem is full

but after cleaning myisamchk starts working.
  PID USERNAME       THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
30590 root             1 120    0  3088M  3087M CPU1   0 510:16 98.68% myisamchk
[18 Mar 2008 16:02] Susanne Ebrecht
Many thanks for writing a bug report.
How does your indexes look like?
[21 Mar 2008 23:58] Oleg Alexeenkov
CREATE TABLE `filebase` (
 `prot` varchar(6) NOT NULL DEFAULT '',
 `host` varchar(64) NOT NULL DEFAULT '',
 `path` varchar(182) NOT NULL DEFAULT '',
 `name` varchar(182) NOT NULL DEFAULT '',
 `ext` varchar(64) NOT NULL DEFAULT '',
 `size` bigint(20) unsigned NOT NULL DEFAULT '0',
 `time` int(10) unsigned NOT NULL DEFAULT '0',
 `desc` varchar(200) NOT NULL DEFAULT '',
 `scan` int(10) unsigned NOT NULL DEFAULT '0',
 `added` int(10) unsigned NOT NULL DEFAULT '0',
 `stem` varchar(128) NOT NULL DEFAULT '',
 PRIMARY KEY (`prot`,`host`,`path`,`name`,`ext`),
 KEY `prot_i` (`prot`(3)),
 KEY `host_i` (`host`(16)),
 KEY `path_i` (`path`(128)),
 KEY `name_i` (`name`(32)),
 KEY `ext_i` (`ext`(8)),
 KEY `size_i` (`size`),
 KEY `time_i` (`time`),
 KEY `scan_i` (`scan`),
 FULLTEXT KEY `stemi` (`stem`),
 FULLTEXT KEY `fulltexti` (`name`,`ext`,`desc`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
[24 Mar 2008 23:45] Sveta Smirnova
Thank you for the feedback.

But you said myisamchk stops working if no space left on device and starts after cleaning. So what the bug is?
[25 Mar 2008 10:52] Oleg Alexeenkov
it stops totally if space ends during this stage:
2008/03/06-23:40:18 [11041] dbg   - Last merge and dumping keys

but continue working after cleaning if space ends on this stage:
2008/03/06-23:40:18 [11041] dbg   - Searching for keys, allocating buffer for 61946206 keys
[15 Oct 2008 18:46] Sveta Smirnova
Thank you for the feedback.

I can not repeat described behavior with latest version. Please try with it. Also please check with myisamchk from our distribution available from dev.mysql.com/downloads to be sure this is not a problem of FreeBSD port.
[16 Nov 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".