Comment 15 for bug 227848

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

Dustin and myself worked on the bug today. We where able to fix the bug with the following changes:

1. Add the _netdev option to filesystem on iscsi target in /etc/fstab. We cannot do that retroactively for people who already have entries for file system on iscsi target in fstab, so this will need to be documented in the release note for open-iscsi (README.Debian). I filed bug #284107 to make sure we had the option from now on in the installer.

2. Change the boot order of open-iscsi from 25 to anything above 40, as networking is started at 40. Upstream Debian went 45.

3. Add the following bit of code to the open-iscsi init script, at the end of the start() function:

----------------------------------------------------------------------
        log_daemon_msg "Mounting network filesystems"
        MOUNT_RESULT=1
        if mount -a -O _netdev >/dev/null 2>&1; then
                MOUNT_RESULT=0
                break
        fi
        log_end_msg $MOUNT_RESULT
----------------------------------------------------------------------

This will ensure that the filesystems on iscsi target, marked with option _netdev in fstab, will get mounted.

I have tested the above successfully. I have also tested without the _netdev option, with other file system marked with _netdev, with the iscsi target unreachable, etc, and it seem to behave correctly.

Also, the networking init script have a bit of code in check_network_file_systems() to ensure that there is no network file systems or block device currently in use before bringing network down. I think it should also look for iscsi target.