Bug #19320 Failing to create disk database
Submitted: 25 Apr 2006 6:11 Modified: 28 Jul 2006 13:32
Reporter: Markku Vainikka Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.9 OS:Linux (RHEL4u2)
Assigned to: Assigned Account CPU Architecture:Any

[25 Apr 2006 6:11] Markku Vainikka
Description:
MySQL 5.1.7 fails to create a disk database.

When I try to create the logfile group (with undofile )required for disk database "ERROR 1506 (HY000): Failed to create UNDOFILE" occurs.

As a result, both ndb nodes go down (not connected).

Sometimes I am able to create the disk DB.

>>       Node 2: started (Version 5.1.7)
>>       Node 3: started (Version 5.1.7)
>>
>>       "create database DBA; use DBA;".
>>       "create table fii ( no integer primary key )
>engine=ndbcluster;".
>>
>>
>>       mysql> create logfile group lg_levy
>>           -> add undofile 'undo1.dat'
>>           -> initial_size 500M
>>           -> undo_buffer_size 80M
>>           -> engine ndb;
>>       ERROR 1506 (HY000): Failed to create UNDOFILE
>>       mysql>
>>
>>       Both NDB nodes stop with message
>>
>>       ndb_mgm> Node 3: Forced node shutdown completed. Initiated by
>>       signal 0. Caused by error 2815: 'File not found(Ndbd
>file system
>>       inconsistency error, please report a bug). Ndbd file system
>>       error, restart node initial'.
>>
>>       Node 2: Forced node shutdown completed. Initiated by signal 0.
>>       Caused by error 2815: 'File not found(Ndbd file system
>>       inconsistency error, please report a bug). Ndbd file system
>>       error, restart node initial'.

How to repeat:
Stop the ndb cluster:

mgmd node:
ndb_mgd -e shutdown
ps aux | grep -i mysqld | awk -F " " '{print$2}'| xargs kill -9

Clear the database by deleting all the files in the DB folders:
(/var/lib/mysql/DBA and /var/lib/mysql-cluster on mgmd node)
(/var/lib/mysql-cluster on ndb nodes)

Restart the cluster with ndbd --initial.

Try to create the disk database.
[25 Apr 2006 6:18] Jonas Oreland
Hi,

1) Can you please try a newer version. (This implies building for yourself)

2) When getting node crash, please use ndb_error_reporter
    that gathers up all config/trace/log-files
    (it could be that ndb_error_reporter was not included in 5.1.7,
     if so please put all config/trace/log files in a bzip2-tar-ball and attach it to this bug report)

/Jonas
[28 Apr 2006 7:16] Jonas Oreland
Hi,

I'm not really sure if this answer applies to you, but this might be non obvious.

Example 1: 2-node, 2-replica
create tablespace with 1 extent.
create table using tablespace;
insert X into table; 
insert Y into table; // table full
insert Z into table; // ok

Why?? there are only 1 row and yet it returns table full...
Default partitioning for 2-node, 2-replica is to create 2 partitions.
First insert allocates the extent to the partition that first row ends up in.
Following inserts will be ok if same partition as first insert (until that extent is full)
  but inserts ending up in other partition will return table full.

insert (X), (Y), (Z); // This will insert all three or none...with config as above, this will
                            // always lead to table full.

Hope this helps.

Otherwise you have to give me more info...
Such as a SQL script that produces error...

/Jonas
[28 Apr 2006 8:20] Jonas Oreland
Hi,

1) Can you check if example above applies to you
2) If not, please upload config.ini and DDL for table/tablespace/logfile groups

/Jonas
[28 Jun 2006 13:32] Jonas Oreland
Hi,

Sorry for the late reply.
I restested this on 5.1.12 build from source.
And I could not repeat the problem that you describe.
It works find running the two perl scripts in parallell.
[28 Jul 2006 23: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".