We help IT Professionals succeed at work.

Three fast iSCSI questions

Pugglewuggle
Pugglewuggle asked
on
Using Ubuntu Server:

1) Can I have a partition mounted in the OS and shared via iSCSI at the same time, or does the partition have to be unmounted to share it with iSCSI

2) If it can be mounted while sharing, does this cause any problems to do so? Is it okay to export paths on the partition with NFS or Samba while iSCSI is sharing the partition?

3) Can I share only a folder on a partition instead of the whole partition?

Thanks!
Comment
Watch Question

President
Top Expert 2010
Commented:
1. You can "share" an iSCSI target, but this will result in data corruption unless all systems mount it read-only. (That is because neither system will know if the other system makes a change)
2. N/A
3. See above

Frank ContrepoisVP Technical Sales

Commented:
or you need to use a cluster filesystem
What is a cluster file system?


So can I export the same partition as an NFS share as read only and as an iSCSI LUN as read/write without the risk of corruption? Or vice versa? You said ALL systems, so I want to be clear...

And what's the difference between like /dev/sdb and /dev/sdb1? I iSCSI shared SDB1 and the initiator got nothing, but shared regular SDB and got the partition as it should be. The opposite was the case with NFS... if I mount regular SDB on the server then I get nothing, if I mount SDB1 on the server  I get the file system.

DavidPresident
Top Expert 2010
Commented:
/dev/sdb is entire disk.  /dev/sdb1 is the first primary partition.

iSCSI is block oriented, NFS shares a file system.
Gotcha. So what about:

So can I export the same partition as an NFS share as read only and as an iSCSI LUN as read/write without the risk of corruption? Or vice versa? You said ALL systems, so I want to be clear..

and what is a cluster fs?

Thanks!
DavidPresident
Top Expert 2010
Commented:
Nope, not that easy.   The system that mounts it as read only will get bad information.   It has no way of knowing data is stale.   Say the first 4 blocks of data on the disk contain ALPHA, BETA, DELTA, GAMMA.    Computer "A" reads first four blocks, and they will remain in cache.    The computer with read/write access now decides to change the data to ALPHA,DELTA,DELTA,DELTA.

Computer A, for whatever reason, has had to flush the first two blocks of data (ALPHA BETA), but keeps the DELTA,GAMMA in cache.  It needs to read the first 4 blocks again, so it goes to the disk and gets ALPHA,DELTA, but since the last 2 blocks are still in cache, it incorrectly assumes the data is ALPHA, DELTA, DELTA, GAMMA.

So this is why you need something special in clusters.  You have to inform the read-only computer that the data in cache is stale, or it has risk of using old data when it goes to cache.

A clustered file system allows two or more computers to share this device because the file system has a mechanism to let all the computers who share the file system know about stale cache due to writes (among other things).

Here is a good wiki + some commercial and free products
http://en.wikipedia.org/wiki/Clustered_file_system
So what do you recommend to run on OpenSUSE/Ubuntu/Debian Linux as a CFS?
DavidPresident
Top Expert 2010

Commented:
If you are looking for a freebie, I am not aware of one that will work for OpenSUSE/Ubuntu/Debian.  All the good ones, like GPFS, GFS, CXFS, etc,  require specific hardware/software configurations and cost $$$.

You need to just do CIFS/NFS sharing.  If you want to go to OpenSolaris, and have only a few TB, then Nexenta has a turnkey add-on that is free for < 4TB, and pricing is reasonable if > 4TB
How do you feel about OpenFiler vs these solutions?
DavidPresident
Top Expert 2010
Commented:
I would rate them in terms of features,reliability,suitability of use in this order   Nexenta -> OpenFiler -> FreeNAS -> PlainVanillaLinux

Based on just my personal experience and the contents of this message, then I recommend you looking at just Nexenta & OpenFiler.  If this is for a business and you need something that is "commercial" quality that actually qualifies hardware and insures you don't build configurations that will be buggy, go with Nexenta (especially if you don't have a unix sysadmin), but openFiler should also meet your needs quite nicely.  

The other two options will also work, but only if you have a UNIX/LINUX sysadmin due to the learning curve.


Can you send me a SAN/storage configuration guide for Nexenta?
DavidPresident
Top Expert 2010

Commented:
http://www.nexenta.com/corp/solutions

There is also nexenta.org.  The .com site is for the commercial version that has support and more features.  The org is open-source.  One of the big things is that there is a hardware compatibility document.  If the RAID, motherboard, system, etc, is not on the list, then the software will not install.   This is for everybody's protection.   The nexenta.org flavor is more flexible.     The nexenta.com version has a full turnkey image that installs on bare metal, or as a virtual machine if you are an ESX/ESXi shop.