[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??

  • is you or some processes current working directory still within one of the shares? – LawrenceC Jun 18 '12 at 10:38

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.


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

/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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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