Article 4VDBF Enable persistent reservations for iSCSI volumes

Enable persistent reservations for iSCSI volumes

by
stivraboti
from LinuxQuestions.org on (#4VDBF)
Hi,

I have configured iSCSI LUNs (targets) on Deiban 9 using targetcli-fb. Everything is working as expected. The problem comes when I try to use the LUNs as cluster storage for Xen or MS SQL - they require persistent reservations. I have installed sg3-utils to try to use sg_persist to turn on persistence for my targets/volumes but without any luck (I am really new to the iSCSI scene). I wen thru the man page for sg_persist, but I am struggling understanding its concept.

My LUNs are using FILEIO images and the images are located in /mystorage.
Here is what I've tried so far:
Code:root@[REDACTED]~# sg_persist --in --report-capabilities -v /dev/vdb
inquiry cdb: 12 00 00 00 24 00
inquiry: scsi status: Unknown status [0x7e]
sg_persist: /dev/vdb doesn't respond to a SCSI INQUIRYCode:root@[REDACTED] ~# sg_persist --in --report-capabilities -v /storage
inquiry cdb: 12 00 00 00 24 00
inquiry: pass through os error: Inappropriate ioctl for device
sg_persist: /storage doesn't respond to a SCSI INQUIRYCode:root@[REDACTED] ~# sg_persist --device=/dev/vdb
>> No service action given; assume Persistent Reserve In command
>> with Read Keys service action
inquiry: scsi status: Unknown status [0x7e]
sg_persist: /dev/vdb doesn't respond to a SCSI INQUIRYCode:root@[REDACTED] ~# sg_persist --out --register --param-sark=123test /dev/vdb
inquiry: scsi status: Unknown status [0x7e]
sg_persist: /dev/vdb doesn't respond to a SCSI INQUIRYCode:root@[REDACTED] ~# sg_persist --out --register --param-sark=123test /storage/vol01.img
inquiry: pass through os error: Inappropriate ioctl for device
sg_persist: /storage/vol01.img doesn't respond to a SCSI INQUIRYHere are more details:
- My /storage folder is located on: /dev/vdb/storage (LVM)
- System: Linux [REDACTED] 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
- Targetcli version: targetcli version 2.1.fb43
- My initiators are on Windows Server 2019 (SQL 2017)

Code:root@[REDACTED] ~# cat /sys/kernel/config/target/core/fileio_0/[REDACTED]/pr/res_*
APTPL Bit Status: Disabled
Ready to process PR APTPL metadata..
No SPC-3 Reservation holder
No SPC-3 Reservation holder
0x0000002d
No SPC-3 Reservation holder
SPC-3 PR Registrations:
iSCSI Node: iqn.[REDACTED],i,0x400001370000 Key: [REDACTED] PRgen: 0x0000002c
No SPC-3 Reservation holder
SPC3_PERSISTENT_RESERVATIONSSome general guidance will mean a lot!latest?d=yIl2AUoC8zA latest?i=fCI-h_1g0xE:yVR3izRdQyg:F7zBnMy latest?i=fCI-h_1g0xE:yVR3izRdQyg:V_sGLiP latest?d=qj6IDK7rITs latest?i=fCI-h_1g0xE:yVR3izRdQyg:gIN9vFwfCI-h_1g0xE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments