Boot Raspberry Pi from an iscsi target

  • Thread starter neilparker62
  • Start date
  • Tags
    Raspberry pi
  • #1
1,106
620
TL;DR Summary
net boot raspberry pi from scsi SAN
Just wondering if anyone having experience with scsi / iscsi can help out ?

I am trying to boot a set of raspberry pies from an iscsi target server I have set up on Linux Mint (Cinammon). The setup works fine for network booting via NFS so I think I have configured the tftp , dnsmasq and nfs side of things correctly. The raspberry pi is able to find it's boot directory and associated boot files (plus config files) and everything works fine if we root mount an NFS share.

For iscsi SAN boot, one just needs to change the config.txt file to supply the name of an iscsi enabled initramfs and the cmdline.txt file to indicate the iscsi initiator and target. The raspberry pi finds everything correctly but at some point in the booting process it needs to login to the iscsi target so as to access the iscsi connected block device (Lun). At this point it comes up with the following error:

iscsiadm: initiator reported error (15 - already exists)

I believe this is an old bug associated with iscsistart. If anyone happens to know of a fix or work around, please advise.
 
Computer science news on Phys.org
  • #2
neilparker62 said:
TL;DR Summary: net boot raspberry pi from scsi SAN

Just wondering if anyone having experience with scsi / iscsi can help out ?

I am trying to boot a set of raspberry pies from an iscsi target server I have set up on Linux Mint (Cinammon). The setup works fine for network booting via NFS so I think I have configured the tftp , dnsmasq and nfs side of things correctly. The raspberry pi is able to find it's boot directory and associated boot files (plus config files) and everything works fine if we root mount an NFS share.

For iscsi SAN boot, one just needs to change the config.txt file to supply the name of an iscsi enabled initramfs and the cmdline.txt file to indicate the iscsi initiator and target. The raspberry pi finds everything correctly but at some point in the booting process it needs to login to the iscsi target so as to access the iscsi connected block device (Lun). At this point it comes up with the following error:

iscsiadm: initiator reported error (15 - already exists)

I believe this is an old bug associated with iscsistart. If anyone happens to know of a fix or work around, please advise.
Certainly, your situation sounds challenging. The error you're encountering (`iscsiadm: initiator reported error (15 - already exists)`) suggests there might be a conflict with existing iSCSI initiators.

Here are a few troubleshooting steps you could consider:

1. Check for Existing Connections: Verify if there are any existing iSCSI connections or sessions on your Raspberry Pi or the iSCSI target server. You can use commands like `iscsiadm -m session -P 3` to get detailed information about active sessions.

2. Initiator IQN: Ensure that the iSCSI Initiator's IQN (iSCSI Qualified Name) is unique. If multiple initiators have the same IQN, it can cause conflicts. You can modify the IQN in the iSCSI initiator configuration file.

3. Check for Residual Initiator Instances: Sometimes, even after disconnecting, there might be residual instances. Ensure you're completely disconnecting and cleaning up any previous iSCSI connections before attempting a new one.

4. Update iSCSI Initiator Tools: Ensure you're using the latest version of iSCSI initiator tools. Outdated tools might have bugs that have been fixed in newer releases.

5. Logs and Debugging: Check system logs (`/var/log/messages` or `/var/log/syslog`) for any additional error messages related to iSCSI. Increased verbosity in iSCSI logging might provide more detailed information about the error.

6. Community and Forums: Post your query in relevant tech forums or communities. Sometimes, other users might have faced similar issues and can provide valuable insights or workarounds.

7. Documentation: Review the official documentation of the iSCSI initiator software you're using. There might be specific recommendations or known issues documented there.
 
  • Like
Likes neilparker62
  • #3
During the boot process, scsistart seems to login to the target successfully and shows the block device as sdb. Then tries to login again - I'm not sure why ?? Also not sure about the "power-on or device reset" which seems to occur. Belows is a screenshot from the raspberry pi during net boot. I'll also try checking the logs on the target server.
iscsiboot.png
 

1. How do I boot Raspberry Pi from an iSCSI target?

To boot Raspberry Pi from an iSCSI target, you will need to set up a network boot environment and configure the Raspberry Pi's boot settings to use the iSCSI target as the boot device. This process involves setting up a DHCP server, a TFTP server, and configuring the Raspberry Pi's boot settings using the "bootcode.bin" file. Detailed instructions can be found on the official Raspberry Pi website.

2. What benefits does booting Raspberry Pi from an iSCSI target offer?

Booting Raspberry Pi from an iSCSI target offers several benefits, including faster boot times, centralized storage management, and the ability to easily switch between different operating systems or configurations without physically changing the SD card. It also allows for easier backup and restoration of the Raspberry Pi's system image.

3. Can I use any iSCSI target to boot Raspberry Pi?

No, not all iSCSI targets are compatible with Raspberry Pi. The iSCSI target must support the iSCSI boot protocol, and the Raspberry Pi must have a compatible Ethernet controller and firmware that supports network booting. It is recommended to use a dedicated iSCSI target that is known to be compatible with Raspberry Pi.

4. Are there any limitations to booting Raspberry Pi from an iSCSI target?

Yes, there are a few limitations to consider when booting Raspberry Pi from an iSCSI target. Some of these include the need for a stable and reliable network connection, potential performance issues if the network is slow or congested, and the possibility of data corruption if the network connection is interrupted during boot. It is important to carefully consider these factors before implementing iSCSI booting.

5. Can I still use an SD card when booting Raspberry Pi from an iSCSI target?

Yes, you can still use an SD card when booting Raspberry Pi from an iSCSI target. The SD card will be used to load the initial boot files and configuration, and then the rest of the boot process will be handled by the iSCSI target. However, it is recommended to use a dedicated SD card just for booting to avoid any potential conflicts or data corruption.

Similar threads

  • Computing and Technology
Replies
7
Views
807
Back
Top