Since battle.net does not allow installing games on NFS, I’ve decided to setup iSCSI target on Fedora.
- Install scsi-target-utils and create a disk image:
[root@fedora ~]# dnf install scsi-target-utils
[root@fedora ~]# mkdir /share/iscsi-disks
[root@fedora ~]# cd /share/iscsi-disks/
[root@fedora iscsi-disks]# dd if=/dev/zero of=disk01.img count=0 bs=1 seek=350G
[root@fedora iscsi-disks]# ls -alF
total 32822716
drwxr-xr-x. 1 root flatwhite 20 Jun 13 10:23 ./
drwxrwxr-x. 1 root flatwhite 592 Jun 14 11:35 ../
-rw-r--r--. 1 root flatwhite 375809638400 Jun 14 13:36 disk01.img
[root@fedora iscsi-disks]#
- Add tgt configuration file:
[root@fedora iscsi-disks]# vim /etc/tgt/conf.d/target01.conf
<target iqn.2025-03.coffee.nicewarm:fedora.target01>
# provided device as a iSCSI target
backing-store /share/iscsi-disks/disk01.img
# iSCSI Initiator's IQN you allow to connect
initiator-name iqn.2025-03.coffee.nicewarm:gentoo16.initiator
# authentication info ( set anyone you like for "username", "password" )
</target>
- Update SELinux and firewall rules:
[root@fedora iscsi-disks]# chcon -R -t tgtd_var_lib_t /share/iscsi_disks
[root@fedora iscsi-disks]# semanage fcontext -a -t tgtd_var_lib_t "/share/iscsi_disks(/.*)?"
[root@fedora iscsi-disks]# ls -alFZ
total 39776832
drwxr-xr-x. 1 root flatwhite system_u:object_r:tgtd_var_lib_t:s0 20 Jun 13 10:23 ./
drwxrwxr-x. 1 root flatwhite system_u:object_r:default_t:s0 592 Jun 14 11:35 ../
-rw-r--r--. 1 root flatwhite unconfined_u:object_r:tgtd_var_lib_t:s0 375809638400 Jun 14 13:45 disk01.img
[root@fedora iscsi-disks]# firewall-cmd --add-service=iscsi-target
success
[root@fedora iscsi-disks]# firewall-cmd --add-service=iscsi-target --permenent
success
- Start tgtd service and verify
[root@fedora iscsi-disks]# systemctl enable --now tgtd
[root@fedora iscsi-disks]# tgtadm --mode target --op show Target 1: iqn.2025-03.coffee.nicewarm:fedora.target01
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 1
Initiator: iqn.2025-03.coffee.nicewarm:gentoo16 alias: gentoo16
Connection: 0
IP Address: 192.168.85.254
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 375810 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: rdwr
Backing store path: /share/iscsi-disks/disk01.img
Backing store flags:
Account information:
ACL information:
ALL
iqn.2025-03.coffee.nicewarm:gentoo16.initiator
Gentoo is going to be iSCSI initator.
- Install and configure open-iscsi:
gentoo16 ~ # emerge sys-block/open-iscsi
gentoo16 ~ # cd /etc/iscsi
gentoo16 /etc/iscsi # tail -n 1 initiatorname.iscsi
InitiatorName=iqn.2025-03.coffee.nicewarm:gentoo16
gentoo16 /etc/iscsi # systemctl start iscsid
- Discover iSCSI target and login:
gentoo16 /etc/iscsi # iscsiadm -m discovery -t st -p 192.168.85.15 -P 1
Target: iqn.2025-03.coffee.nicewarm:fedora.target01
Portal: 192.168.85.15:3260,1
Iface Name: default
gentoo16 /etc/iscsi # iscsiadm -m node -T iqn.2025-03.coffee.nicewarm:fedora.target01 -l
Login to [iface: default, target: iqn.2025-03.coffee.nicewarm:fedora.target01, portal: 192.168.85.15,3260] successful.
gentoo16 /etc/iscsi #
- Verify new disk is attached:
gentoo16 /etc/iscsi # dmesg | tail -n 15
[ 7672.992912] thunderbolt 0000:00:0d.2: 0:6 <-> 1:14 (DP): failed to change bandwidth allocation
[ 7712.128451] Loading iSCSI transport class v2.0-870.
[ 7712.130614] iscsi: registered transport (tcp)
[ 7757.121749] scsi host1: iSCSI Initiator over TCP/IP
[ 7757.125558] scsi 1:0:0:0: RAID IET Controller 0001 PQ: 0 ANSI: 5
[ 7757.129678] scsi 1:0:0:0: Attached scsi generic sg2 type 12
[ 7757.130419] scsi 1:0:0:1: Direct-Access IET VIRTUAL-DISK 0001 PQ: 0 ANSI: 5
[ 7757.132855] sd 1:0:0:1: Attached scsi generic sg3 type 0
[ 7757.133029] sd 1:0:0:1: Power-on or device reset occurred
[ 7757.133306] sd 1:0:0:1: [sdc] 734003200 512-byte logical blocks: (376 GB/350 GiB)
[ 7757.133310] sd 1:0:0:1: [sdc] 4096-byte physical blocks
[ 7757.133445] sd 1:0:0:1: [sdc] Write Protect is off
[ 7757.133447] sd 1:0:0:1: [sdc] Mode Sense: 69 00 10 08
[ 7757.133737] sd 1:0:0:1: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 7757.161678] sd 1:0:0:1: [sdc] Attached SCSI disk
gentoo16 /etc/iscsi # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 0B 0 disk
sdb 8:16 1 477.5G 0 disk
└─sdb1 8:17 1 477.5G 0 part
sdc 8:32 0 350G 0 disk
zram0 252:0 0 0B 0 disk
zram1 252:1 0 0B 0 disk
zram2 252:2 0 14G 0 disk /var/tmp
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /efi
├─nvme0n1p2 259:2 0 4G 0 part [SWAP]
└─nvme0n1p3 259:3 0 471.9G 0 part /
gentoo16 /etc/iscsi #
- Setup newly attached disk:
gentoo16 /etc/iscsi # gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.10
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-734003166, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-734003166, default = 734001151) or {+-}size{KMGTP}:
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
Command (? for help): i
Using 1
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: 984FE47C-5DC5-41FA-B5A0-45AE5EED7271
First sector: 2048 (at 1024.0 KiB)
Last sector: 734001151 (at 350.0 GiB)
Partition size: 733999104 sectors (350.0 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'
Command (? for help): c
Using 1
Enter name: fedora-iscsi
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
gentoo16 /etc/iscsi # mkfs.ext4 /dev/sdc1
mke2fs 1.47.2 (1-Jan-2025)
Creating filesystem with 91749888 4k blocks and 22937600 inodes
Filesystem UUID: e91c4bfc-17be-4fba-bea7-e19cc33fda1c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
5. Update /etc/fstab and mount:
gentoo16 /etc/iscsi # cd
gentoo16 ~ # lsblk -o NAME,PARTUUID
NAME PARTUUID
sda
sdb
└─sdb1 b143c70c-01
sdc
└─sdc1 984fe47c-5dc5-41fa-b5a0-45ae5eed7271
zram0
zram1
zram2
nvme0n1
├─nvme0n1p1 55e2bb94-d149-45f1-a1fa-40eb55a1d4a4
├─nvme0n1p2 582238e0-7b6c-4315-8ce7-f54dd895afe2
└─nvme0n1p3 115a26d3-e19a-47ba-929d-04f65ebddb4e
gentoo16 ~ # cat /etc/fstab | tail -n 1
PARTUUID="984fe47c-5dc5-41fa-b5a0-45ae5eed7271" /mnt/iscsi/ ext4 noauto,_netdev 0 1
gentoo16 ~ # systemctl daemon-reload
gentoo16 ~ # mount /mnt/iscsi/
gentoo16 ~ # mount | grep iscsi
/dev/sdc1 on /mnt/iscsi type ext4 (rw,relatime,_netdev)
- Update Flatpak permissions:

