I was editing a file and Instead of typing ZZ to save and exit I typed something else by mistake. I think it might have been either ctl-z or ctl-c . Anyway it ended up abending the vi session. When I tried to get back in I was given that “your swap file is already being used” type error and so I deleted the swap file “rm /var/tmp/sas_pwd.swp”

I still got the same error so I did a “ps -ef|grep carbon” and found all of my running sessions, the first one being the vi session I’d apparently exited and it was still running so I did a kill -9 on that process and it ended.

I’ve done these things before when I’ve made this type of little mistake in vi and it would solve my issue.

However Now when I try to get back into the sas_pwd file I get the following error when I try to save and exit:

"sas_pwd" E212: Can't open file for writing Press ENTER or type command to continue

Bear in mind I’ve deleted this file and was starting from scratch. So I tried to open a brand new file.

So I tried to just touch the file and got the following.

[bcarbon@sasebcclpradh01 ~]$ touch sas_pwd touch: cannot touch âsas_pwdâ: Disk quota exceeded

We’re tight on disk space but does that have something to do with this? I don’t think so.

I then tried to edit ANY existing Linux file and got the following when trying to save and exit.

Here I’m doing this on an old log file. When I try to save and exit after typing anything in it I get the following:

"stoh.log" "stoh.log" E509: Cannot create backup file (add ! to override)

At this point I’m thinking the following: 1. I’ve had this issue before and had no problems fixing it. 2. Deleting the swap file has worked before without causing and additional issues. 3. Doing a kill -9 on the still running ‘vi’ session also has fixed that issue and has never caused any additional trouble. 4. Maybe this is related to the space issue on the SAS server in some way. a. I’m saying this because of 2 and 3 never having caused this specific type of editing issue before.

At this point I cannot edit and existing file nor can I create a new file in Linux.

Please let me know if you have any ideas.

  • check how full your disk is with the command df -h a full disk could explain all your problems
    – Mark
    Apr 8, 2020 at 20:34
  • Disk quota exceeded says it all. Your user account owns files that comulatively are taking up more disk space that your administrator has permitted.
    – roaima
    Apr 8, 2020 at 20:57
  • 1. [bcarbon@sasebcclpradh01 ~]$ quota -u bcarbon 2. Disk quotas for user bcarbon (uid 1691199497): 3. Filesystem blocks quota limit grace files quota limit grace 4. /dev/mapper/rootvg-homelv 5. 19148* 10240 20480 none 137 0 0 6. [bcarbon@sasebcclpradh01 ~]$ I looks like I have room even for just touching a file. Also 1. [bcarbon@sasebcclpradh01 ~]$ df -h /dev/mapper/rootvg-homelv 2. Filesystem Size Used Avail Use% Mounted on 3. /dev/mapper/rootvg-homelv 31G 3.3G 28G 11% /home
    – Carbon
    Apr 8, 2020 at 20:58
  • whatever that's trying to tell us, it isn't. Please edit your question to include additional information rather than putting it in the comments. You can then format it appropriately to make it readable.
    – roaima
    Apr 8, 2020 at 21:00

1 Answer 1


It might have something to do with running out of disk space, especially that some filesystems will not allow regular (non root) user to use all disk space available. Some of it is reserved for uid=0 to prevent a situation, when filling a whole disk by a user causes system processes to fail due to out of space.

So this is just one guess.

Another is that it was just a coincidence and something wrong happend regardless of what you were doing with vim. Hanging process might indicate that they cannot quit waitig for I/O. Check if the filesystem is still mounted read-write. In some disaster situations kernel will force FS to switch read-only.

And last but not least, dependening on the filesystem in use, you may still see plenty of GB of space available, while there are no free i-nodes left. You will get the same error "disk full" in most cases, but you will not see this in df unless you run df -i.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.