[Pkg-iscsi-maintainers] Bug#691732: open-iscsi: umountiscsi.sh tries to umount / and /var

Ritesh Raj Sarraf rrs at researchut.com
Mon Oct 29 18:06:23 UTC 2012


On Monday 29 October 2012 07:32 PM, Dennis Leeuw wrote:
> We can make this a long discussion, but I rather not. I do not have
> the knowledge to tell you what might or might not happen and why. I
> can only tell you what went wrong and restarting the open-iscsi
> service, without a block device being present created a problem with a
> ro / filesystem. But actually that is not the important. What is
> important is that if no block device is present, the script does not
> end gracefully, with the provided change it does.
>

What you see out there is not something very simple. And given my
limited time I spend on Debian, I will investigate in detail only if I
am convinced it to be a bug.

That said, support for sw iSCSI block devices is more complicated than
what it looks. On top of that, adding the Device Mapper layer further
adds a layer of complications. In the current approach available, you at
least have an option to have your entire block device
auto-mounted/activated during boot.

Remember, iscsi is a daemon. If the daemon is stopped, all your block
devices could die. That's why the stop script is built with some
assumptions. More below....

> running without my change:
> # /etc/init.d/open-iscsi restart
> Unmounting iscsi-backed filesystems: Unmounting all devices marked
> _netdevDeactivating iSCSI volume groups: md3200_1  Volume group
> "md3200_1" not found
> Cannot deactivate Volume Group md3200_1 ... (warning).
> .

The assumption being that if you have DM devices on top of your iSCSI
devices, we expect that you (the user) will define them in the config
file. That is what you did.

You instructed it to take care of a non-existent VG, which it did,
failed and complained.

This is the current design. It might not be the most elegant, but it
works better than many others I have seen.
>
> umount: /: device is busy.
>         (In some cases useful info about processes that use
>          the device is found by lsof(8) or fuser(1))
> Could not unmount / ... (warning).
> umount: /var: device is busy.
>         (In some cases useful info about processes that use
>          the device is found by lsof(8) or fuser(1))
> Could not unmount /var ... (warning).
>  failed!
> invoke-rc.d: initscript umountiscsi.sh, action "stop" failed.
> Couldn't unmount all iSCSI devices. Cannot stop iSCSI service ... failed!
>

I can't see a reason why / and /var got pulled in... Can you run the
same init script in debug mode?
Just add "set -vx" to the beginning of the umountiscsi.sh script so that
we can see what is going on.

> Which is probably not very user friendly. It doesn't matter if my
> system get Read-Only or not.
>
> With the following lines added:
> if [ "${BLOCK_FILE}" =
> '/sys/devices/platform/host24/session20/target*/*:*/block/*' ]; then
>         log_warning_msg "No block devices found for this host, nothing
> to do"
>         return 1
> fi
>
> It ends more gracefully:
> # /etc/init.d/open-iscsi restart
> Unmounting iscsi-backed filesystems: Unmounting all devices marked
> _netdevDeactivating iSCSI volume groups: md3200_1  Volume group
> "md3200_1" not found
> Cannot deactivate Volume Group md3200_1 ... (warning).
> .
> No block devices found for this host, nothing to do ... (warning).
> invoke-rc.d: initscript umountiscsi.sh, action "stop" failed.
> Couldn't unmount all iSCSI devices. Cannot stop iSCSI service ... failed!
>
> open-iscsid is still running and a restart didn't happen, but that is
> another issue. 


-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20121029/747ef1e4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20121029/747ef1e4/attachment.pgp>


More information about the Pkg-iscsi-maintainers mailing list