Boot Raspberry Pi from an iscsi target

  • Thread starter neilparker62
  • Start date
  • Tags
    Raspberry pi
In summary, booting a Raspberry Pi from an iSCSI target involves setting up the Pi's network boot configuration and connecting it to the iSCSI target using the initiator name and target IP address. Once connected, the Pi will boot from the iSCSI target as if it were a local drive, allowing for centralized storage and management of the operating system and data. This method can be useful for network booting multiple Pis or for remote management and maintenance of the devices.
  • #1
1,126
642
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
 

FAQ: Boot Raspberry Pi from an iscsi target

What is booting Raspberry Pi from an iSCSI target?

Booting Raspberry Pi from an iSCSI target involves configuring the Raspberry Pi to load its operating system from a remote iSCSI storage device instead of a local SD card.

Why would someone want to boot Raspberry Pi from an iSCSI target?

Booting Raspberry Pi from an iSCSI target can provide benefits such as centralized storage management, easier scalability, and improved data redundancy.

What are the prerequisites for booting Raspberry Pi from an iSCSI target?

Prerequisites for booting Raspberry Pi from an iSCSI target include a compatible Raspberry Pi model, a network connection, an iSCSI target server, and the necessary software for iSCSI configuration.

How do you set up Raspberry Pi to boot from an iSCSI target?

To set up Raspberry Pi to boot from an iSCSI target, you need to configure the Raspberry Pi's bootloader to load the operating system from the iSCSI target server and set up the necessary network and iSCSI configurations.

Are there any limitations or drawbacks to booting Raspberry Pi from an iSCSI target?

Some limitations of booting Raspberry Pi from an iSCSI target include potential network latency issues, dependency on network availability for booting, and the need for additional configuration compared to booting from a local storage device.

Similar threads

Back
Top