Anyone facing this..

Could you please make sure to propagate I/O errors properly to
filesystem in order for it to call its automatically shutdown procedure.
After that, the mount won't reference the super block in kernel and that
will allow the device mapper to be closed/destroyed (this can be seen by
checking existence of device-mapper node in
/sys/fs/{xfs,ext3,ext4}/node, saying that the super block is still being

I had a recent case where not propagating the error would cause the
filesystem to hang forever, causing lockups and not allowing the device-
mapper tables to be flushed by multipath. In this case, if the network
was turned off before the iscsi was logged, the multipath (dm) and iscsi
(transport) layers HAVE TO propagate the I/O error to the filesystem for
it to shutdown.

This is can be done by:

node.session.timeo.replacement_timeout = 0 (iscsid.conf)

USE: iscsiadm -m node -T $target_name -p $target_ip:$port  -o update -n \
node.session.timeo.replacement_timeout -v $timeout_value on already 
logged/discovered LUNs. This parameter might be persistent on already 
discovered LUNs.


dev_loss_tmo 10 (multipath.conf)

OBS: node.session.timeo.replacement_timeout has to be changed per 

The fact that the network was removed BEFORE the iscsi logout could
happen is NOT an issue if ROOT device is not ISCSI, you just have to
allow the block device <-> device mapper <-> transport layer logic
shutdown to work.

Pay attention because if filesystem is umounted and iscsi is gone, the
timeout will have to be waited before the error is propagated to other
layer. So if filesystem is umounted a last superblock inode update will
be attempted (if no cache in pagecache). This will make the I/O error
for the superblock inode to fail (after time timeout you configured).
This will make the filesystem to be shutdown (a half unmounted state).
After shutdown, the logic trying to umount (synchronously) the
filesystem will continue (possibly in systemd).

If the problem is because of you tried to flush the device mapper and
the filesystem was still referencing the device mapper super block, this
will fade away if the error is propagated and the filesystem is
shutdown, you can attempt doing the flush of device-mapper right after
filesystem shutdown happened.

Could you please try setting the timeouts properly for lower timings and
let me know if that mitigated the issue ?

Thank you

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  Shutdown hang on 16.04 with iscsi targets

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to