I just want to thank David and Chris for sorting this out. I had exactly the same problem: CentOS 7 system "hanging" on shutdown when iSCSI volume is mounted, but not when unmounted and logged out of iscsi session first; iSCSI session not logging in automatically on startup.
As Chris described, I located the iSCSI node definition files at /var/lib/iscsi/nodes/.../default and changed "node.startup = onboot" to "node.startup = automatic". Initially, I had created the node definitions by running "iscsiadm -m discovery -t st -p <target_ip_address>" manually, then started the iscsid and iscsi services manually as well. Two node files are present, as I the target is reachable via multipath. Additionally, I have a service (Code42 CrashPlanPROe) that relies on the iSCSI volume for it's archive storage. I was able to smooth system startup and shutdown by adding the following lines to the Systemd unit file for this service: After=network.target iscsi.service iscsid.service Wants=network.target iscsi.service iscsid.service These lines ensure that the proserver service starts after iscsi and iscsid on system startup, and stops before them on system shutdown. Here are some details on the system, FYI: OS: CentOS 7.2.1511 Linux kernel: 3.10.0-327.22.2.el7.x86_64 iscsi-initiator-utils.x86_64: 6.2.0.873-33.el7_2.1 device-mapper-multipath.x86_64: 0.4.9-85.el7_2.5 Thanks for the solution! -jm On Wednesday, June 29, 2016 at 12:38:59 AM UTC-4, Chris Leech wrote: > > On Tue, Jun 28, 2016 at 04:01:37AM +0000, David wrote: > > > > I've just installed a Centos7 box, fully updated to: > > > > CentOS Linux release 7.2.1511 (Core) > > > > I have installed and set up an iSCSI volume. Done a mkfs on it. > Mounted > > it. No problem. > > > > I am having the same problem when shutting down. The iscsi stuff seems > to > > stop before the volume is un-mounted. I've looked at the systemd files > in > > the rest of these posts, and the "fixes" are in place out of the box. > > > > I have one other, possibly related, issue upon start up. The iscsi > > connection is not automatically "logged" into. I have to do this > manually. > > Not sure why, as the iscsi systemd files have lines in them saying to > auto > > login. > > David and I sorted his issue out, the target node record had > node.startup set to "onboot" so it was being treated as an initramfs > managed session needed for the root filesystem. Resetting it to > "automatic" got things working as expected. > > I'm guessing it's from installing the iscsi-initiator-utils package, > creating and bringing up the session manually, and then starting the > iscsi.service unit manually as well. It's supposed to handle session > startup at boot, so any sessions active when it's started are assumed to > be from the initramfs and switched to "onboot." > > Chris > > -- 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.
