getting "table is full" error even if the table size is much smaller than tablespace Currently I am using MySQL NDBCluster 7.3.5.
I have created one UNDOFILE hhme.dat with INITIAL_SIZE=200m.

Also one tablespace hhmefep_tbs with DATAFILE hhmefep_tbs.dat having INITIAL_SIZE=500M ENGINE=NDB.

Also the output of query is:

mysql&gt; select FILE_NAME,TOTAL_EXTENTS,FREE_EXTENTS,EXTENT_SIZE, extra  from information_schema.FILES where TABLESPACE_NAME='hhmefep_tbs' and FILE_TYPE="DATAFILE";
+-----------------+---------------+--------------+-------------+----------------+
| FILE_NAME       | TOTAL_EXTENTS | FREE_EXTENTS | EXTENT_SIZE | extra          |
+-----------------+---------------+--------------+-------------+----------------+
| hhmefep_tbs.dat |           500 |           21 |     1048576 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat |           500 |           21 |     1048576 | CLUSTER_NODE=2 |
+-----------------+---------------+--------------+-------------+----------------+


Database total size is 32MB and all tables are using ENGINE=NDB.

Still I am getting "table is full" error when I perform inserts.

Can anyone point out the issue here since 500MB of tablespace is not yet exhausted.

Why am I getting free_extents = 21 ?

Edit:
The DDL for creating this DB schema is as given below:

mysql&gt; CREATE LOGFILE GROUP hhme ADD UNDOFILE 'hhme.dat' UNDO_BUFFER_SIZE=16M INITIAL_SIZE=200m ENGINE=NDB;
Query OK, 0 rows affected (9.70 sec)

mysql&gt; CREATE DATABASE hhmefep;
Query OK, 1 row affected (0.05 sec)

mysql&gt; CREATE TABLESPACE hhmefep_tbs ADD DATAFILE 'hhmefep_tbs.dat' USE LOGFILE GROUP hhme INITIAL_SIZE=500M ENGINE=NDB;
Query OK, 0 rows affected (24.30 sec)

[root@mgmtserver ~]$ ndb_mgm -e "all report mem"
Connected to Management Server at: localhost:1186
Node 1: Data usage is 16%(2723 32K pages of total 16384)
Node 1: Index usage is 9%(1605 8K pages of total 16416)
Node 2: Data usage is 16%(2723 32K pages of total 16384)
Node 2: Index usage is 9%(1605 8K pages of total 16416)


Edit2: Output of query suggested by @user3420095:

mysql&gt; select FILE_NAME, FREE_EXTENTS*EXTENT_SIZE as bytes_free, extra  
    -&gt; from information_schema.FILES 
    -&gt; where TABLESPACE_NAME='hhmefep_tbs' 
    -&gt; and   FILE_TYPE="DATAFILE";
+-----------------+------------+----------------+
| FILE_NAME       | bytes_free | extra          |
+-----------------+------------+----------------+
| hhmefep_tbs.dat |   22020096 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat |   22020096 | CLUSTER_NODE=2 |
+-----------------+------------+----------------+


Hope it clears confusion.
First of all, are you creating your tables with 

CREATE TABLE table_name TABLESPACE hhmefep_tbs STORAGE DISK ENGINE NDBCLUSTER;

or just

CREATE TABLE table_name ENGINE=NDBCLUSTER;


First one is to create table to stores table data on disk, the second, which is default mysql cluster theme and the reason why mysql cluster exist, stores data in memory.

So if you store your data in memory, you should run the command on management node, ( use ndb_mgm command to enter ndb_mgm console)

ALL REPORT MEMORY USAGE


and check if your memory usage is full or not.

Also note that when you use disk tablespaces on mysql, a varchar(100) variable will reserve all the space like you have 100 characters in all rows of the column.

This will be more accurate for you to use to check if TS is full or not.

select FILE_NAME, FREE_EXTENTS*EXTENT_SIZE as bytes_free, extra  
from information_schema.FILES 
where TABLESPACE_NAME='hhmefep_tbs' 
and   FILE_TYPE="DATAFILE";