[Pkg-iscsi-maintainers] Bug#765431: open-iscsi: umountiscsi.sh script does not properly check while traverse sysfs structure

Ritesh Raj Sarraf rrs at researchut.com
Sat Nov 8 15:39:30 UTC 2014


On 10/20/2014 08:58 AM, dmitry wrote:
> Adding -x parameter to umountiscsi.sh
>
> And try to restart service:
> root at archive:~# /etc/init.d/open-iscsi restart
>
> Look on exerpt output(full report in attached file):
>
> Here (the cause of problem):
> + [ -d /sys/devices/platform/host4/iscsi_host ]
> + [ -d /sys/devices/platform/host4/session1/target4:0:0 ]
> + sed s/.*block\///
> + echo /sys/devices/platform/host4/session1/target*/*:*/block/*
> + BLOCK_DEV=*

I still think we do not need the patch.  Because...

                        BLOCK_DEV=`echo "$BLOCK_FILE" | sed 's/.*block\///'`
                        if [ "${BLOCK_DEV}" = "*" ];then
                                log_warning_msg "iSCSI target without
block devices found"
                                continue
                        fi

Ideally you should have seen this warning message. But you are not
seeing this message. Which may be that you are using an older or
tampered version of the init script.


And the patch you provided is wrong. Because those block devices we are
looping for are not directories.


> + awk /^\/dev\/*/ { print $2; }
> + DOS_PARTITIONS=/
> + umount /
> umount: /: device is busy.
>         (In some cases useful info about processes that use
>          the device is found by lsof(8) or fuser(1))
> + exit_status=1 


-- 
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/20141108/02ebaa54/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20141108/02ebaa54/attachment.sig>


More information about the Pkg-iscsi-maintainers mailing list