[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[],[],null,["# Monitor volume usage\n\nThis page provides information on monitoring volume usage.\n\nAbout volume usage\n------------------\n\nVolumes are containers for user data and snapshot data and limit their growth\nto the capacity of the volume.\n\nAn application or user that writes more data than allocated into the volume\nreceives an *out-of-space* error, which can cause application problems.\nWe recommend that you monitor consumption to avoid out-of-space errors.\n\nA common approach is to increase the volume capacity as soon as a certain usage\nthreshold, typically 80%, is reached.\n\nConsiderations\n--------------\n\nReview the following considerations about volume usage:\n\n- You could encounter a lack of free space despite deleting your data and could\n potentially delete snapshots that reference data you need. For more\n information, see\n [Snapshots and snapshot-based data management](/netapp/volumes/docs/discover/product-overview#snapshots_and_snapshot-based_data_management).\n\n- Instead of deleting snapshots manually to free up space, we recommend that\n you increase volume capacity to avoid out-of-space conditions.\n\n- Inodes are limited resources in a volume and are consumed for every\n file or directory you create. Although running out of inodes is less common,\n we recommend that you monitor them in an environment where millions of files\n are expected in a volume.\n\nMethods for monitoring volume usage\n-----------------------------------\n\nYou can monitor volume usage using the methods in the following sections:\n\n### Cloud Monitoring-based usage monitoring\n\nYou can calculate volume usage from the following volume metrics:\n\n- **Volume space** : `netapp.googleapis.com/volume/bytes_used / netapp.googleapis.com/volume/allocated_bytes * 100`\n\n- **Volume inodes** : `netapp.googleapis.com/volume/inode_used / netapp.googleapis.com/volume/inode_limit * 100`\n\nUse the volume name and location as a metric label to match metrics that belong\ntogether.\n\nYou can use Cloud Monitoring alerting to match the result against a threshold\nlike 80% to trigger [alert notifications](/monitoring/alerts).\n\nThe following example shows [Prometheus Query Language (PromQL)](/monitoring/promql)\ncode to monitor volume usage:\n\n\u003cbr /\u003e\n\n```json\n netapp_googleapis_com:volume_bytes_used / netapp_googleapis_com:volume_allocated_bytes\n \n```\n\n\u003cbr /\u003e\n\nYou can extend this code for use in a [metric-threshold alerting policy](/monitoring/alerts/using-alerting-ui).\n\n\u003cbr /\u003e\n\n```json\n (netapp_googleapis_com:volume_bytes_used /\n netapp_googleapis_com:volume_allocated_bytes) \u003e 0.8\n \n```\n\n\u003cbr /\u003e\n\nNote that the metrics are updated every five minutes. The changes occurring on\na smaller time scale are not reflected in Cloud Monitoring.\n\n### Client-side usage monitoring\n\nYou can check the used and available capacity of a volume by using the client\noperating system features to query the network mapped drive properties:\n\n- **Windows clients** : Use the `dir` command at the command prompt, or use the\n `Drive` \\\u003e `Properties` command in File Explorer.\n\n- **Linux clients** : Use the `df` command for space and `df -i` for inode monitoring.\n\n### Administrative usage monitoring\n\nYou can view the usage and provisioned space for volumes on the **Volumes page**\nin the Google Cloud console:\n\n1. Go to the **NetApp Volumes** page in the Google Cloud console.\n\n [Go to NetApp Volumes](https://console.cloud.google.com/netapp/volumes)\n2. The **Used** column shows usage percentage and GiB used.\n\nYou can use Google Cloud CLI to get the volumes capacity and usage:\n\n\u003cbr /\u003e\n\n```json\n gcloud netapp volumes list --format=\"table(name, capacityGib, usedGib)\"\n \n```\n\n\u003cbr /\u003e\n\nInode metrics aren't available using this approach.\n\nWhat's next\n-----------\n\nRead about [Cloud Logging](/netapp/volumes/docs/monitor/cloud-logging)."]]