[CentOS] NFS still serving old directory after rename
neubyr at gmail.com
Mon Mar 14 15:33:11 UTC 2011
On Mon, Mar 14, 2011 at 10:04 AM, Nico Kadel-Garcia <nkadel at gmail.com> wrote:
> On Mon, Mar 14, 2011 at 10:49 AM, neubyr <neubyr at gmail.com> wrote:
>> 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!
Thanks for the reply Nico. I unmounted dir in a clean manner. I made
sure that no other process is trying to access that mounted dir on
client side. Not sure what was the problem, but it seems to be working
now. I am guessing autofs or nfs had some timeout/cache settings that
caused this problem initially. I will try to replicate it some time
later to see what was causing it.
More information about the CentOS