#16 sanlock metadata repair
Opened 5 months ago by 1007947985abcd. Modified 4 months ago

Hello! David, I am a Chinese sanlock user and also conducting some research using sanlock. I have submitted an issue on Redhat before, I believe you still remember me.
I have encountered some problems during use. Could you take some time to help me take a look? If you could give me some guidance, I would be very grateful.

  1. Because at times, the delta lease was accidentally damaged, forcing me to execute the 'sanlock direct init - s' command.

While lockspace is still active, If I execute 'sanlock direct init -s' to initialize the delta lease, the host generation field will become 0. After rejoining the lockspace using same hostId , the generation in delta lease will be less than the generation in paxos lease, causing all hosts to be unable to lock this paxos lease.
So can we use the same processing method for (gen in delta lease > gen in paxos lease) and (gen in delta lease < gen in paxos lease) ? Is there any problem with this?

Of course, executing 'sanlock direct init -r' on paxos leases is also a solution, but this requires executing it on every paxos lease, which can be cumbersome when there are a large number of leases.

2、
Sometimes paxos leases can also be accidentally damaged?

So I need to perform a sanlock direct init -r recovery. If I want to recover by automatically executing commands on the host, how can I ensure that only one host is executing this command?

If I want the Sanlock application to help me with this automatic recovery, is there a safer way?

In summary, my goal is to quickly and securely restore sanlock metadata when it becomes corrupted,Looking forward to your reply, thank you 。


@teigland Can you help me take a look at this issue?

New 'sanlock direct init_host' can be used to initialize a single delta lease:
https://pagure.io/sanlock/c/d3afbf2472d0db74db943be3ece7399a389f1646?branch=master

Log in to comment on this ticket.

Metadata