This page provides information on monitoring volume usage.
About volume usage
Volumes are containers for user data and snapshot data and limit their growth to the capacity of the volume.
An application or user that writes more data than allocated into the volume receives an out-of-space error, which can cause application problems. We recommend that you monitor consumption to avoid out-of-space errors.
A common approach is to increase the volume capacity as soon as a certain usage threshold, typically 80%, is reached.
Considerations
Review the following considerations about volume usage:
You could encounter a lack of free space despite deleting your data and could potentially delete snapshots that reference data you need. For more information, see Snapshots and snapshot-based data management.
Instead of deleting snapshots manually to free up space, we recommend that you increase volume capacity to avoid out-of-space conditions.
Inodes are limited resources in a volume and are consumed for every file or directory you create. Although running out of inodes is less common, we recommend that you monitor them in an environment where millions of files are expected in a volume.
Methods for monitoring volume usage
You can monitor volume usage using the methods in the following sections:
Cloud Monitoring-based usage monitoring
You can calculate volume usage from the following volume metrics:
Volume space:
netapp.googleapis.com/volume/bytes_used / netapp.googleapis.com/volume/allocated_bytes * 100
Volume inodes:
netapp.googleapis.com/volume/inode_used / netapp.googleapis.com/volume/inode_limit * 100
Use the volume name and location as a metric label to match metrics that belong together.
You can use Cloud Monitoring alerting to match the result against a threshold like 80% to trigger alert notifications.
The following example shows Prometheus Query Language (PromQL) code to monitor volume usage:
netapp_googleapis_com:volume_bytes_used / netapp_googleapis_com:volume_allocated_bytes
You can extend this code for use in a metric-threshold alerting policy.
(netapp_googleapis_com:volume_bytes_used / netapp_googleapis_com:volume_allocated_bytes) > 0.8
Note that the metrics are updated every five minutes. The changes occurring on a smaller time scale are not reflected in Cloud Monitoring.
Client-side usage monitoring
You can check the used and available capacity of a volume by using the client operating system features to query the network mapped drive properties:
Windows clients: Use the
dir
command at the command prompt, or use theDrive
>Properties
command in File Explorer.Linux clients: Use the
df
command for space anddf -i
for inode monitoring.
Administrative usage monitoring
You can view the usage and provisioned space for volumes on the Volumes page in the Google Cloud console:
Go to the NetApp Volumes page in the Google Cloud console.
The Used column shows usage percentage and GiB used.
You can use Google Cloud CLI to get the volumes capacity and usage:
gcloud netapp volumes list --format="table(name, capacityGib, usedGib)"
Inode metrics aren't available using this approach.
What's next
Read about Cloud Logging.