[CentOS] NFS still serving old directory after rename

Nico Kadel-Garcia nkadel at gmail.com
Mon Mar 14 15:04:47 UTC 2011


On Mon, Mar 14, 2011 at 10:49 AM, neubyr <neubyr at gmail.com> wrote:
> Howdy,
>
> I have renamed a directory on NFS ver 3 server and then created a new
> directory again with the same name.
> # mv dir dir-hosed
> # mkdir dir
>
> The directory is auto-mounted on client side. I had unmounted
> directories on client side before making above changes. Now when I try
> to mount back 'dir', I still see old files and not new empty dir. Am I
> missing something here in the NFS config? Is it caching old directory
> contents? Any help?

One step at a time. Show your automount tables: are you using direct
automounting, which requires "/sbin/service autofs reload" ? Or
indirect automounting, which should just work? And when you say you
"unmounted directories on client side", how exactly did you do that?
Did you do "umount /mount/dir" and get a successful unmount? Or did
you do a naughty thing and use "umount -l", which can create chaos
without careful handling?

If you have old software holding open the mount point, the
automounting changes *will not* overwrite the old mountpoint until
they are released properly. And it shouldn't!



More information about the CentOS mailing list