Bug #31718 Problem with absoulte tablespace file pathes and multiple nodes on one machine
Submitted: 19 Oct 2007 14:13 Modified: 12 Nov 2009 8:43
Reporter: Hartmut Holzgraefe Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:mysql-5.1 OS:Linux
Assigned to: Assigned Account CPU Architecture:Any
Tags: 5.1.22
Triage: Triaged: D3 (Medium)

[19 Oct 2007 14:13] Hartmut Holzgraefe
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                                      
    | 
+-------+------+----------------------------------------------------------------
----+
[12 Oct 2009 8:43] Jonas Oreland
We have added the FileSystemPathDD, FileSystemPathUndoFiles, and FileSystemPathDataFiles

Is this good enough ? 

Regardless, this should be reassigned as a docs bug i think

--

Setting waiting on feedback, to get Hartmut's opinion

/Jonas
[13 Nov 2009 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".