Bug #69851 Unable to create undofile and/or data files after --initial restart
Submitted: 26 Jul 2013 18:48 Modified: 29 Jul 2013 14:27
Reporter: Pavel Baranov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.2.10 OS:Linux
Assigned to: CPU Architecture:Any

[26 Jul 2013 18:48] Pavel Baranov
Description:
I've noticed that ndbd ... --initial would not remove ndb_#_fs directories which in turn create the following problem:

mysql> CREATE LOGFILE GROUP lg_1  ADD UNDOFILE 'undo_1.log' INITIAL_SIZE 16M UNDO_BUFFER_SIZE 2M ENGINE NDBCLUSTER;ERROR 1528 (HY000): Failed to create UNDOFILE

mysql> show warnings;

+---------+------+----------------------------------------------------------------------------+

| Level   | Code | Message                                                                    |

+---------+------+----------------------------------------------------------------------------+

| Warning | 1296 | Got error 1509 'File system error, check if path,permissions etc' from NDB |

| Error   | 1528 | Failed to create UNDOFILE                                                  |

+---------+------+----------------------------------------------------------------------------+

2 rows in set (0.00 sec)

Also, running this:
mysql> select file_name, extra, (total_extents * extent_size)/(1024 * 1024) as 'Total_MB',(free_extents * extent_size)/(1024*1024) as 'Free_MB' from information_schema.files;

Empty set (0.00 sec)

returns empty which means there are no log files or data files, but the first query gives an error because they actually exist.

How to repeat:
1. Create a simple cluster
2. create undofile(s) + data file(s)
3. shutdown the cluster
4. start all data nodes with --initial

Suggested fix:
remove ndb_#_fs directories when starting with --initial ?
[27 Jul 2013 5:29] MySQL Verification Team
Hello Pavel,

This is known behavior, --initial option does not affect either of the following types of files: 
    - Backup files that have already been created by the affected node
    - MySQL Cluster Disk Data files

More details - http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-programs-ndbd.html#option_ndbd_initia...

Thanks,
Umesh
[29 Jul 2013 14:27] Pavel Baranov
So, this is expected? I guess I need to clear them manually.

Thank you!