Help Center> MapReduce Service> Component Operation Guide (LTS)> Using HDFS> FAQ> Can I Delete or Modify the Data Storage Directory in DataNode?
Updated on 2023-04-28 GMT+08:00

Can I Delete or Modify the Data Storage Directory in DataNode?

Question

  • In DataNode, the storage directory of data blocks is specified by dfs.datanode.data.dir. Can I modify dfs.datanode.data.dir to modify the data storage directory?
  • Can I modify files under the data storage directory?

Answer

During the system installation, you need to configure the dfs.datanode.data.dir parameter to specify one or more root directories.

  • During the system installation, you need to configure the dfs.datanode.data.dir parameter to specify one or more root directories.
  • Exercise caution when modifying dfs.datanode.data.dir. You can configure this parameter to add a new data root directory.
  • Do not modify or delete data blocks in the storage directory. Otherwise, the data blocks will lose.

Similarly, do not delete the storage directory, or modify or delete data blocks under the directory using the following parameters:

  • dfs.namenode.edits.dir
  • dfs.namenode.name.dir
  • dfs.journalnode.edits.dir