Pages

Juniper "error: Could not create temporary directory"

Got into an issue a couple of days ago on a Junos EX virtual chassis where the following was being reporded

> show system snapshot media internal member 0
fpc0:
--------------------------------------------------------------------------
error: Could not create temporary directory
The command tries to create a temporary directory into the /tmp filesystem and it fails. Going to the shell prompt and trying to create a file there revealed the real issue (no inodes left; %iused = 100%):

% touch /tmp/a

/tmp: create/symlink failed, no inodes free
touch: /tmp/a: No space left on device

% df -hi /tmp
Filesystem    Size    Used   Avail Capacity iused ifree %iused  Mounted on
/dev/md17     126M     33M     83M    28%   16382     0  100%   /tmp
Looking at the number of inodes in use, we can see that they are filled up 100% and that there were just as many files in /tmp as inodes taken. To solve this and allow some space I deleted some (most) of these files from /tmp

% df -hi /tmp/
Filesystem    Size    Used   Avail Capacity iused ifree %iused  Mounted on
/dev/md17     126M    428K    115M     0%       7 16375    0%   /tmp

No comments: