SOLVED How should I set up multiple iSCSI targets on single zfs pool?

Status
Not open for further replies.

BloodyBonkers

Dabbler
Joined
Sep 17, 2017
Messages
21
Hello!
What I want to achieve is to have a couple PC's with only a small SSD as a boot drive to have a secondary storage option which can be used in real-time with a relatively low latency.
I want to give each computer about 500GB of dedicated storage, for use as mass storage. I am also gonna try some games over both 1gbe and 10gbe connections.

(1) How should I set up iSCSI on a single zfs pool when I want multiple targets as dedicated storage for multiple computers.
(2) For example target-1 for pc number 1 and target-2 for pc number 2. Should I create two extents with a zvol each? Would it work if I did that, or is there a better way?
(3) I heard iSCSI doesn't like multiple users, does that mean multiple users on a single target or multiple users with access to the same extent?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
zvols don't need separate extents but are definitely the way to go. Is there a reason you need to share this as block storage an not file based shares? I have run Windows VMs over SMB shares with good results on 1gbe networking. Though for multiple PCs you will want 10gbe at least to the switch.
How should I set up iSCSI on a single zfs pool when I want multiple targets as dedicated storage for multiple computers.
Just add zvols per PC and each one as its own target. You can allow single IPs to connect to each but you would then need static IPs on the PCs or at least DHCP reservation/static leases.
Should I create two extents with a zvol each? Would it work if I did that
Each extent need to be backed by a separate zvol however you can have several extents per target. access control/masking is usually handled at the target level so you will want one zvol per extent per target.
I heard iSCSI doesn't like multiple users, does that mean multiple users on a single target or multiple users with access to the same extent?
iSCSI doesn't care about multiple users. Other users care about other users. This really only applies to users sharing and extent (and by extension the underlying zvol) because PC1 could overwrite something PC2 is trying to read. (more importantly the metadata than file contents.). Systems like ESXi have special filesystems that allow for this but windows does not natively (not counting cluster services).
 

BloodyBonkers

Dabbler
Joined
Sep 17, 2017
Messages
21
Is there a reason you need to share this as block storage an not file based shares? I have run Windows VMs over SMB shares with good results on 1gbe networking. Though for multiple PCs you will want 10gbe at least to the switch.
I am probably only going to access the drive after booting into windows, but I would like a solution that windows and most programs treat as a physical storage device. Does Windows treat it as a regular hard drive or as a network folder? If its the latter I would prefer to avoid that since windows tend to be unable to automatically reconnect to them at boot, forcing me to physically go into file explorer to click into the shared folder for windows to connect to it.

Just add zvols per PC and each one as its own target. You can allow single IPs to connect to each but you would then need static IPs on the PCs or at least DHCP reservation/static leases.
This part is reasonable.

Each extent need to be backed by a separate zvol however you can have several extents per target. access control/masking is usually handled at the target level so you will want one zvol per extent per target.
Ok, that made things pretty easy to understand. Thanks
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
I am probably only going to access the drive after booting into windows, but I would like a solution that windows and most programs treat as a physical storage device. Does Windows treat it as a regular hard drive or as a network folder? If its the latter I would prefer to avoid that since windows tend to be unable to automatically reconnect to them at boot, forcing me to physically go into file explorer to click into the shared folder for windows to connect to it.
Sounds like you need to fix something in Windows. Ant any rate, iSCSI disk will show up and work just like a new unpartitioned hard drive. You will need to initialize and format the disk in Disk Management.
 

BloodyBonkers

Dabbler
Joined
Sep 17, 2017
Messages
21
Sounds like you need to fix something in Windows.
Its an issue with windows itself, the problem has been apparent in editions of windows as early as XP and still exists in windows 10.

Ant any rate, iSCSI disk will show up and work just like a new unpartitioned hard drive. You will need to initialize and format the disk in Disk Management.
Yeah, I know that part now. iSCSI is probably best for my use case. Thanks for the assistance. Much appreciated.
 
Status
Not open for further replies.
Top