Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
[rootSERVER ~]# rmmod -f cifs
ERROR: Removing 'cifs': Resource temporarily unavailable
[rootSERVER ~]# modprobe -r cifs
FATAL: Module cifs is in use.
[root@SERVER ~]# lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: Scientific
Description:    Scientific Linux release 6.1 (Carbon)
Release:    6.1
Codename:   Carbon
[root@SERVER ~]# 

I tried

rmmod -fw cifs

but it just waited for ages... (and yes, all cifs shares are "umount -l"-ed before trying to remove cifs module..)

QUESTION: how can I remove the cifs module??

share|improve this question
    
is you or some processes current working directory still within one of the shares? –  ultrasawblade Jun 18 '12 at 10:38

3 Answers 3

You can try modprobe -r which can resolve some dependency issues for you, while rmmod will do nothing else than trying to unload the module.

Also, there is an explicit kernel option on forced module unloading because it's hardly ever a good idea to do so. Can your kernel actually force a module to unload? Because if it can't the -f switch does precisely nothing.

share|improve this answer

You get it to stop being in use. i.e. unmount all of your cifs mount points.

share|improve this answer
up vote 0 down vote accepted
/usr/bin/sudo /bin/umount -f -a -t cifs
/usr/bin/sudo /bin/umount -f -l -a -t cifs
sleep 5
/usr/bin/sudo /sbin/modprobe -r -f cifs
pkill nautilus
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.