iSCSI configuration - I can connect to the flash drive, but not shares


Recommended Posts

Hi

 

I've been working on iSCSI, and managed to build and install IET http://iscsitarget.sourceforge.net/

 

I've set up its config, and can connect to the flash drive on unraid, over iSCSI (i.e. /boot). HOORAY!

 

But, I can't connect to the unraid disks or user shares. I think iSCSI shares disks directlyish, and so the machine I connect from has to know how to read the file system on the disk.

 

Does anyone have any hints on the final steps of configuring iSCSI to work with unRAID?

 

FYI, i'm connecting using globalSAN iSCSI on my Mac to connect (running Mac OSX Snow Leopard)

 

If I get this working, I plan to write up the process I used on this forum.

 

Cheers!

Link to comment

If there isn't a reiserFS for Mac, for testing purposes of iSCSI you should consider the following:

 

  • Install a non-array drive
  • configure it into iSCSI on server side
  • format it with a filesystem the Mac supports*
  • test drive via iSCSI Mac Client

 

*Perhaps ext2 as a simple test?

 

If that works, then it may be as you suspect, the lack of reiserFS support on the Mac.

Link to comment

Thanks for the info :) I'll have to read about reiserfs.

 

Is it possible to format the unraid array volume as hfs+?

 

Not if you want to keep the drive recognized as being part of the array. The unRAID array currently requires all drives to be a single partition starting at sector 63 and extending to the end of the drive formatted with the reiserFS.

 

This is why I suggested you use a drive outside the array so you have further options available. The normal unRAID distro does not include support for many filesystems, but does seem to support Apple Extended HFS file system HFSPlus (CONFIG_HFSPLUS_FS) as a module in addition to EXT2, REISERFS, ISO9660, FAT, MSDOS, VFAT, NTFS (read only), and FUSE.

Link to comment

Can you post your iSCSI exports? I don't think you can make a LUN from the user shares.... iSCSI can only provide block devices... I think.

 

 

 

You can create a file with dd and provide it too. I don't think that exporting an unRAID disk directly is a good idea, but exporting files or other disks is.

Link to comment

The only time I've used iSCSI is on a commercial (Promise VessRAID) iSCSI server.  That iSCSI server serves up raw partitions, and when I mount those partitions on a Mac for the first time, I then format those partitions from the Mac.

 

If I understand correctly, you shouldn't mount a typical partition via iSCSI in more than one place, including mounting it on both an Unraid server and on a Mac or Windows client.  I think you'd need some kind of filesystem that can be multiply mounted and could understand writing by more than one system at a time.  Since iSCSI serves up raw partitions, having it mounted for writing from more than one place at a time could lead to filesystem corruption.

 

Of course I may have the wrong idea about iSCSI, but that's what I recall.

Link to comment

I don't think I'm going to be able to get the mac to read ReiserFS. Is that the only way to be access the unRAID array over iSCSI?

 

What about the shfs volume? Here's my output from df and mount.

 

root@centax:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdd1              1954036    793576   1160460  41% /boot
/dev/md1             976732736 900753804  75978932  93% /mnt/disk1
/dev/md2             1465093832 1118241572 346852260  77% /mnt/disk2
shfs                 2441826568 2018995376 422831192  83% /mnt/user
root@centax:~# mount
fusectl on /sys/fs/fuse/connections type fusectl (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sdd1 on /boot type vfat (rw,noatime,nodiratime,umask=0,shortname=mixed)
/dev/md1 on /mnt/disk1 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)
/dev/md2 on /mnt/disk2 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)
shfs on /mnt/user type fuse.shfs (rw,nosuid,nodev,noatime,allow_other,default_permissions)

 

I have the following targets in my iSCSI config (ietd.conf)

 

#Flash drive
Target iqn.2001-04.com.fredsherbet:flash
        Lun 0 Path=/dev/sdd1,Type=fileio,ScsiId=xyz,ScsiSN=xyz

#Array disk 1
Target iqn.2001-04.com.fredsherbet:array.disk1
        Lun 0 Path=/dev/md1,Type=fileio,ScsiId=centax.disk1,ScsiSN=disk1

#Array disk 2
Target iqn.2001-04.com.fredsherbet:array.disk2
        Lun 0 Path=/dev/md2,Type=fileio,ScsiId=centax.disk2,ScsiSN=disk2

#Array user shares
Target iqn.2001-04.com.fredsherbet:array.user
        Lun 0 Path=shfs,Type=fileio,ScsiId=centax.user,ScsiSN=user

 

I can connect to the flash drive (FAT32) and see the files and write to in, no problem.

 

I can connect to the disks, but the Mac can't even recognise the partition table, but I can see the disks in disk utility.

 

When I connect to the user shares (i.e. shfs), iSCSI on the Mac says it's connected, but I can't see any disks in Finder or Disk Utility.

 

Should it be possible for the shfs volume to be an iSCSI target? If so, how might I connect to it on the mac?

 

Thanks again :)

Link to comment

All of your LUNs are set to 0. Increment  them. First one is 0, next is 1, next is 2... etc.

 

Don't take my word for it, but this probably won't work:

#Array user shares

Target iqn.2001-04.com.fredsherbet:array.user

        Lun 0 Path=shfs,Type=fileio,ScsiId=centax.user,ScsiSN=user

 

 

iSCSI can only export block devices.

Link to comment

Like he said, he's gotten the Flash (/boot) to work properly over iSCSI and that isn't a block device.

 

It's related to ReiserFS.. It just won't work on MacOSX.

 

I don't think you'll be able to get your disks exported via iSCSI to Mac OSX... Another linux distro with Reiser support, sure, but not OSX.

Link to comment

I don't think you'll be able to get your disks exported via iSCSI to Mac OSX... Another linux distro with Reiser support, sure, but not OSX.

 

I think this is probably true :( It's been interesting to try, though :)

 

Thanks for the info Aaron, I'll fix up those LUNs.

Don't take my word for it, but this probably won't work:

#Array user shares

Target iqn.2001-04.com.fredsherbet:array.user

        Lun 0 Path=shfs,Type=fileio,ScsiId=centax.user,ScsiSN=user

 

 

iSCSI can only export block devices.

 

I'm interested in what the difference is between the /dev/sdxx /dev/mdx and shfs 'devices' are. I know that the sdxx are the actual disks. The mdx are something to do with unRAID's parity array system, and shfs is something to do with SSHFS (just unsecured?)

 

How come iSCSI can connect to the mdxs, but not shfs?

 

Can I create some sort of virtual disk/file system that would work with OSX? Maybe a HFS+ partition inside the unRAID array?

Link to comment

... shfs is something to do with SSHFS (just unsecured?)

 

I did some digging and it would appear that is not correct. See http://lime-technology.com/forum/index.php?topic=1442.msg9894;topicseen#msg9894

 

shfs is some propriety lime-tech magic 'shared file system'. Is it not a block device?

 

Is there some similar magic I can do, to create a virtual disk that my mac can read? (I admit, this is both clutching at straws, and probably not even a good solution)

Link to comment

shfs is some propriety lime-tech magic 'shared file system'. Is it not a block device?

It is a user-space proprietary FUSE block device as defined by lime-technology.  It might support what is needed by iscsi, it might not.  You would use /dev/md1 through /dev/md20 as the target, if iscsi can deal with it. 

 

The roadmap shows Tom @ lime-tech is not interested in implementing iSCSI in the core product at this time, but will accept arguments to convince him otherwise.

Link to comment

What I was hoping to solve with iSCSI was instability using Apple apps with AFP or Samba.

 

The connections seem stable - they don't drop or disappear at all, but some Apple software that heavily uses the link (iTunes and Aperture) doesn't always work the way I'd like. Aperture forgets that the unRAID volume is where the master pictures are. iTunes seems to lose connection with its files (on unRAID), and has in the past deleted apps/music from my iPhone, and can't complete a 'consolidate media files' operation.

 

I'm going to try using sshfs, which I had forgotten I have installed and working.

 

The final solution will be to stop using unRAID as a primary media server, and just for backup and secondary media serving.

Link to comment

What I was hoping to solve with iSCSI was instability using Apple apps with AFP or Samba.

 

The connections seem stable - they don't drop or disappear at all, but some Apple software that heavily uses the link (iTunes and Aperture) doesn't always work the way I'd like. Aperture forgets that the unRAID volume is where the master pictures are. iTunes seems to lose connection with its files (on unRAID), and has in the past deleted apps/music from my iPhone, and can't complete a 'consolidate media files' operation.

 

I'm going to try using sshfs, which I had forgotten I have installed and working.

 

The final solution will be to stop using unRAID as a primary media server, and just for backup and secondary media serving.

AFP is being actively works by lime-tech, so you might find a solution in the 5.0beta3 release due out shortly.  From what I've been reading it will support AFP.
Link to comment

What I was hoping to solve with iSCSI was instability using Apple apps with AFP or Samba.

 

The connections seem stable - they don't drop or disappear at all, but some Apple software that heavily uses the link (iTunes and Aperture) doesn't always work the way I'd like. Aperture forgets that the unRAID volume is where the master pictures are. iTunes seems to lose connection with its files (on unRAID), and has in the past deleted apps/music from my iPhone, and can't complete a 'consolidate media files' operation.

 

I'm going to try using sshfs, which I had forgotten I have installed and working.

 

The final solution will be to stop using unRAID as a primary media server, and just for backup and secondary media serving.

 

I use unRAID for iTunes all the time. It allows a unified library for the house. I never lose connection with iTunes to unRAID, ever.

 

I cannot speak to Aperture or iPhone.

 

Are you sure you are looking for the right thing? If this were me, I would be looking at my networking, cables or switches/router first. One flaky port, or a bad cable, working mostly, but not well. It seems to me that there are a lot of Mac users using their unRAIDs for a lot of Apple Apps that are not having your experiences. I am not sure that getting iSCSI to work will give you what you want.

 

Maybe you can explain in more detail what your issues are and some of the very experienced Mac users/unRAID users can offer alternative suggestions.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.