unable to stop modloop when udev in use
With tmpfs install, having modloop and udev enabled, the following cyclic dependency prevents stopping modloop:
- modloop init.d has ‘need dev’
- udev init.d has ‘provide dev’
- udev uses now kmod, and keeps the module directory open
When trying “modloop stop” I get:
# /etc/init.d/modloop stop
* WARNING: you are stopping a sysinit service
* Unmounting /.modloop ...
umount: can't unmount /.modloop: Resource busy [ !! ]
* ERROR: modloop failed to stop
This is because udev is still holding open the module directory from modloop, and the umount is prevented.
If I try first to stop udev, the following error occurs:
# /etc/init.d/udev stop
* WARNING: you are stopping a sysinit service
* WARNING: you are stopping a sysinit service
* Unmounting /.modloop ...
umount: can't unmount /.modloop: Resource busy [ !! ]
* ERROR: modloop failed to stop
* ERROR: cannot stop udev as modloop is still up
The init.d dependency disallows udev to be stopped before modloop.
As temporary work around the following works:
# /etc/init.d/udev stop -D
* WARNING: you are stopping a sysinit service
* Stopping udev ... [ ok ]
# /etc/init.d/modloop stop
* WARNING: you are stopping a sysinit service
* Unmounting /.modloop ... [ ok ]
* Unmounting /media/mmcblk0p1 ... [ ok ]
(from redmine: issue id 4913, created on 2015-12-02, closed on 2015-12-18)
- Relations:
- relates #6474 (closed)
- Changesets:
- Revision 0866ccf1 by Natanael Copa on 2015-12-04T13:20:09Z:
main/openrc: make modloop not depend on dev
we also need modloop be mounted before we start udev
ref #4913
- Revision 1a0d2966 by Natanael Copa on 2015-12-04T13:20:09Z:
main/udev-init-scripts: use modloop
ref #4913
- Revision b0978efa by Natanael Copa on 2015-12-14T13:24:07Z:
main/openrc: only umount the modloop image
Don't umount anything more than the loopback image itself to avoid
problems with:
- udev (fixes #4913)
- apk cache
- setup-bootable -u