Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run Linux in a VM on a Windows host. When I'm in the office, my Windows host machine self registers it's DNS name and it's When I'm at home, it self registers as mymachine.local. In the Linux guest, I want to mount shares on mymachine. I do that in /etc/fstab:

//mymachine/development /home/ben/Development     cifs    credentials=/home/ben/.creds/alderaan,rw,user,noauto,iocharset=utf8,file_mode=0777,dir_mode=0777    0 0

This works in the office and at home if I type mount Development. However, once it's mounted, I can't then switch locations and have it still work. It appears that once mount has run it's tied to the IP address not the DNS name and if that changes it no longer works. Is there a way I can make it reconnect on timeout so that it switches over if the IP address changes?

Or at the very least is there a way so that I can easily unmount the directory? At the moment I just get mount point busy if I try to remount it and I can't even type ls on my home folder since it times out getting the attributes of the mount point.

share|improve this question
up vote 0 down vote accepted

Hmm, the answer appears to be to do a lazy unmount of all cifs mounts:

sudo umount -a -t cifs -l

And then remount them all:

sudo mount -a -t cifs
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .