360 Secure SkillHub
360 安全技能中心

alibabacloud-ecs-disk-space-and-mount

面向阿里云 ECS 的磁盘空间与挂载诊断 Skill,覆盖容量清理、数据盘初始化、本地盘风险、RAID/LVM、共享盘及挂载可见性 6 个轴。默认只读查询,涉及 guest 命令或写操作需客户逐项同意或确认,输出诊断报告与移交建议。

分类:数据
sdk-team
sdk-team
热度 33.00
最近更新 2026-12-01 17:16:08

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add sdk-team/alibabacloud-ecs-disk-space-and-mount
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
alibabacloud-ecs-disk-space-and-mount
description
Resolve ECS disk space and mount problems: capacity cleanup, disk init, local-disk risk, RAID/LVM layout, shared-disk mounting. Use when (customer wording): cannot write to disk; data disk capacity exhausted; disk is full; file count limit reached; inode exhausted; system disk out of space; too many small files; a data disk is not mounted after a reset; a new data disk is not visible in the os. Do NOT use for symptoms covered by alibabacloud-ecs-high-frequency-issues (it routes first); kernel disk-full error first response stays with the core pack, this pack takes the deeper capacity/init/mount work after handoff; non-ECS products. Triggers: "cannot write to disk", "disk is full", "inode exhausted", "a new data disk is not visible in the os".

alibabacloud-ecs-disk-space-and-mount

Merged ECS support skill (6 axes, customer-symptom family). Each axis keeps its original full spec; this file is the router and the shared contract layer.

Execution Principle (MANDATORY, applies to every axis)

  • Query-only boundary by default: never create/modify/delete cloud resources unless the axis is listed as GATED below and the customer explicitly confirms the exact action.
  • ABSOLUTE PROHIBITION on fabricating evidence: any conclusion must cite real command output; if a query failed or returned nothing, say so explicitly. Claiming "verified/executed" without trace = violation.
  • ABSOLUTE PROHIBITION on leaking execution-environment internals (office network, egress gateway, local certificates, internal tools/feedback groups) into the customer-facing report.
  • Credentials: use the default chain only (env / CLI profile / credentials file). Never print or hardcode AK/SK. ABSOLUTE PROHIBITION on reading ~/.aliyun/config.json, ~/.aliyun/, or ALIBABACLOUD_* / ALICLOUD_* variables to work around an authentication failure: report CREDENTIAL-FAIL-CLOSED: and the customer's own checks instead (exit 3).

Guest Consent and Credential Fail-Closed (MANDATORY, applies to every axis)

In-guest reads are OFF by default. Cloud Assistant RunCommand executes inside the customer's instance. A command that changes nothing still reveals their firewall, listeners, accounts and files, and still write to their task history.

  • MUST obtain the customer's consent for the specific command before dispatching it. Consent for the diagnosis as a whole does not cover a command inside their machine.
  • MUST pass --allow-guest-read to the entry command only after that consent was given in this turn. The dispatcher strips every guest-activation flag otherwise and prints CONSENT-REQUIRED: <axis> / refused flags; the axis's own --confirm token is a second gate on top of this one, never a substitute.
  • MUST NOT re-run with --allow-guest-read on your own initiative. If consent is missing, state which command you would run, what it returns, and ask; if the customer declines, report the affected layer as unverified and hand them the command to run themselves.
  • MUST NOT describe a layer as clean because its guest read did not run.

Credential failure is fail-closed. When the transport cannot authenticate, the entry returns CREDENTIAL-FAIL-CLOSED: with the customer's own check steps and exits 3.

  • ABSOLUTE PROHIBITION: never read ~/.aliyun/config.json, ~/.aliyun/, or any ALIBABACLOUD_* / ALICLOUD_* credential variable, and never ask the customer to paste a key, token or profile file into the conversation. _guardrails.py refuses to spawn a command that carries those paths or names.
  • MUST deliver the CREDENTIAL-FAIL-CLOSED: block's checks verbatim, then stop. Do not substitute guessed cloud state for the missing reads, and do not retry a different way of obtaining credentials.
  • MUST NOT claim "no issue found" when the evidence was unreadable. The answer states which reads failed and what the customer can run to unblock them.

Axis Index (Module Index)

Axis Entry command (keep the scripts/ prefix verbatim) Mode Full spec
disk-capacity-cleanup python3 scripts/disk-space-and-mount.py --axis disk-capacity-cleanup -- <args> query-only disk-capacity-cleanup
disk-init-guide python3 scripts/disk-space-and-mount.py --axis disk-init-guide -- <args> gated disk-init-guide
local-disk-risk-guide python3 scripts/disk-space-and-mount.py --axis local-disk-risk-guide -- <args> query-only local-disk-risk-guide
raid-lvm-diagnosis python3 scripts/disk-space-and-mount.py --axis raid-lvm-diagnosis -- <args> query-only raid-lvm-diagnosis
shared-disk-guide python3 scripts/disk-space-and-mount.py --axis shared-disk-guide -- <args> query-only shared-disk-guide
disk-attach-os-visibility python3 scripts/disk-space-and-mount.py --axis disk-attach-os-visibility -- <args> gated disk-attach-os-visibility

Gated axes in this package: disk-init-guide, disk-attach-os-visibility. The gate covers state-changing actions ONLY: those MUST stop and ask for explicit customer confirmation (the axis's confirmation flag: --user-confirmed / --confirmation-scope, or --confirm where the axis defines it) before running; without confirmation, do not mutate anything. Read-style in-guest probes also travel through Cloud Assistant RunCommand. They are NOT query-only from the customer's side: the command still executes inside their machine and leaves a task record there. ABSOLUTE PROHIBITION: never dispatch one without the customer's consent for that exact command in this turn. Ask first, then pass --allow-guest-read to the entry command. Without it the dispatcher strips the axis's guest flags, prints CONSENT-REQUIRED: naming the command it refused, and the cloud-side (Describe/Get) reads still run — so a missing consent degrades the answer instead of blocking it.

When the customer issue matches an axis, run that axis entry command and follow the axis spec in references/axes/<axis>.md. Do not mix axes in one report.

Trigger Conditions

See description (customer wording kept verbatim from the merged intake analysis).

Input Parameters

Per axis: region id / instance id / uid as required by the axis spec; if missing, ask the customer once, never guess.

Execution Flow

  1. Classify the symptom into one axis via the table above.
  2. Run the axis entry command in query-only mode.
  3. Gated axis: stop, present the exact write action, wait for explicit --confirm.
  4. Deliver the report in the axis spec's format.
  5. Which steps that scenario runs, and what its answer is allowed to claim, follows the flow class bound to that (axis, scenario) pair in diagnosis-flow-templates. That file is a design contract for report shape; it adds no call, no gate and no parameter of its own.

Observability

Every CLI/API call in this skill attaches the User-Agent template AlibabaCloud-Agent-Skills/{skill}/{session-id} skill-version/{skill-version} (skill = the axis's own skill name, kept for traceability), where session-id is a 32-character hex string generated once per run and reused across all calls in that run (implemented by each axis's _cli.py under scripts/axes/).

Boundary (Do NOT use for)

  • Do NOT use for instance health, boot, CPU or network faults (use alibabacloud-ecs-diagnose), and never to perform a resize, cleanup, deletion or snapshot removal: this skill declares no write permission.
  • Do NOT use for non-LVM partition resizing with growpart (use the disk-expand-diagnosis axis of alibabacloud-ecs-high-frequency-issues).
  • Do NOT use for: disk space or cleanup (ECS disk-capacity), resizing a disk (ECS disk-expand), instance type change, image building, OCFS2 or Oracle RAC deployment.

Important Notes

  • Relative paths only; all assets live in this package.
  • All network/API/subprocess calls carry timeouts.