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 have a questiong regarding NFS.

I'm exporting /opt/foo via NFS in /etc/exports:

/opt/foo      client.domain.com(rw,no_root_squash,async,wdelay,no_subtree_check)

/opt/foo is mounted on client.domain.com.

Now, since I'm running out of disk space I decided to mount a logical volume on /opt/foo/bar since "bar" is the directory where the application's data is stored.

mv bar bar.bak
mkdir bar
mount -t ext3 /dev/VolGroup00/LogVol00 /opt/foo/bar

Now it turns out that the client is accessing the folder "bar.bak". I tried to refresh the export table by excecuting either of the following:

exportfs -r
/etc/init.d/nfsd restart

Is there any way I can get the client to access the new "/opt/foo/bar" without remounting? I don't have access to the client that mounts the NFS export.

Michael

share|improve this question

Short answer: You can't.

Once the client has mounted the exported filesystem, it accesses it by a handle, not by name; the handle is constructed from the device and inode, which renaming won't change - and neither will mounting something over the already-mounted directory (different filesystem ID). If you absolutely can't get the client to remount, your best bet is to mount the new volume to replace a busy/full subdirectory of /opt/foo/bar - open file handles on the client won't be impacted, but new opens will.

share|improve this answer

You must log in to answer this question.

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