Koozali.org: home of the SME Server

Getting iSCSI connection to survive a reboot

Online edform

  • *
  • 185
  • +0/-0
    • http://www.workgroupsolutions.co.uk
Getting iSCSI connection to survive a reboot
« on: September 12, 2025, 08:17:30 PM »
I put one of my 6TB HDDs into a QNAP desktop NAS - it's a single bay device - and successfully set it up as an iSCSI target.

Then I used a Windows workstation as an initiator and it successfully connected the disk over several reboots.

Then I broke the connection between the Windows machine and the QNAP and used the ISCSI utils in my SME 10.1 to connect to it. It was actually really easy - I followed the how to info at https://www.itzgeek.com/how-tos/linux/centos-how-tos/configure-iscsi-target-initiator-on-centos-7-rhel7.html

The big problem is that, having done everything in the instructions, including adding the UUID of the target into fstab, the connection does not persist across reboots.

I've spent some hours researching possible causes, and spotted some information on making the connection 'lazily,' which seems to mean launching the connection routine after the iSCSI service has started.

Can anyone point me down the right path to set this up? It was great to see 5.33TB of storage mounted in /home but having to do it by hand each time isn't going to be much use.

Ed Form

Online edform

  • *
  • 185
  • +0/-0
    • http://www.workgroupsolutions.co.uk
Re: Getting iSCSI connection to survive a reboot
« Reply #1 on: September 13, 2025, 08:23:44 AM »
OK, I solved it.

I had made a mistake in the entry in /etc/fstab because the Howto I followed made the same mistake.

I entered the line...

UUID=20d666f7-1332-4747-8476-87938d077de8  /home/e-smith/fles    xfs       defaults     0 0

But it should have been...

UUID=20d666f7-1332-4747-8476-87938d077de8  /home/e-smith/files    xfs       _netdev     0 0

I have restarted my server several times and the iSCSI target appears every time as /dev/sdb2 mounted in /home/e-smith/files and it's 5.9TB in size.

Ed Form
« Last Edit: September 13, 2025, 09:02:25 AM by edform »