# 在 Alpine Linux 中启用 ZFS 支持

## 安装

> **注意**
>
> 这是在既有的 Alpine 系统上安装 ZFS。要将 ZFS 用作根（`/`）文件系统，请参见下文。

1. 安装 ZFS 包：

   ```sh
   apk add zfs zfs-lts
   ```
2. 加载内核模块：

   ```sh
   modprobe zfs
   ```

## zpool 自动导入与挂载

为避免系统启动后还需手动导入并挂载 ZFS 存储池，请务必启用相关服务。

1. 在启动时导入存储池：

   ```sh
   rc-update add zfs-import default
   ```
2. 在启动时挂载存储池：

   ```sh
   rc-update add zfs-mount default
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/zfs/an-zhuang-zhi-yin/alpine-linux/index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
