Creating a Disk Store or Using the Default

You can create a disk store for persistence and/or overflow or use the default disk store. Data from multiple tables can be stored in the same disk store.

Default Disk Stores

Tables that do not name a disk store but specify persistence or overflow in their CREATE TABLE statement are automatically assigned to the default disk store, GFXD-DEFAULT-DISKSTORE. Also, gateway, AsyncEventListener, and DBSynchronizer queues always use the default disk store. The default diskstore is saved to the GemFire XD data store's working directory, unless you change the value of the sys-disk-dir boot property to specify another location.

Note: GemFire XD locator and data store members also create disk store files in order to persist the data dictionary for the tables and indexes created the GemFire XD distributed system. These persistence files are stored in the datadictionary subdirectory of each locator and data store that joins the distributed system. The data dictionary is always persisted, regardless of whether you configure data persistence or overflow for individual tables. Table data is not persisted by default; if you shut down all GemFire XD members, the tables are empty on the next startup.

Never move or modify the datadictionary subdirectory or any other disk store directory. If the data dictionary or a disk store directory of a GemFire XD locator or data store member is unavailable, other members may fail to start if the "offline" member potentially holds a more recent copy of the data. In this case, members will display a ConflictingPersistentDataException when attempting to start.

Creating a Named Disk Store

You create a named disk store in the data dictionary using the CREATE DISKSTORE DDL statement. You then assign the disk store to an individual table by specifying the disk store in the table's CREATE TABLE DDL statement. You can store data from multiple tables and queues in the same named disk store.