vi/vim creates swap files before creating actual new file on a Red Hat Enterprise Linux NFS client mounting NetApp NFS-style qtree shares
Issue
- Issuing the
vi
command on a new file results in behavior similar to the following:
[user@rh-test]vi test.txt
E325: ATTENTION
Found a swap file by the name ".test.txt.swp"
owned by: rahmed dated: Fri Nov 8 15:30:06 2013
[cannot be read]
While opening file "test.txt"
dated: Fri Nov 8 15:29:59 2013
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r test.txt"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".test.txt.swp"
to avoid this message.
Swap file ".test.txt.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
- If the file is created before editing with
vi
the edit succeeds and none of the above messages are seen.
Environment
- NFS client: Red Hat Enterprise Linux
- NFS server: NetApp Filer
- NFS-style qtree shares
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.