In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
These commands are uploaded to the CephFS file system in your Ceph cluster. Note that only one file system is allowed by default. To enable the creation of multiple file systems, use the ceph fs flag set enable_multiple true command
File system related
Ceph fs new
This command creates a new file system, and the file system name and metadata pool name are clear. The specified datapool is the default datapool, which cannot be changed once set, and each file system has its own set of MDS daemons assigned to the level, so make sure you have enough backup daemons to accommodate the new file system.
Ceh fs ls
List existing file systems
Ceph fs dump [epoch]
This will dump the FSMap for a given period of time (default: current), including all file system settings, the MDS daemon and its levels, and a list of standby MDS daemons
Ceph fs rm [--yes-i-really-mean-it]
"destroy the CephFS file system, which erases information about the file system status from FSMap, and the metadata pool and datapool remain the same and must be destroyed separately."
Ceph fs get
Get information about named file systems, including settings and levels, which is a subset of the same information from the fs dump command
Ceph fs set
Change settings on the file system that are specific to named file systems and do not affect other file systems
Ceph fs add_data_pool
Add a datapool to the file system, which can be used for file layouts as an alternate location to store file data.
Ceph fs rm_data_pool
This command removes the specified pool from the list of data pools in the file system, and if any file has the layout of the deleted data pool, the file data is not available and the default data pool (the first data pool created when the file system is created) cannot be deleted.
Set correlation
Ceph fs set max_file_size
CephFS has a configurable maximum file size, which is 1TB by default, and if you want to store large files in CephFS, you can set this limit even higher, which is a 64-bit field. Setting max_file_size to 0 does not disable this restriction, it only restricts the permission of the client to create empty files.
Maximum file size and performanc
CephFS enforces the maximum file size limit when appending files or setting file sizes, which does not affect anything stored in any storage mode. When a user creates a large file (without having to write any data to it), some actions (such as deletion) cause MDS to perform a large number of operations to check for the existence of possible RADOS objects (depending on the file size)
The max_file_size setting prevents users from creating exabyte-sized files, causing load on the MDS because it attempts to enumerate objects during operations such as counting or deleting.
Down dropped the cluster
Shut down the CephFS cluster by setting the down parameter
Ceph fs set down true
Restore cluster
Ceph fs set down false
This also restores the previous values of max_mds, shuts down the MDS daemon in some way to flush journals to the metadata pool, and stops I / O operations on all clients.
Quickly shut down the cluster for deletion or disaster recovery
To allow quick deletion of a file system (for testing) or to quickly close a file system and MDS daemon, use the fs fail command, which sets the file system flag to prevent alternate files from being activated on the file system
Ceph fs fail
You can also do this manually by doing the following
Ceph fs set joinable false
The operator may then fail all ranks, which will cause the MDS daemon to be reborn as a standby and the file system to be degraded
Ceph mds fail:
Once all ranks is inactive, you can also delete the file system or leave it in that state for other purposes (perhaps disaster recovery). To restore the cluster, simply set the joinable flag
Ceph fs set joinable true
Daemon process
Most commands that operate on mds take parameters, which can take one of three forms
:
:
Commands to operate the MDS daemon
Ceph mds fail
Mark the MDS daemon as lost, which means that the cluster will perform this operation when the MDS daemon fails to send a MDS_beacon_grace second message to mon. If the daemon is active and a suitable standby server is available, use mds fail to force a failover to the standby server.
If the MDS daemon is actually still running, using MDS fail will cause the daemon to restart. If it is active and a standby is available, the "failed" daemon will be returned as a standby
Ceph tell mds. Command...
Send the command to the MDS daemon, using mds. Send commands to all daemons, using ceph tell mds. To view the help documentation
Ceph mds repaired
Get metadata for a given MDS that is known about Mon
Ceph mds repaired
Mark the file system level as repaired. As the name implies, this command does not change MDS, it operates on file system ranks that has been marked as corrupted
Minimum client version
Sometimes it is necessary to set the minimum Ceph version of the client to function properly in order to connect to the CephFS cluster. Older clients may sometimes still be running with errors that can cause locking problems between clients (due to feature releases). CephFS provides a mechanism for setting the minimum client version
Ceph fs set min_compat_client
For example, only Nautilus clients are allowed to use
Cephfs set cephfs min_compat_client nautilus
Clients running older versions will be automatically expelled
Global Settin
Ceph fs flag set []
Set the global CephFS flag (that is, not specific to a specific file system). Currently, the only flag setting is "enable_multiple", which allows multiple CephFS file systems. Some flags require you to use "- yes-i-really-mean-it" or a similar string to prompt for confirmation. Please consider these operations carefully before continuing, as they are more dangerous operations.
Advanced usage
These commands are not required in normal operation and can be used in special cases. Incorrect use of these commands can cause serious problems, such as file system inaccessibility
Ceph mds compat rm_compat # remove compatibility feature Flag
Ceph mds compat rm_incompat # removes incompatible feature flags
Ceph mds compat show # displays the MDS compatibility flag
Ceph mds rmfailed # remove rank from the failed collection
Ceph fs reset # this command resets the file system state to the default name (except name and pool), and non-zero rank is saved in the stop set
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.