Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: NDB_FS appears on the SHOW DATABASES; API command

From: Anatoly Pidruchny <apidruchny(at)newxt.com>
Date: Mon Jul 23 2007 - 13:39:43 EDT


Sebastien,

there is a bug of MySQL that any directory that exists in the MySQL server data directory is treated as a database name. In your case, you use the same directory /var/lib/mysql as the data directory for both MySQL and NDB data nodes. The NDB data node creates the NDB_FS sub-directory and then MySQL server thinks that it is a database. I would recommend you to use different directories for MySQL and NDB data nodes. For example, create a directory /var/lib/ndb_data, and then set datadir=/var/lib/ndb_data in the [ndbd_default] section of the cluster configuration file, and do not use datadir in the [ndbd] section(s) of the file.

The simple test for the bug is: create a directory FOO in the data directory of MySQL server, and then it will show up when you do "show databases" from mysql tool, but if you try to "use" it, you will get an error:

mysql> show databases;

+--------------------+
| Database           |
+--------------------+
| information_schema |
| FOO                |
| mysql              |
| test               |
+--------------------+

5 rows in set (0.56 sec)

mysql> use FOO;
ERROR 1049 (42000): Unknown database 'foo'

Anatoly.
> Hi everyone,
>
> I'm experiencing some odd behaviour between API and DATA nodes.
>
> Here as it goes :
>
> Cluster Configuration
> ---------------------
> [ndbd(NDB)] 1 node(s)
> id=4 @192.168.11.139 (Version: 5.1.20, Nodegroup: 0, Master)
>
> [ndb_mgmd(MGM)] 1 node(s)
> id=1 @192.168.11.139 (Version: 5.1.20)
>
> [mysqld(API)] 2 node(s)
> id=3 @192.168.11.139 (Version: 5.1.20)
> id=5 (not connected, accepting connect from 192.168.11.65)
>
> config is as follows :
>
> [NDB_MGMD DEFAULT]
>
> [NDBD DEFAULT]
> NoOfReplicas=1
> DataMemory=128M
> IndexMemory=32M
> RedoBuffer=16M
> MaxNoOfAttributes = 5000
> MaxNoOfOrderedIndexes = 1024
>
> [MYSQLD DEFAULT]
>
> [TCP DEFAULT]
> SendBufferMemory=1024K
> ReceiveBufferMemory=256K
>
> # Managment Node
> [NDB_MGMD]
> HostName=192.168.11.139
> id=1
> LogDestination=FILE:filename=/var/log/mysql/ndb_mgmd.log,maxsize=1000000,maxfiles=9
>
> # Storage Nodes
> [NDBD]
> hostname=192.168.11.139
> datadir=/var/lib/mysql
> id=4
>
>
> # API Nodes
> [MYSQLD]
> Id=3
> hostname=192.168.11.139
> [MYSQLD]
> Id=5
> hostname=192.168.11.65
>
>
> And when I perform a SHOW DATABASES; from the MySQL CLuster API Node,
> here is what I get:
>
> mysql> SHOW DATABASES;
> +--------------------+
> | Database |
> +--------------------+
> | information_schema |
> | mysql |
> | ndb_4_fs |
> | test |
> +--------------------+
> 4 rows in set (0.02 sec)
>
>
> Obviously, the ndb_4_fs should be visible, but I can't figure what is
> causing this.
>
> When I try this (from
> http://dev.mysql.com/doc/refman/5.0/fr/information-schema.html to know
> which tables are ndbclustered) :
> SELECT table_name, table_type, engine
> FROM information_schema.tables
> ORDER BY table_name DESC;
>
> I get this :
>
> ERROR 1018 (HY000): Can't read dir of './ndb_4_fs/' (errno: 13)
>
> mysql> SHOW WARNINGS;
> +-------+------+---------------+
> | Level | Code | Message |
> +-------+------+---------------+
> | Error | 1105 | Unknown error |
> +-------+------+---------------+
> 1 row in set (0.00 sec)
>
> I tried re-install the whole (tes, of course) cmuster but even after a
> fresh install, I come back at this point.
>
> Do you know what may be causing all this mess? (fuzzy config, maybe?)
>
> Best regards,
>
> Sebastien LELIEVRE
> slelievre@tbs-internet.com Services to ISP
> TBS-internet http://www.TBS-internet.com
>
> # cat /etc/mysql/my.cnf
> [mysqld]
>
> skip-innodb
> skip-locking
>
> log-output=FILE
>
> thread_cache_size=52
> key_buffer=160M
> join_buffer=1M
> table_cache=512
> sort_buffer_size=1M
> read_buffer_size=1M
> read_rnd_buffer_size=768K
> thread_concurrency=2
> tmp_table_size = 64M
> max_allowed_packet = 160M
>
> query_cache_limit=1M
> query_cache_size=32M
> query_cache_type=1
>

-- 
MySQL Cluster Mailing List
For list archives: 
http://lists.mysql.com/cluster
To unsubscribe:    
http://lists.mysql.com/cluster?unsub=lists@pantek.com
Received on Mon Jul 23 13:40:24 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:33 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library