3

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

4

Try umount -a -t autofs.

This will umount every autofs mount.

1
  • 1
    That's the ticket! Thanks. Found I had to use umount -a -t nfs. Dec 2 '13 at 20:18

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.