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?
thanks, neuby.
Seems like some clients (especially new connections) are mounting the new dir correctly. Not sure what's the problem though.
-- thanks, neuby.
On Mon, Mar 14, 2011 at 9:49 AM, neubyr neubyr@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?
thanks, neuby.
On Mon, Mar 14, 2011 at 10:49 AM, neubyr neubyr@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!
On Mon, Mar 14, 2011 at 10:04 AM, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Mon, Mar 14, 2011 at 10:49 AM, neubyr neubyr@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!
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.
On Mon, Mar 14, 2011 at 10:33:11AM -0500, neubyr wrote:
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
NFS shares are done via inode number so renaming the directory is inadequate. You need to unexport the directory, rename, create the new then re-export.