Logo Truenas Ops

Truenas Ops

Tổ chức
serversathome
truenas-ops

Troubleshoot and manage TrueNAS SCALE over SSH. Use this whenever the user mentions TrueNAS, the NAS, ZFS, a pool or dataset, a scrub, a snapshot, replication, a failing or degraded disk, SMART data, an SMB/NFS/iSCSI share, a TrueNAS app, or storage that is full, slow, or throwing errors. Trigger this for anything storage-layer even when the symptom first shows up as an app or VM that lost its data mount. Prefer this over generic shell reasoning for pool, disk, dataset, and share work.

Add to TypingMind

Tổng quan

Nhà phát hànhserversathome
Kho mãhomelabhero
Tên kỹ năngtruenas-ops
Sao
104
Bản fork
4
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được serversathome công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Truenas Ops trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/truenas-ops
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serversathome/homelabhero.git /tmp/homelabhero
mkdir -p .claude/skills
cp -r /tmp/homelabhero/ops/.claude/skills/truenas-ops .claude/skills/truenas-ops
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Truenas Ops trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Truenas Ops ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Truenas Ops với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

TrueNAS ops

Reached over SSH as truenas. Read infra/truenas.md for pool names, datasets, and schedules before acting. Bias hard toward read-only until the cause is clear. midclt (the middleware) is the preferred way to inspect and change TrueNAS - it covers pools, datasets, disks, apps, and shares (see the truenas-middleware skill), and needs no sudo. The raw tools below (zpool, zfs, smartctl, docker) need root: if this host connects as truenas_admin, prefix them with sudo -n (works when passwordless sudo is enabled for that user; hh doctor shows whether it is, and if not, use the midclt equivalent). As root they run bare.

When a raw tool fails with sudo: a password is required, or hh doctor says the host has no passwordless sudo, do not work around it silently: say so, keep going through midclt, and give the user the one-time fix so they can decide. In the TrueNAS web UI: Credentials -> Users -> select truenas_admin -> Edit -> check "Allow all sudo commands with no password" (so that both "Allowed sudo commands" and "Allowed sudo commands (no password)" include all) -> Save. After that hh doctor shows passwordless sudo available and the raw tools work. The alternative is to re-register the host as root, which needs no sudo at all.

For the complete command surface of this platform, read capabilities/truenas.md. For a method that is not documented there, use the truenas-middleware skill to discover it live.

Diagnose first

hh run truenas "zpool status -x"     # fast "all healthy?" verdict
hh run truenas "zpool list"          # capacity + health per pool
hh run truenas "zpool status -v"     # per-vdev/per-disk errors if not healthy
hh run truenas "midclt call alert.list | jq '.[] | {level, formatted}'"
hh run truenas "df -h; zfs list -o name,used,avail,refer,mountpoint"

Mandatory before you call it healthy - scan the kernel log. Pools, SMART, and alert.list miss PCIe AER, NIC link flaps, ATA/disk resets, MCEs, and OOM kills; those only surface here:

hh run truenas "journalctl -k -b -p warning --no-pager | grep -viE 'veth|br-[0-9a-f]{12}' | tail -40"

Empty output is the pass; read it before reporting green. See "Health check must-dos" in infra/truenas.md for the full rationale.

Common cases

  • Pool DEGRADED / disk errors: zpool status -v names the vdev and disk. Map the disk to a serial with lsblk -o NAME,SERIAL,MODEL, confirm with smartctl -a /dev/<disk>. Do not zpool replace or offline a disk without an explicit go-ahead and a confirmed replacement plan.
  • Dataset "missing" / app lost its data: check the mount zfs get mounted,mountpoint <pool>/<dataset> and whether the app's host path still resolves. Often a mount or app-config issue, not data loss.
  • Pool nearly full: zpool list capacity, then find the heavy datasets zfs list -o name,used -s used. Old snapshots are a common hidden consumer: zfs list -t snapshot -o name,used -s used | tail.
  • Replication failing: midclt call replication.query | jq '.[] | {name, state: .state.state}' then the task's error, plus SSH connectivity to the target.
  • SMART concern: smartctl -H /dev/<disk> for the verdict, smartctl -a /dev/<disk> for the full attribute table.

State-changing (confirm first)

hh run truenas "zpool scrub <pool>"                    # safe but I/O heavy
hh run truenas "zfs snapshot <pool>/<dataset>@manual-$(date +%F)"

For a full backup / restore / rollback workflow (clone vs rollback, verifying that recoverability actually exists), use the backup-restore skill.

Never without explicit go-ahead: zfs destroy, zpool destroy, zpool offline/replace, wipefs, or anything that writes to a raw disk. Recoverability comes from snapshots and replication, so verify those exist before any risky change.

Apps on TrueNAS

hh run truenas "midclt call app.query | jq '.[] | {name, state}'"
hh run truenas "docker ps"      # if custom Docker apps are in use

VMs and containers (backend changed by version - detect first)

The virtualization backend is different across releases, so the midclt namespace is different too. Do not assume: read the version, then use the matching API. midclt runs over the local socket, so the REST API removal in 26 does not affect this path.

hh run truenas "midclt call system.version"
  • 24.10 and earlier: libvirt VMs only, vm.* (vm.query, vm.start, vm.stop).
  • 25.04 / 25.10: Incus for containers AND VMs, virt.instance.* (type = CONTAINER or VM). Instance disks live in the hidden .ix-virt dataset. virt.global.config shows the instances pool.
  • 27 (pre-release; its betas were numbered 26): Incus removed, libvirt runs QEMU/KVM VMs (vm.*) and libvirt_lxc containers (own namespace). Upgrades migrate .ix-virt zvols to libvirt VMs; expect orphaned LXCs and VMs missing from the UI (zvols usually survive under .ix-virt).

See "Virtualization" in capabilities/truenas.md for the full command set. When a method name is unclear (common on 27), use the truenas-middleware skill to list the live vm.* / virt.* / container.* methods and read their schemas instead of guessing. Confirm before any start/stop/create/update/delete.

Câu hỏi thường gặp

Kỹ năng AI Truenas Ops làm được gì?

Troubleshoot and manage TrueNAS SCALE over SSH. Use this whenever the user mentions TrueNAS, the NAS, ZFS, a pool or dataset, a scrub, a snapshot, replication, a failing or degraded disk, SMART data, an SMB/NFS/iSCSI share, a TrueNAS app, or storage that is full, slow, or throwing errors. Trigger this for anything storage-layer even when the symptom first shows up as an app or VM that lost its data mount. Prefer this over generic shell reasoning for pool, disk, dataset, and share work.

Vì sao nên dùng Truenas Ops trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Truenas Ops là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Truenas Ops trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/truenas-ops. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Truenas Ops?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Truenas Ops với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Truenas Ops với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Truenas Ops có miễn phí không?

Kỹ năng này được serversathome phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇