Running must-gather in modular mode

The must-gather command provides an ability to collect only the required logs. Run the must-gather command in modular mode to collect logs for required resources instead of all resources.

The must-gather command runs quickly in a modular mode and collects logs for required resources. To collect logs, enter the following command:

 oc adm must-gather --image=registry.redhat.io/odf4/odf-must-gather-rhel9:<odf-version> -- /usr/bin/gather <-arg> --dest-dir=<directory-name>

Replace the <-arg> option with one or more of the following options to specify the required resources for collecting logs:

Note: If you run the must-gather command without replacing the <-arg> option with the required options or resources, the command collects and displays logs for all resources.
-o, --odf
ODF logs (includes Ceph resources, namespaced resources, clusterscoped resources, and Ceph logs)
-d, --dr
DR logs
-n, --noobaa
Noobaa logs
-c, --ceph
Ceph commands and pod logs
-cl, --ceph-logs
Ceph daemon, kernel, journal logs, and crash reports
-ns, --namespaced
namespaced resources
-cs, --clusterscoped
clusterscoped resources
-pc, --provider
openshift-storage-client logs from a provider/consumer cluster (includes all the logs under operator namespace, pods, deployments, secrets, configmap, and other resources)
-h, --help
Print help message