Skip to main content

FRONTENDS_DISKS

Description​

The frontends_disks table function generates a temporary table that allows you to view the disk information of FE nodes in the current Doris cluster. Its result is essentially the same as the information displayed by the show frontends disks statement, but the field types in frontends_disks() are more explicit, and you can use the table generated by the TVF for filtering, joining, and other operations.

This function can be used in the FROM clause.

Syntax​

FRONTENDS_DISKS()

Access Control Requirements​

PrivilegeObjectNotes
ADMIN_PRIVglobal

Return Value​

View the returned fields of the frontends_disks() function

desc function frontends_disks();
+------------+------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+------+------+-------+---------+-------+
| Name | text | No | false | NULL | NONE |
| Host | text | No | false | NULL | NONE |
| DirType | text | No | false | NULL | NONE |
| Dir | text | No | false | NULL | NONE |
| Filesystem | text | No | false | NULL | NONE |
| Capacity | text | No | false | NULL | NONE |
| Used | text | No | false | NULL | NONE |
| Available | text | No | false | NULL | NONE |
| UseRate | text | No | false | NULL | NONE |
| MountOn | text | No | false | NULL | NONE |
+------------+------+------+-------+---------+-------+

The field meanings are as follows:

FieldTypeExplanation
NameTEXTThe unique identifier for the frontend node (FE).
HostTEXTThe IP address or hostname of the frontend node.
DirTypeTEXTThe type of directory (e.g., meta, log, audit-log, temp, deploy).
DirTEXTThe path to the directory on the disk for the specified directory type.
FilesystemTEXTThe filesystem type.
CapacityTEXTThe total storage capacity of the disk.
UsedTEXTThe amount of disk space that has been used.
AvailableTEXTThe amount of disk space that is available for use.
UseRateTEXTThe percentage of disk space that is used.
MountOnTEXTThe mount point of the disk in the file system.

example​

select * from frontends_disks();
+-----------------------------------------+------------+-----------+-----------------------------------------------------------+--------------+----------+------+-----------+---------+------------+
| Name | Host | DirType | Dir | Filesystem | Capacity | Used | Available | UseRate | MountOn |
+-----------------------------------------+------------+-----------+-----------------------------------------------------------+--------------+----------+------+-----------+---------+------------+
| fe_f4642d47_62a2_44a2_b79d_3259050ab9de | 10.x.x.6 | meta | /mnt/disk2/doris/fe/doris-meta | /dev/nvme1n1 | 3T | 3T | 223G | 94% | /mnt/disk2 |
| fe_f4642d47_62a2_44a2_b79d_3259050ab9de | 10.x.x.6 | log | /mnt/disk2/doris/fe/log | /dev/nvme1n1 | 3T | 3T | 223G | 94% | /mnt/disk2 |
| fe_f4642d47_62a2_44a2_b79d_3259050ab9de | 10.x.x.6 | audit-log | /mnt/disk2/doris/fe/log | /dev/nvme1n1 | 3T | 3T | 223G | 94% | /mnt/disk2 |
| fe_f4642d47_62a2_44a2_b79d_3259050ab9de | 10.x.x.6 | temp | /mnt/disk2/doris/fe/temp_dir | /dev/nvme1n1 | 3T | 3T | 223G | 94% | /mnt/disk2 |
| fe_f4642d47_62a2_44a2_b79d_3259050ab9de | 10.x.x.6 | deploy | /mnt/disk2/doris/fe | /dev/nvme1n1 | 3T | 3T | 223G | 94% | /mnt/disk2 |
+-----------------------------------------+------------+-----------+-----------------------------------------------------------+--------------+----------+------+-----------+---------+------------+