chpvcfs Command

Purpose

Frees up disk space in the /tmp directory on file systems that are managed by PowerVC.

Syntax

chpvcfs -o f [-d DAYS] [-hr HOURS] [-s SIZE]

Description

The chpvcfs command is used to clean up stale or high-capacity files in the /tmp directory of the following hardcoded PowerVC file systems:
  • /powervchome
  • /powervcdata
  • /powervclog
  • /extra
  • /var

The chpvcfs command helps to free up disk space by removing files based on age (in days or hours) or by freeing a specified amount of space in megabytes. This command is essential to maintain system health and to prevent file systems from filling up space in restricted environments. The files that are deleted by using the chpvcfs command are removed permanently and cannot be recovered. To run the chpvcfs command, you must have pvcroperator or pvcsuperadmin user privileges.

Flags

Table 1. Flags
Item Description
-h or --help Displays help about the chpvcfs command.
-0 {f} Frees up disk space. The f option indicates that the operation to perform is to free up space in the /tmp directory. The -o parameter is not optional.
-d DAYS Deletes files in the /tmp directory that are not modified for the specified number of days.
-hr HOURS Deletes files in the /tmp directory that are not modified for the specified number of hours.
-s SIZE Remove oldest files in the /tmp directory to free up specified space in MB. The -s parameter removes the file sin chronological order. The oldest files are removed first.

Examples

  1. To remove files from the /tmp directory that are older than seven days across all managed file systems, enter the following command:
    chpvcfs -o f -d 7
  2. To remove files from the /tmp directory that are not modified in the last 24 hours, enter the following command:
    chpvcfs -o f -hr 24
  3. To free up 500 MB of space by removing the oldest files in the /tmp directory, enter the following command:
    chpvcfs -o f -s 500
  4. To remove files from the /tmp directory that are older than three days and free up 200 MB of space, enter the following command:
    chpvcfs -o f -s 200