Adding an external iSCSI share to TrueNAS Scale

dslewiston

Cadet
Joined
Jun 13, 2022
Messages
9
First off I have an external Drobo B1200i and it has a lot of storage on it and I don't want it to go to waste. So I was struggling with how to provision its storage into the TrueNas Scale server I have. I searched and searched and ultimately TrueNas is built to serve up shares not consume them. Drobo B1200i only allows shares in iSCSI so I was in a pickle.

Ultimately I found I could add in iSCSI external shares from the terminal at the os layer and then serve up that storage to the application layer through TrueNas. Below are the commands I ran to make it all work. Hopefully, it helps someone else.

OS Version:TrueNAS-SCALE-22.12.0
Product:Z10PA-D8 Series
Model:Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Memory:63 GiB

#ssh as root
cd /

#Confirm what disks you have mounted already, screenshot to compare later
lsblk

#make apt executable
chmod +x /usr/bin/apt

#update the apt list and install open-iscsi

apt update
apt -y install open-iscs

#Start the iscsid service
service iscsid start

#Check Targets
/sbin/iscsiadm -m discovery -t sendtargets -p 192.168.1.202
192.168.1.201:3260,0 iqn.2005-06.com.drobo:b1200i.drb142801000133.id0
192.168.1.202:3260,0 iqn.2005-06.com.drobo:b1200i.drb142801000133.id0
192.168.1.203:3260,0 iqn.2005-06.com.drobo:b1200i.drb142801000133.id0

#Add iscsi source ( Drobo B1200i )
/sbin/iscsiadm -m node -T iqn.2005-06.com.drobo:b1200i.drb142801000133.id0 -p 192.168.1.202:3260 --login

#Logging in to [iface: default, target: iqn.2005-06.com.drobo:b1200i.drb142801000133.id0, portal: 192.168.1.202,3260]

#Login to [iface: default, target: iqn.2005-06.com.drobo:b1200i.drb142801000133.id0, portal: 192.168.1.202,3260] successful.

#run disk command again to check for new mounted iscsi drive and what the system thinks it is.
lsblk
fdisk -l

#for me it came back as sdc 1 and respectively 2

#Make the directory to mount it to.
mkdir /mnt/B1200i
mount /dev/sdc1 /mnt/B1200i

#At this moment I have my old “disk” available but need to import it into the existing storage pool.

#I had to export/detach the pool so that I could import the pool back
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
You are missing an important point, TrueNAS SCALE is an appliance type software. Changes outside of the GUI or API are generally not saved. Enabling "apt" and updating the local OS will almost certainly be lost on SCALE update. Even some manual changes will be lost after a reboot. See;

I get that you want to "hack" TrueNAS SCALE to do what you want. And I am not trying to stop you. This is just a simple warning. And a warning to others to understand what you are doing, so you can repeat them if a reboot or update erases your change.

Our goal here is help people create NASes that don't loose data.
 

dslewiston

Cadet
Joined
Jun 13, 2022
Messages
9
You are missing an important point, TrueNAS SCALE is an appliance type software. Changes outside of the GUI or API are generally not saved. Enabling "apt" and updating the local OS will almost certainly be lost on SCALE update. Even some manual changes will be lost after a reboot. See;

I get that you want to "hack" TrueNAS SCALE to do what you want. And I am not trying to stop you. This is just a simple warning. And a warning to others to understand what you are doing, so you can repeat them if a reboot or update erases your change.

Our goal here is help people create NASes that don't loose data.
Hi Arwin,

Thanks for your input and for reminding everyone, myself included, about the appliance-type nature of TrueNAS SCALE. I totally get the concerns you raised about making changes outside the GUI or API, and I appreciate you clarifying that information to the community. You are 100% correct!

My intention was simply to express the need for a way to consume iSCSI storage within the appliance, in addition to serving it. I think it's an important feature for many users, and I just wanted to raise awareness among the support teams and developers.

I'll keep your advice in mind moving forward and make sure to be more careful about the appliance-type nature of TrueNAS SCALE and the potential risks associated with making unauthorized changes. Thanks again for your guidance, and I look forward to more helpful discussions in the future.
 
Top