Clearing Disk Space
You can use the Clearing Disk Space card to create a task for clearing the disk space of a specified directory on an ECS.
Prerequisites
UniAgents have been installed for all ECSs, and are in the running state.
Creating a Task for Clearing Disk Space
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Automation (Retiring). The Automation page is displayed.
- In the navigation pane, choose Scenarios. On the displayed page, click the Clearing Disk Space card, or choose > Create Task in the upper right corner of the card.
- Set parameters by referring to Table 1.
Figure 1 Clearing disk space
Table 1 Parameters for clearing disk space Parameter
Description
Task Name
User-defined task name.
Enter up to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. By default, Auto is selected, which means that the system automatically generates a task name.
Enterprise Project
Select the enterprise project to which the task belongs.
Platform
Select a platform that the task runs on. Currently, only Linux is supported.
Clearing Rule
Enter a disk cleanup path, name of the file to be deleted, and file retention days, and click Save in the Operation column. You can also click Add to add more rules.
NOTE:- Files in the /, /bin, /sbin, /etc, /usr, /usr/bin, /usr/sbin, /boot, and /lib directories cannot be deleted.
- You can enter an absolute path.
- Paths for fuzzy match (for example, /var/logs/*/a.log) are not supported.
- Recursive paths (for example, /var/logs/**/a.log) are not supported.
- Files generated 1 to 1000 days ago can be deleted from 00:00 on the current day.
- Select an instance.
- Click Add. The instance selection page is displayed. A maximum of 100 instances can be selected for a single task.
- For Instance Type, the default value is ECS. For Method, the default value is Specific. For details about the methods, see Table 2.
Figure 2 Selecting an instance
Table 2 Selection method description Selection Method
Description
Specific
Enter search criteria and select instances from the instance list. By default, instances are searched by name.
By filter
- Enter filter attributes and values to search for instances.
- If there are multiple filter criteria, the search is performed based on the AND relationship.
- This method also takes effect for instances added later.
By tag
- Set tag keys and values, and specify one or more tags to select instances.
- If there are multiple tags, the search is performed based on the AND relationship.
- This method also takes effect for instances added later.
From CMDB
Enter search criteria or keywords and select instances from CMDB. There are two types of nodes:
- Static: Select an ECS under a specified CMDB application.
- Dynamic: Select a node in the CMDB application to dynamically obtain ECSs under the node. This method also takes effect for instances added later.
- If needed, expand More to set the review configuration and execution policy by referring to Table 3.
Table 3 More settings Category
Parameter
Description
Review
Review
Specifies whether to enable manual review. By default, this function is disabled.
You can only modify the review configuration by modifying the atomic service card in the tool market.
Reviewer
After manual review is enabled, you need to select a reviewer.
Alternatively, create a topic and add a subscription on the SMN console to notify a reviewer.
Execution Policy
Batch Release
Specifies whether to enable batch release. By default, this function is disabled.
Instances for Each Batch
Number of instances on which tasks can be executed at the same time.
Interval
Interval for executing each batch of tasks.
- Click Execute. On the task execution page that is displayed, view the task execution status.
You can also click Save. The created task is displayed on the task management page for subsequent task execution or other operations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot