Description:
When trying to add a table space file with absoulte path the operation fails after a while with
ERROR 1525 (HY000): Failed to create DATAFILE
a SHOW WARNINGS also reports:
| Error | 1296 | Got error 1509 'File system error, check if path,permissions etc' from NDB |
Problems here:
- the error message isn't really helpfull in this case
(also the 'if' in the error message is confusing, it probably should just read "File system error, check path, permissions etc" without the "if" and with an extra blank after the ','?)
- the table space file ist first created and grows up to the specified file, only then the operation fails. Depending on the data file size this can take rather long. IMHO the problem of both data node processes trying to work on the same file should be detected earlier in the game when the file is created already (e.g. by adding exclusive logs on the file?) instead of only after at least one node is done with it?
- documentation doesn't even mention whether absolute pathes are ok or not, it should explicitly state that they are ok and the limitation of "with only one ndbd per machine only"
- long term feature request: allow for different file names/pathes per node, either by adding a placeholder for the node id that can be used in the data file name or by allowing for multiple names so that this can be specified per node
How to repeat:
Configure a cluster with 2+ data nodes on the same machine, e.g.:
[NDBD DEFAULT]
NoOfReplicas= 2
datadir=/usr/local/mysql/cluster
[NDB_MGMD DEFAULT]
datadir=/usr/local/mysql/cluster
[NDB_MGMD]
Id= 1
Hostname= localhost
[NDBD]
Id= 2
Hostname= localhost
[NDBD]
Id= 3
Hostname= localhost
[MYSQLD]
[MYSQLD]
and try to create a table space with absolute path names
CREATE LOGFILE GROUP lg_1
ADD UNDOFILE 'undo_1.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE 2M
ENGINE NDB;
ALTER LOGFILE GROUP lg_1
ADD UNDOFILE 'undo_2.dat'
INITIAL_SIZE 12M
ENGINE NDB;
CREATE TABLESPACE ts_1
ADD DATAFILE 'ts_1.dat'
USE LOGFILE GROUP lg_1
INITIAL_SIZE 1024M
EXTENT_SIZE 128M
ENGINE NDB;
ERROR 1525 (HY000): Failed to create DATAFILE
show warnings;
+-------+------+----------------------------------------------------------------
----+
| Level | Code | Message
|
+-------+------+----------------------------------------------------------------
----+
| Error | 1296 | Got error 1509 'File system error, check if path,permissions et
NDB |
| Error | 1525 | Failed to create DATAFILE
|
+-------+------+----------------------------------------------------------------
----+