New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added sg_persist resource agent and ocft for it. #372
Conversation
sg_psersist is a Resource agent that implements SPC-3 Persistent Reservations (contribution from Evgeny Nifontov). Customers with an active-passive storage setup using MD-raid1 need to ensure, that the MD device is only activated on one system at a time. While this is clearly possible with the existing Raid1 RA in SLEHA-11, there is still the possibility that crazy system administrators assemble such devices manually from the command line, leading to a complete data-loss as a result... There exists an implementation of a resource agent around the "sg_persist" Utility from the sg3_utils package. The sg_persist RA is just based on the sg3_utils tools. It works as a Master/Slave resource. It registers a reservation key for devices when the resource starts and holds reservation when the resource promotes to be a Master. There exist only one Master in case of the reservation type is 1/3/5/6 and can have multi Masters in case of the reservation type is 7/8. Signed-off-by: Evgeny Nifontov Signed-off-by: Liuhua Wang <lwang@suse.com>
# OCF Resource Agent compliant PERSISTENT SCSI RESERVATION resource script. | ||
# | ||
# | ||
# Copyright (c) 2011 Evgeny Nifontov, All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liuhua, I think you should add yourself to the copyright list here too.
return $OCF_NOT_RUNNING | ||
fi | ||
|
||
if [ ${#RESERVED_DEVS[*]} -gt 0 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be completely wrong here, but should we not consider the device only reserved/registered if we actually own the minimum number of devices, not already with a single one? I admit I've not thought this through completely.
@lhwang, would it be possible that you rebase this request and also add any additional patches? Thanks! And many thanks for the contribution! |
sg_psersist is a Resource agent that implements SPC-3 Persistent
Reservations (contribution from Evgeny Nifontov).
Customers with an active-passive storage setup using MD-raid1 need
to ensure, that the MD device is only activated on one system at a
time. While this is clearly possible with the existing Raid1 RA in
SLEHA-11, there is still the possibility that crazy system
administrators assemble such devices manually from the command line,
leading to a complete data-loss as a result...
There exists an implementation of a resource agent around the "sg_persist"
Utility from the sg3_utils package. The sg_persist RA is just based on
the sg3_utils tools. It works as a Master/Slave resource. It registers a
reservation key for devices when the resource starts and holds reservation
when the resource promotes to be a Master. There exist only one Master
in case of the reservation type is 1/3/5/6 and can have multi Masters
in case of the reservation type is 7/8.
Signed-off-by: Evgeny Nifontov
Signed-off-by: Liuhua Wang lwang@suse.com