tfactl fails on Solaris while using df

This is just a short blog post about a problem using Oracle Tracefile Analyzers commandline utility tfactl on Solaris.

Table of Contents

Problem

To check the available space, tfactl uses the df utility of the underlying operating system. Out of the box Solaris does not use a POSIX compliant version. This will be lead to the following, everytime tfactl calls df.

 $> tfactl set repositorydir=/data/tfa/repository 
 The minimum recommended repository size is 10 GB. 
 Do you wish to continue with current repository size ? [Y/y/N/n] [N] Y 
 df: unknown option: P 
 Usage: df [-F FSType] [-abeghklntVvZ] [-o FSType-specific_options] [directory | block_device | resource] 
 ERROR: Unable to check available space for /data/tfa/repository 
 Not enough space in filesystem to allocate 6015 MB to repository. 

Solution

To fix this issue, you have to install the SUNWxcu4 package, which includes a POSIX compliant version of df.

After the installation, you can either replace the default symbolic link /bin/df with /usr/xpg4/bin/df

$> rm /bin/df
$> ln -s /usr/xpg4/bin/df /bin/df

or add the directory to your PATH variable.

$> export PATH=/usr/xpg4/bin:$PATH

Now tfactl is working correctly.

$> tfactl set repositorydir=/data/tfa/repository
Successfully changed repository 
.--------------------------------------------------------. 
| Repository Parameter      | Value                      | 
+---------------------------+----------------------------+ 
| Old Location              | /app/oracle/tfa/repository | 
| New Location              | /data/tfa/repository       | 
| Current Maximum Size (MB) | 10240                      | 
| Current Size (MB)         | 0                          | 
| Status                    | OPEN                       | 
'---------------------------+----------------------------' 

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.