Threat Report: Exposing Malware in Linux-Based Multi-Cloud Environments | Download Now

cbdiag - "no space left on device" error when executing

cbdiag - "no space left on device" error when executing

Version
All versions of Carbon Black.


Issue
Executing /usr/share/cb/cbdiag to collect diagnostic information fails.


Symptoms

Similar errors to the below are reported in the terminal you're executing cbdiag in"

cp: cannot make directory `/tmp/cbdiag_2015-04-10_10-21-59/var/log/cb/coreservices': No space left on device
cp: cannot make directory `/tmp/cbdiag_2015-04-10_10-21-59/etc': No space left on device
cp: writing `/tmp/cbdiag_2015-04-10_10-21-59/var/log/messages-20150410.gz': No space left on device

Cause

Although the compressed cbdiag*.zip file is eventually saved/stored in your current working directory, the cbdiag uses the /tmp directory to stage individual log files before it commits the compressed .zip file to disk. If the /tmp folder is on a partition with limited space, the above "No space left on device" errors will be returned.

Solution

1. Run the following command to enumerate how much free space is available in /tmp:

df -h

2. There is a --tmpdir=dir argument built into the cbdiag script. Please run the below for usage information:

/usr/share/cb/cbdiag -h

3. Specify a temprary staging directory outside of the default /tmp location. Example:

/usr/share/cb/cbdiag --tmpdir=/more/space/here --post
Labels (1)
Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎11-25-2015
Views:
4256
Contributors