Description

User will be not able able to compress the /var/log file and save into /var/tmp

Symptoms

  • When user tries to save the /var/log to /var/tmp file using the below command, the user will get error shown below and wont be able to write the file in the destination folder [here /var/tmp ]

 

file archive compress source /var/log/* destination /var/tmp/<filename.tgz>

 

Error: labroot@jtac> file archive compress source /var/log destination /var/tmp/logs4.tgz    

tar: Removing leading '/' from member names

tar: Write error <<<<<<<<<<<<<Error seen


 

  • When we check for system storage from cli command or shell we will see some values in negative as shown below showing the utilisation is more than 100% or there will be no negative value but when we check there will not be enough storage on the destination folder

root@jtac:RE:0% df -h

Filesystem       Size  Used  Avail Capacity Mounted on

/dev/ad0s1a      1.8G  1.2G  398M  76%  /

devfs         1.0K  1.0K   0B  100%  /dev

/dev/md0        107M  107M   0B  100%  /packages/mnt/jbase

<<<>>>>>

/dev/ad1s1f      484M  3.4M  442M   1%  /var

/dev/ad1s1d      1.9G  1.8G  -19M  101%  /var/tmp <<<<<<<<<<<<

/dev/ad1s1a      242M   15M  207M   7%  /var/log

/dev/ad1s1e      242M   38K  222M   0%  /altconfig

/dev/ad3s1       1.0G  4.0K  926M   0%  /user

/dev/md14        98M  180K   90M   0%  /var/mfs/var/run

 

 

Solution

When user face the error mentioned, collect the outputs for the below commands and analyse which folder is consuming more memory

 

From cli :

 

show system storage detail <<<<<<<

 

From shell :

 

>start shell

%df -h

 

  • Solution is to delete the unwanted files to clear the storage from the folder where the the files need to be copied.
  • Check which partition is consuming more space and delete the files which are not being used and free up memory to save the /var/log or any logged file

 

Use below command from cli to check which files can be deleted,

 

 request system storage cleanup dry-run 

 

 

Modification History

2024-03-30 : Article Created