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

Pasi Kärkkäinen pasik at iki.fi
Sun Feb 28 20:55:21 CET 2010


On Sat, Feb 27, 2010 at 12:20:21AM +0200, Kapetanakis Giannis wrote:
> Hi,
>
> This probably have been brought up before, but I couldn't find any info.
>
> I'd like to setup multiple initiators (web/ftp cluster) to access  
> read-only the same iscsi target.
> I would prefer to do this without cluster fs (ie GFS) if possible.
> However I want to have right access on the target server locally.
>

This will be difficult. Normal filesystems (ext2, ext3, ext4, xfs, etc)
are designed to be in use only on one node, so they don't have cluster-aware 
locking, cache flushing etc..

Each server (initiator) will have its own linux kernel cache, so I bet
your setup won't work very easily.. unless there's some way to completely
disable all caching in the initiator kernels.

Basicly the problem is the initiators are not aware of the changes made
to the filesystem, since the changes are made on other systems.

-- Pasi

> I managed to do this but I have the following problem:
> When I write something on the target (locally on the server)
> the updates are not propagated to the initiators.
> If I unmount and mount again I can see the changes.
>
> I'm sharing /dev/vg01/iscsi which is an ext3 fs. It's locally mounted on  
> server
> and also mounted (/dev/sde -> /mnt) on clients.
>
> Server is centos 5.4 scsi-target-utils-0.0-6.20091205snap.el5_4.1
>
> <target iqn.2008-09.com.example:server.target2>
>     backing-store /dev/vg01/iscsi
>     incominguser user pass
>     initiator-address 10.0.0.0/26
>     write-cache off
> </target>
>
> client is Fedora 12 iscsi-initiator-utils-6.2.0.870-10.fc12.1.x86_64
>
> scsi22 : iSCSI Initiator over TCP/IP
> scsi 22:0:0:0: RAID              IET      Controller       0001 PQ: 0  
> ANSI: 5
> scsi 22:0:0:0: Attached scsi generic sg5 type 12
> scsi 22:0:0:1: Direct-Access     IET      VIRTUAL-DISK     0001 PQ: 0  
> ANSI: 5
> sd 22:0:0:1: Attached scsi generic sg6 type 0
> sd 22:0:0:1: [sde] 16777216 512-byte logical blocks: (8.58 GB/8.00 GiB)
> sd 22:0:0:1: [sde] Write Protect is off
> sd 22:0:0:1: [sde] Mode Sense: 79 00 00 08
> sd 22:0:0:1: [sde] Write cache: disabled, read cache: enabled, doesn't  
> support DPO or FUA
>  sde: unknown partition table
> sd 22:0:0:1: [sde] Attached SCSI disk
> kjournald starting.  Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
>
> so is GFS the only option?
>
> Giannis
>
> --
> 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
--
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