[stgt] read only access on 1 LUN for multiple initiators

Tomasz Chmielewski tch at wpkg.org
Mon Mar 1 00:26:46 CET 2010

On 01.03.2010 00:16, Kapetanakis Giannis wrote:
> On 1/3/2010 01:13, Tomasz Chmielewski wrote:
>> On 01.03.2010 00:10, Kapetanakis Giannis wrote:
>>> I will try this workaround `echo 3 > /proc/sys/vm/drop_caches` on the
>>> initiators.
>> Note that the target can also cache data. And the initiator which can
>> write data.
> hmm,
> you mean data "write" cached and not written to the block device which
> is served by iscsi?
> A normal `sync` would solve that I guess.

With write caching disabled in target configuration, yes, it should be 

Please be aware that even if you mount ext3 image read-only, i.e.:

mount -o ro /dev/sdx /mnt/sdx

/dev/sdx will be still written to (to replay the journal)!

So, it will be corrupted anyway.

Not sure if tgtd allows a target to be truly read only?

So that when the kernel detects a drive, it reports:

sd 1:0:0:0: [sdx] Write Protect is on

Tomasz Chmielewski

To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

More information about the stgt mailing list