Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have some RHEL systems where I need to disable autofs. What I typically do is run a script on each of these hosts that executes something like this:

# /etc/init.d/autofs stop
...
# /sbin/chkconfig autofs off
...
# reboot

But I have a situation where doing the reboot will cause a problem. I guess I could log on to each of these hosts one-by-one and execute df and seem what filesystems where mounted by autofs and execute by hand umount /whatever but that would be a pain. Does anyone know of a slick way of shutting off autofs and umounting the filesystems it mounted?

I do have access to puppet. Maybe it would be possible for me to use puppet to edit autofs's config files and then service autofs reload?

Thanks

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Try umount -a -t autofs.

This will umount every autofs mount.

share|improve this answer
    
That's the ticket! Thanks. Found I had to use umount -a -t nfs. –  Red Cricket Dec 2 '13 at 20:18
add comment

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.