mc ready
The mc ready command checks the status of a cluster and whether the cluster has read and write quorum.
The following sends a GET request to the cluster at alias myaistor and returns its status.
mc ready myaistorThe command sends a GET request to the deployment at the alias myaistor.
The command repeats the request until it is successful.
The output before the cluster at alias myaistor is ready resembles the following:
The cluster `myaistor` is unreachable: Get "http://myaistor.example.com:9000/minio/health/cluster": dial tcp 198.51.100.0:9000: connect: connection refusedOnce the request succeeds in connecting to the myaistor deployment, the output resembles the following:
The cluster `myaistor` is readyThe command has the following syntax:
mc [GLOBALFLAGS] ready \
TARGET \
[--cluster-read] \
[--maintenance]- Brackets
[]indicate optional parameters. - Parameters sharing a line are mutually dependent.
- Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
TARGET
Required
The full path to the alias or prefix where the command should run.
--cluster-read
Optional
Checks if the cluster has enough quorum to serve READ requests.
--maintenance
Optional
Checks if the cluster can maintain read and write quorum if the node for the alias is taken down for maintenance.
Use an alias for the specific node you expect to take down for maintenance and not an alias set to a load balancer.
Global flags
This command supports any of the global flags.
Examples
Check if the cluster has read quorum
The following command checks that a deployment has sufficient drives available for read operations.
mc ready myaistor --cluster-readCheck if a cluster is down for maintenance
The following command checks whether the cluster can maintain read and write quorum during maintenance when the node at alias myaistor is taken down.
mc ready myaistor --maintenance