The data that IoTDB stores is divided into three categories, namely data files, system files, and pre-write log files.
Data files store all the data that the user wrote to IoTDB, which contains TsFile and other files. TsFile storage directory can be configured with the configuration item (see for details). Other files can be configured through data_dir configuration item (see for details).
In order to better support users’ storage requirements such as disk space expansion, IoTDB supports multiple file directorys storage methods for TsFile storage configuration. Users can set multiple storage paths as data storage locations( see tsfile_dir configuration item), and you can specify or customize the directory selection policy (see configuration item for details).
System files include restore files and schema files, which store metadata information of data in IoTDB. It can be configured through the configuration item (see System Layer for details).
For a clearer understanding of configuring the data storage directory, we will give an excample in this section.
All data directory paths involved in storage directory setting are: data_dir, tsfile_dir, mult_dir_strategy, sys_dir, and wal_dir, which refer to data files, stroage strategy, system files, and pre-write log files. You can choose to configure the items you’d like to change, otherwise, you can use the system default configuration item without any operation.
Here we give an example of a user who configures all five configurations mentioned above. The configuration items are as follow:
After setting the configuration, the system will:
- Save all data files except TsFile in D:\iotdb\data\data
- Save system data in $IOTDB_HOME\data\system
- Save WAL data in $IOTDB_HOME\data
For example, modify the tsfile_dir to:
You need to move files in E:\iotdb\data\data1 to D:\data4, move files in %IOTDB_HOME%\data\data2 to E:\data5, move files in F:\data3 to F:\data6. In this way, the system will operation normally.