Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网站建设 > 服务器相关 > 请教iSCSI的target端多用户同时访问的问题
【标  题】:请教iSCSI的target端多用户同时访问的问题
【关键字】:iSCSI,target
【来  源】:http://www.cublog.cn/u/5737/showart.php?id=277270

请教iSCSI的target端多用户同时访问的问题

Your Ad Here
请教iSCSI的target端多用户同时访问的问题

目前 ,我在Linux端建立了一个 target software (用的open-source的iSCSI Enterprise Target) ,我在Linux上挂了两块硬盘, 一个是系统盘, 另外一个 data盘被shared 了(全是ntfs格式的)

我用两台PC (WindowsXP)做测试 , 当都用Microsoft Initiator 2.03 连接这个target成功后, 并分别 auto-mount Linux端shared那个盘后,  当两台PC同时要在mounted的盘上创建目录的时候, 我发现 ,当时两台PC是都成功的创建目录了。 但是 当他们 umount的时候, 再重新连接的时候, 发现只有一个 用户的创建的目录还在 ,另外一个用户创建的目录丢失了。

我对iSCSI也不是太熟悉 。

下面是我参加国外论坛一个人回的:
[align=left][font=Courier New][size=2][color=#0000ff]iSCSI really is just the handling of data blocks to and from the hard disk. Think of it as an extension of the hard disk that goes across the wire.[/color][/size][/font][/align][align=left][font=Courier New][size=2][color=#0000ff][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=#0000ff]If you have multiple servers connected to a volume it is exactly like having a shared SCSI bus between multiple hosts. There is nothing in the SCSI controllers to prevent you from corrupting your shared volumes. This kind of control needs to come from the operating system. The OS needs to know the volume is shared and either a special file-system or special handling needs to take place. I don't know of a shared file-system in Windows, but Microsoft Cluster Services allow one server at a time access to a shared volume using SCSI Reserve/Release.[/color][/size][/font][/align][align=left][font=Courier New][size=2][color=#0000ff][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=#0000ff]iSCSI must follow the SCSI protocol and the only function available to aid in shared access is SCSI RESERVE/RELEASE, which is a form of mutex.[/color][/size][/font][/align][align=left][font=Courier New][size=2][color=#0000ff][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=#0000ff]-Ross[/color][/size][/font][/align][align=left][font=Courier New][size=2][color=black][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=black]看他的意思, SCSI 是无能为力的, 它本身控制不了并发访问,必须由OS来控制[/color][/size][/font][/align][align=left][font=Courier New][size=2][color=black][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=black]请问由别人做过的吗? 我需要额外 加上软件吗?还是要购买跟SAN有关的卡 或者设备什么的呢?[/color][/size][/font][/align][align=left][font=Courier New][size=2][color=#0000ff][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=#0000ff]谢谢我的mail是  [email=bob_zhang2004@163.com]bob_zhang2004@163.com[/email] [/color][/size][/font][/align][align=left][font=Courier New][size=2][color=#0000ff][/color][/size][/font] [/align][align=left][font=Courier New][size=2][color=#0000ff]kernelChina.cublog.cn 欢迎讨论。 谢谢了。 [/color][/size][/font][/align]

2007-2-2 13:17 冬瓜头
这位老外说得没错。
多os共享卷,要么ha,要么clusterfs。

2007-2-2 15:39 bob_zhang2004
回复 #2 冬瓜头 的帖子

如果 我想实现多个initiator 同时访问 同一个target device , 我是不是只需要安装 GFS 就可以了呢?  因为我也搜索了GFS 的东西, 好像要用 Redhat AS 4 ,利用rpm命令装好多个软件包, 因为我是把它移植到arm上的, flash 就 12M啊 。


另外 , GFS 的概念 是和 ntfs ,或者 ext3 同一级别的概念吗?  

如果linux端用GFS 的话, 那我的Initiator 又是 WindowsXP ‘s MS Initiator 我怎么mount 呢?
我看windows 端也有一个 叫 cluser service的什么咚咚, 可以和 GFS 兼容吗?


下面我们mailing list的进一步讨论:

> -----Original Message-----
> From: Bob Zhang [mailto:bob_zhang2004@163.com]
> Sent: Thursday, February 01, 2007 11:51 PM
> To: Ross S. W. Walker
> Cc: Scott Kaelin; [email=blackmagic02881@gmail.com][color=#0000ff]blackmagic02881@gmail.com[/color][/email];
> [email=iscsitarget-devel@lists.sourceforge.net][color=#0000ff]iscsitarget-devel@lists.sourceforge.net[/color][/email]
> Subject: RE: [Iscsitarget-devel] about mutex between
> multi-users to write a same target disk ? for example ,
> multi-users write a same directory of /dev/hdb1 at the same time
>
>
>
> >
> > iSCSI really is just the handling of data blocks to and from the
> > hard disk. Think of it as an extension of the hard disk that goes
> > across the wire.
> >
> > If you have multiple servers connected to a volume it is exactly
> > like having a shared SCSI bus between multiple hosts. There is
> > nothing in the SCSI controllers to prevent you from corrupting your
> > shared volumes. This kind of control needs to come from the
> > operating system. The OS needs to know the volume is shared and
> > either a special file-system or special handling needs to take
> > place. I don't know of a shared file-system in Windows, but
> > Microsoft Cluster Services allow one server at a time access to a
> > shared volume using SCSI Reserve/Release.
>
> First ,thanks very much for your replying !
> As far as you know , maybe can I buy a card or Adapter to
> solve the mutex issue ?
> These two days , I am browsing some productions related with
> SAN which looks that no this problem .
> Do you know how SAN solve this problem ? software  or hardware ?
>
> Another , during  developing IET ,how are you testing this case ?
> only single-user accessing a same target disk device ?

An iSCSI HBA follows the same iSCSI protocol standards as MS Initiator,
it just does it faster with lower CPU overhead.

> >
> > iSCSI must follow the SCSI protocol and the only function available
> > to aid in shared access is SCSI RESERVE/RELEASE, which is a form of
> > mutex.
> >
> > -Ross
> Excuse me ,i am really a newbie for SCSI , can you tell me
> some detailed infomation ?  How can I modify the Linux Kernel
> ?  currently ,is there some open-source to implement it ? or
> some related document or URL ?
>

You must use a service that allows multi-user access to a shared disk.
Think of it as a disk and you will have a better picture. The iSCSI
volume you connect to is a disk drive for all intensive purposes and
what would happen if you connect one disk drive to two computers and try
to use it from both machines at the same time? Well if you have ever
tried it you would see you would get a corrupt file-system. Same thing
goes for iSCSI.

Now there exists software packages here and there that will allow you to
use a shared disk drive from multiple systems at the same time. You need
to research what those software packages are and find one that fits your
needs best.


-Ross

[[i] 本帖最后由 bob_zhang2004 于 2007-2-2 15:42 编辑 [/i]]

2007-2-2 16:27 冬瓜头
gfs是可以,但是好像没有windows版,想让windows和unix共享卷,我看只能用nfs了。

gfs其后端实际的fs可以是ext2、3等等,gfs大致等于=nfs+优化的cluster实现。

mount gfs和mount nfs差不多。

2007-2-2 18:19 bob_zhang2004
回复 #2 冬瓜头 的帖子

>> 多os共享卷,要么ha,要么clusterfs。
你所说的 ha是什么意思? 另外windows 下面有 cluster file system 吗?

我只要事先把 一个磁盘 format成 Windows版本的cluster file system ,然后再插到Linux上shared ,你看这样行吗?

2007-2-4 20:58 chinakkee
小弟,强烈推荐用OCFS,这样两台windows可以同时访问共享卷。算我开玩笑了:lol:

2007-2-5 08:11 冬瓜头
nfs

2007-2-5 11:11 wings_song
回复 #1 bob_zhang2004 的帖子

使用BWFS,这是一款clusterfs

2007-2-12 16:08 baisb
stornext
IDC:2010年iSCSI市场份额将达21%:【上一篇】
如何多人共享 iscsi target server:【下一篇】
【相关文章】
  • IDC:2010年iSCSI市场份额将达21%
  • 初试iscsi!续
  • 初试iscsi!
  • Spring2 AOP在使用XML配置时如何获得target及JoinPoint
  • centos3.8+iscsi+gfs
  • SGA_TARGET自动内存管理
  • AppFuse学习笔记(2)--Ant中Target的依赖关系(AppFuse的部署过程)
  • iscsi_target for freebsd
  • targetCoordinateSpace 作为转换参考点使用的那个坐标系所在的目标路径
  • InvocationTargetException原因分析
  • 【随机文章】
  • Spry Framework入门(五)——数据集过滤及淡入淡出效果
  • ARCA GT2000 网卡内核驱动BUG引起的路由网络故障解决
  • Quick File Viewer V1.1
  • 对论坛中有关数据类型转换的整理
  • 黄金甲遭抢红楼被注 中文域名保护再敲警钟
  • 用简单的实例来实践TDD的核心思想
  • C# 导入文件时字符集的处理问题
  • [转贴]VB等语言调用C++DLL
  • Sql2005 Beta3 Reporint Service问题1 -Row的Grouping属性无法取消
  • 对知识产权的尊重
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.