Created
April 8, 2025 11:51
-
-
Save Cremator/fa518ce60c9543ba7fb8e25ef9bb17dc to your computer and use it in GitHub Desktop.
Use systemd unit to check for active MDS ceph cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Check for active MDS | |
Requires=ceph.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/bash -c "until ceph fs status -f json | jq -e \'.mdsmap[0].state == \"active\"\'; do sleep 1s; done" | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fstab:
[email protected]=/ /cephfs ceph noatime,_netdev,fsc=cephfs,rasize=268435456,dirstat,rbytes,x-systemd.requires=ceph-mds-active.service,x-systemd.device-timeout=30,x-systemd.mount-timeout=30 0 0