Hi, On 06/01/2016 11:35 PM, Mike Christie wrote: > Ccing Christian and dropping list to make sure the mail does not get > lost in his open-iscsi filters.
It's actually the other way around: I get emails from the list just fine, but in the end I resorted to creating a gmail account to be able to post to the list, because emails from my real email address were just rejected by the list for no apparent reason. (cc'ing the list again.) > How does debian implement iscsi boot? > > Does it: > 1. Run iscsistart for the root sessions/targets in the initramfs and > then start iscsid during the normal startup procedure and run iscsiadm > at that time for other non boot/root related sessions? Yes. You can find the current code used by Debian (and by extension Ubuntu) in the initramfs here: http://sources.debian.net/src/open-iscsi/2.0.873%2Bgit0.3b4b4500-15/debian/extra/initramfs.local-top/ Basically, there are 3 ways you can boot from iSCSI at the moment in Debian (via the officially supported hook to initramfs-tools): 1. You create a special file /etc/iscsi/iscsi.initramfs (source by the shell in the initramfs) with a couple of settings (ISCSI_TARGET_IP=..., ISCSI_USERNAME=..., etc.). That file is copied into the initramfs image, which then calls iscsistart. If you install Debian on iSCSI via the official installer, it will create this file with the corresponding settings. 2. You create the file /etc/iscsi/iscsi.initramfs with the setting ISCSI_AUTO=true, then the initramfs will use iscsistart -f to auto- configure the iSCSI sessions. (And also iscsistart -N to configure the the network interfaces, if required.) 3. This has been added very recently: root=iscsi:... (RFC 4173 syntax) is now also supported, there you don't need to create any special file, just have the package installed. In that case, also iscsistart will be used. In no case is the iSCSI database or iscsid used in the initramfs at the moment. (That means that you can use the iscsi.initramfs file to configure a session separate from the iscsi database btw.) (Note that dracut is available as an alternative in Debian, and it brings its own iSCSI support. I haven't gotten around to testing that so far, though; but I'm pretty sure it won't work, because dracut does start iscsid in the initramfs since fall of last year IIRC, but due to Debian policies we install the iSCSI database directly in /etc/iscsi instead of /var/lib/..., whereas IIRC the dracut code tries to copy the database from the official upstream location. Making sure dracut also works in Debian with iSCSI is on my TODO list for Debian 9.) The system startup code (once the root file system is mounted) is independent of the initramfs and boils down to basically the following two steps: 1. start iscsid 2. iscisadm -m node --loginall=automatic If a session is configured both in the database as well as the iscsi.initramfs file, iscsiadm will display a warning and return exit code 15 (already logged in), but we use SuccessExitStatus in our systemd service file, so it's not treated as an error. (The shutdown logic is more involved, because we try to detect which sessions are used for the root and /usr filesystems, if any, and only shut down all the _other_ sessions. But we also allow the admins to override that and not shutdown any session at all, in case they have a storage configuration that we don't properly detect.) > 2. Run iscsiadm and iscsid in the initramfs, stop iscsid, and then > restart it and maybe run iscsiadm again for non root/boot related > sessions/targets during the normal startup procedures? We have a low-priority TODO item to think about maybe (perhaps optionally) supporting using iscsid in the initramfs, but haven't gotten around to that so far. Hope that answers your question. That all said, we're not married to the internals of the current approach, so if there were to be good reasons to do something differently, so for example if you decided to drop iscsistart upstream and say the only supported way is to have iscsid running in the initramfs, we'd be open to that, as long as we can support all the potential previous use cases with it. Regards, Christian -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
