0

I want to export an iSCSI share read-only; I understand that's done with SWP, but... I can't figure out how to set that on a LUN. I've tried via config file and via command line... Example:

<target netstore>
  <backing-store /dev/sda3>
    SWP on
  </backing store>
</target>

Linux 5.4.0.65(mint)

Thor
  • 5
  • 1

1 Answers1

0

I believe you need to use the iscsi-swp command.

Rouben
  • 1,312
  • 10
  • 15
  • Thank you! For those who need it, it's part of the **libiscsi-bin** package. – Thor Feb 21 '21 at 14:57
  • Ack... but it doesn't seem to work; when I do `iscsi-swp iscsi://localhost/netstore/1 -swp on`, it just prints the SWP. Is there a way to _set_ it for Linux targets? – Thor Feb 21 '21 at 15:06
  • @Thor make sure you use two dashes for the —swp parameter, or single dash -s. If it’s still misbehaving, try setting the debug level to a value like 10 or 5 (not sure what these are, but generally the higher the value the more verbose the debug output). With the debug turned on, you should see step-by-step what’s being done by the command, and if there’s a failure somewhere along the way, you’ll see what it is, hopefully. – Rouben Feb 21 '21 at 19:19
  • Ahh... thanks! the `--swp on` did the trick – Thor Feb 22 '21 at 03:34
  • I’m glad that helped! – Rouben Feb 22 '21 at 04:07