On 2017-10-12 11:32, David Disseldorp wrote:
> On Wed, 11 Oct 2017 14:03:59 -0400, Jason Dillaman wrote:
>
> On Wed, Oct 11, 2017 at 1:10 PM, Samuel Soulard
> <[email protected]> wrote: Hmmm, If you failover the identity of the
> LIO configuration including PGRs
> (I believe they are files on disk), this would work no? Using an 2 ISCSI
> gateways which have shared storage to store the LIO configuration and PGR
> data.
> Are you referring to the Active Persist Through Power Loss (APTPL)
> support in LIO where it writes the PR metadata to
> "/var/target/pr/aptpl_<wwn>"? I suppose that would work for a
> Pacemaker failover if you had a shared file system mounted between all
> your gateways *and* the initiator requests APTPL mode(?).
I'm going off on a tangent here, but I can't seem to find where LIO
reads the /var/target/pr/aptpl_<wwn> PR state back off disk -
__core_scsi3_write_aptpl_to_file() seems to be the only function that
uses the path. Otherwise I would have thought the same, that the
propagating the file to backup gateways prior to failover would be
sufficient.
Cheers, David
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
This code may help from rtslib
https://github.com/open-iscsi/rtslib-fb/blob/master/rtslib/tcm.py
def _config_pr_aptpl(self):
"""
LIO actually *writes* pr aptpl info to the filesystem, so we
need to read it in and squirt it back into configfs when we configure
the storage object. BLEH.
"""
from .root import RTSRoot
aptpl_dir = "%s/pr" % RTSRoot().dbroot
try:
lines = fread("%s/aptpl_%s" % (aptpl_dir, self.wwn)).split()
except:
return
if not lines[0].startswith("PR_REG_START:"):
return
reservations = []
for line in lines:
if line.startswith("PR_REG_START:"):
res_list = []
elif line.startswith("PR_REG_END:"):
reservations.append(res_list)
else:
res_list.append(line.strip())
for res in reservations:
fwrite(self.path + "/pr/res_aptpl_metadata", ",".join(res))_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com