Short note, if you do it like this it will fail. You have to use a regex like active+clean*. Because you always habe active+clean+scrub or deep-scrub Joachim Joachim Kraftmayer CEO joachim.kraftmayer@xxxxxxxxx www.clyso.com Hohenzollernstr. 27, 80801 Munich Utting a. A. | HR: Augsburg | HRB: 25866 | USt. ID-Nr.: DE2754306 Bogdan Adrian Velica <vbogdan@xxxxxxxxx> schrieb am Do., 29. Aug. 2024, 13:04: > Hi, > > It's a hacky idea but create a script that checks if the Ceph RBD pool is > fully "active+clean" to ensure it's ready before starting Proxmox VMs. > Something like this... > > 1. Bash Script: > - Write a script that checks if the Ceph RBD pool is in the "active+clean" > state using ceph pg stat or ceph -s. > - The script should run until the pool is ready before exiting. A loop or > something... > > 2. Systemd Service for Ceph Readiness: > - Create a systemd service unit file (something like: ceph-ready.service) > that runs the script at startup. > - Ensure the service waits until the Ceph cluster is ready before > proceeding. > > 3. Systemd Service for Proxmox VMs: > - Modify an existing Proxmox service or create a new one to depend on the > ceph-ready.service. > - Use After=ceph-ready.service in the unit file to ensure Proxmox VMs start > only after Ceph is ready. > > 4. Enable and Start the Services: > - Enable both systemd services to start at boot with systemctl enable. > - Reboot to ensure that Proxmox waits for Ceph before starting VMs. > > Just an idea... > > Thank you, > Bogdan Velica > croit.io > > On Thu, Aug 29, 2024 at 1:53 PM Alfredo Rezinovsky <alfrenovsky@xxxxxxxxx> > wrote: > > > I have a proxmox cluster using an external CEPH cluster. > > > > Sometimes due to blackouts the servers need to restart. If proxmox starts > > before CEPH is ready the VMs fail to boot. > > > > I want to add a dependency in proxmox to wait for ceph to be ready. > > > > I can work with a HEALTH_WARN as long the RBD pool is usable. > > > > ceph status exit status doesn´t helps > > > > Should I grep for "pgs not active" in ceph status or for "inactive" pgs > in > > ceph health or is there something more direct to know if everything is > > alright? > > > > > > > > -- > > Alfrenovsky > > _______________________________________________ > > ceph-users mailing list -- ceph-users@xxxxxxx > > To unsubscribe send an email to ceph-users-leave@xxxxxxx > > > _______________________________________________ > ceph-users mailing list -- ceph-users@xxxxxxx > To unsubscribe send an email to ceph-users-leave@xxxxxxx > _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx