Kinda like TargetCLI on linux -> https://blog.hegars.com/?p=433
Baby’s First iSCSI with ZFS Setup – the sporks space
Install
Install stuff
pkg install vim
pkg install fusefs-ntfs-2022.10.3_1
Create a target
zfs create -V 4GB -o compression=on srv/target
Create /etc/ctl.conf to export target
portal-group pg0 {
discovery-auth-group no-authentication
listen 0.0.0.0
listen [::]
}
target iqn.2010-04.com.hegars.storage:target0 {
auth-group no-authentication
portal-group pg0
lun 0 {
path /dev/zvol/zroot/target
}
}
Start service
service ctld start
Connect the client
RO mount of NTFS volume on Host
Look at the “disk”
fdisk /dev/zvol/zroot/target
WARNING: fdisk is deprecated and is not available in FreeBSD 15 or later.
Please use gpart instead.
******* Working on device /dev/zvol/zroot/target *******
parameters extracted from in-core disklabel are:
cylinders=65270 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=65270 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 238 (0xee),(EFI GPT)
start 1, size 4294967295 (2097151 Meg), flag 0
beg: cyl 0/ head 0/ sector 2;
end: cyl 765/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
geom -t
Geom Class Provider
vtbd0 DISK vtbd0
vtbd0 DEV
vtbd0 PART vtbd0p1
vtbd0p1 DEV
vtbd0p1 LABEL gpt/gptboot0
gpt/gptboot0 DEV
vtbd0 PART vtbd0p2
vtbd0p2 DEV
swap SWAP
vtbd0 PART vtbd0p3
vtbd0p3 DEV
zfs::vdev ZFS::VDEV
zfs::zvol::zroot/target ZFS::ZVOL zvol/zroot/target
zvol/zroot/target DEV
ntfs_3g /dev/zvol/zroot/target /mnt/ntfs/ -o ro
Speed over 1000/400 NBN to DC location
