文件系统管理¶
这些命令适用于 Ceph 集群的 CephFS 文件系统。注意,默认情况下,只允许一个文件系统;执行 ceph fs flag set enable_multiple true
后才允许创建多个文件系统。
fs new
This command creates a new file system. The file system name and metadata pool
name are self-explanatory. The specified data pool is the default data pool and
cannot be changed once set. Each file system has its own set of MDS daemons
assigned to ranks so ensure that you have sufficient standby daemons available
to accommodate the new file system.
fs ls
List all file systems by name.
fs dump [epoch]
This dumps the FSMap at the given epoch (default: current) which includes all
file system settings, MDS daemons and the ranks they hold, and the list of
standby MDS daemons.
fs rm [--yes-i-really-mean-it]
Destroy a CephFS file system. This wipes information about the state of the
file system from the FSMap. The metadata pool and data pools are untouched and
must be destroyed separately.
fs get
Get information about the named file system, including settings and ranks. This
is a subset of the same information from the fs dump command.
fs set
Change a setting on a file system. These settings are specific to the named
file system and do not affect other file systems.
fs add_data_pool
Add a data pool to the file system. This pool can be used for file layouts
as an alternate location to store file data.
fs rm_data_pool
This command removes the specified pool from the list of data pools for the
file system. If any files have layouts for the removed data pool, the file
data will become unavailable. The default data pool (when creating the file
system) cannot be removed.