0

I'm building a RAID system based on a dell server with 18 drive bays; I want to use as JBOD and manage with LVM2/MDADM and use XFS as the base filesystem.

However... I have a few bits of PC software that only work with iSCSI targets (not a traditional SMB network share)... and I'd like to be able to see and manipulate the storage from Linux and Windows... Is there a file-system-emulator that would sit between iSCSI and XFS and would take the Windows filesystem (ExFAT, NTFS, UDF?) and translate that to "files" in a mounted linux filesystem?

Can an iSCSI volume in windows be "read-only-and re-mounted/scanned on demand" (Disconnect, remake the virtual filesystem, then allow remount by windows)? Windows access need not be fast...

Or... is there a iSCSI target-FS that is windows supported and a distributed filesystem so that it could be accessed simultaneously from Windows 7 and Linux (maybe that will be supported...?)?

Thor
  • 5
  • 1

2 Answers2

1

You should look into using ZFS. With that, you will have pools of storage space, which can be allocated either to traditional file systems, or virtual block devices.

The traditional file systems can be shared by NFS or SMB. The virtual block devices (zvolumes) can be used as iSCSI targets.

If you want to stick with XFS, then you can use Linux loopback device to create a virtual block device backed up by a file on the file system. That loopback block device can then be used as an iSCSI target.

iSCSI in itself is not tied to a filesystem. It is a filesystem agnostic mechanism to access remote block devices over IP network. So, once you connect to the iSCSI target from Windows, you can format the drive with any filesystem you want.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • 1
    ZFS would be a nice option to choose. OP can go with either FreeNAS or build ZFS setup himself and share it via iSCSI and SMB/NFS. We have similar setup running as a backup target with iSCSI and NFS configured on a single server. Might be useful: https://www.starwindsoftware.com/resource-library/discover-the-benefits-zfs-can-bring-to-your-it-infrastructure/ – Stuka Feb 14 '21 at 10:24
  • ZFS doesn't grow as well as LVM2/MDADM... you can't just drop in "another drive" and have it grow; you have to swap each drive to a bigger one and resilver between or you end up having to add 4 drives at a time, dedicating 2 (each time) to parity. With LVM2, I can have 4 to start, add one-by-one and "just" have 2 drives of "parity' for the entire set... – Thor Feb 15 '21 at 16:22
0

To export your iSCSI share, you have to options:

  • create an LVM volume and use that volume as iSCSI target;
  • create a sufficiently big (and possibly preallocated) file on your main XFS filesystem and use that file as iSCSI target.

The first option means you can directly mount the LVM volume on a convenient path, while the file option require you to create a loopback device to mount the filesystem inside the file itself.

However, the real issue is that you can not simply mount the LVM volume or the file/loopback while the share is used by the remote clien: exFAT is not a cluster-aware filesystem and so, by double-mounting it, you risk immediate and irreparable corruption.

The only (absolutely untest) options would be to either:

  • take a snapshot of the LVM volume/file and mount it, rather than mouting the "real" volume/file;
  • mount the backing volume/file in readonly mode (ie: mount -o ro <yourdev> <yourpath>)

That said, it surprises me that your devices are iSCSI-only. Double check if they support NFS, which would solve your double-mount issue completely.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • Is there any "journalling COW" that would work? Export iSCSI on COW1->base, Export COW2->base for local linux access, and the COWs would have to talk to each other... so that when you Apply COW1, COW2 is watching and can flag errors (yeesh... sound complicated a RCS-aware filesystem-aware block device. The problem is the video editing software won't work on a "network" drive (kinda like how WinDirStat won't work thru a USB cable to your phone)... if you make a "network" drive, it just doesn't show up :/ – Thor Feb 15 '21 at 16:30