Help Center> MapReduce Service> Component Operation Guide (LTS)> Using HDFS> FAQ> Why Is the Storage Type of File Copies DISK When the Tiered Storage Policy Is LAZY_PERSIST?
Updated on 2023-04-28 GMT+08:00

Why Is the Storage Type of File Copies DISK When the Tiered Storage Policy Is LAZY_PERSIST?

Question

When the storage policy of the file is set to LAZY_PERSIST, the storage type of the first replica should be RAM_DISK, and the storage type of other replicas should be DISK.

But why is the storage type of all copies shown as DISK actually?

Answer

When a user writes into a file whose storage policy is LAZY_PERSIST, three replicas are written one by one. The first replica is preferentially written into the DataNode where the client is located. The storage type of all replicas is DISK in the following scenarios:

  • If the DataNode where the client is located does not have the RAM disk, the first replica is written into the disk of the DataNode where the client is located, and other replicas are written into the disks of other nodes.
  • If the DataNode where the client is located has the RAM disk, and the value of dfs.datanode.max.locked.memory is not specified or smaller than the value of dfs.blocksize (To obtain the parameter value, log in to FusionInsight Manager and choose Cluster > Services > HDFS > Configuration > All Configurations, and search for this parameter.), the first replica is written into the disk of the DataNode where the client is located, and other replicas are written into the disks of other nodes.