sg_persist and power down the reservation holder

Posted on

I am trying to achieve a High Availbaility simulation with sg_persist

The main usage of sg_persist is for multi computers accessing a scsi device over internet (one is writing only).

To simulate that I am using tgtadmin utility to simulate a SCSI device maybe from a file or from a device on the target setup
I further used the iscsiadmin to run the initatior setup over nodes (A) and (B).

I installed the sg_persist on two different initiators.
Each initiator is registered through sg_persist with a certain key.
Further I reserved the scsi device for write / exclusive for initiator (A).

Assuming that a power failure goes on initiator (A), I power it off or echo b > /proc/ the trigger or ifconfig eth0 down.

How can I release the SCSI resource from initiator (B) and reserve it for (B)?

Note those are the capabilities of my scsi device.
sg_persist -c /dev/sg1
IET VIRTUAL-DISK 0001
Peripheral device type: disk
Report capabilities response:
Compatible Reservation Handling(CRH): 0
Specify Initiator Ports Capable(SIP_C): 0
All Target Ports Capable(ATP_C): 0
Persist Through Power Loss Capable(PTPL_C): 0
Type Mask Valid(TMV): 0
Allow Commands: 0
Persist Through Power Loss Active(PTPL_A): 0

I am not using the standart /etc/cluster/cluster.xml or fencing things.
I am just using bare sg_persist on a RH-6 and 5

Appreciate your help

Attachments

Responses