Re: How to know is ceph is ready?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



steps 2 to 4 are exactly my idea.

In step 1 All I will check is all active (o non inactive or unknown). Clean
is not necessary, I can boot VMs with degraded.as long they are active.

El jue, 29 ago 2024 a las 8:03, Bogdan Adrian Velica (<vbogdan@xxxxxxxxx>)
escribió:

> 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
>>
>

-- 
Alfrenovsky
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux