3

I am able to mount a iSCSI SAN drive onto multiple RHEL Servers, but when I make changes to the files on SAN, they are not evident on the other servers sharing the same drive. Am I missing something?

Looking for replies! Cheers, Anshuman

Anshuman
  • 239
  • 1
  • 2
  • 8

2 Answers2

3

Unless you have a filesystem installed on that iSCSI LUN that is designed to handle multi-mounts like you have there, this is entirely expected. iSCSI is a block-sharing protocol, not a file-sharing protocol, and it's up to the filesystem to handle things like file-locking, maintaining a coherent directory and file index, and flushed writes.

OCFS2 is one such filesystem, as is RedHat's GFS2. Something like ext4, btrfs, or xfs are not.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
  • Thanks! Can we create a gfs2 file system just like we do for ext4 while discovering the iSCSI for the first time ie. using mkfs command?? – Anshuman Apr 06 '12 at 18:43
  • @Anshuman It's much more complicated then that. GFS2 (the docs are linked) can only really be used inside of a RedHat cluster, and leverages clustered-LVM for volume management. It's more of a stack than a filesystem. – sysadmin1138 Apr 06 '12 at 18:47
  • However OCFS2 is really simple to set up and run (at least on Debian, but I suppose it's about the same for RH). – wazoox Apr 06 '12 at 20:52
2

iscsi itself does not support concurrent access to the same lun without causing corruption, unless you have a clustering filesystem. are you sure that your setup is even supported by freenas? since iscsi lun is a block device like a hard drive so you cannot realy have it in multiple client servers. nfs allows shared access, however.

johnshen64
  • 5,865
  • 24
  • 17
  • FreeNAS did allow me to share the drive among many rhel servers. But I guess they are not in con-current mode. Once U re-start each server, can U see the modified drive contents! – Anshuman Apr 06 '12 at 18:46
  • without something like a clustering filesystem, the behavior will be undefined and unsafe. even though it is allowed by freenas, it may not work as you would like it to. – johnshen64 Apr 06 '12 at 18:50