> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/handbook/di-18-zhang-oci-rong-qi/18.5.-wei-podman-rong-qi-zhun-bei-xi-tong.md).

# 18.5.为 Podman 容器准备系统

> **警告**
>
> 如果通过 SSH 或类似的远程会话执行命令，请使用 [screen(1)](https://man.freebsd.org/cgi/man.cgi?query=screen\&sektion=1\&format=html)、[tmux(1)](https://man.freebsd.org/cgi/man.cgi?query=tmux\&sektion=1\&format=html) 或类似工具，以免在重启防火墙时失去连接。

如果 ZFS 不可用，请切换到 UFS 存储并跳过下面的 ZFS 命令：

```sh
# sed -I .bak -e 's/driver = "zfs"/driver = "vfs"/' \
    /usr/local/etc/containers/storage.conf
```

否则，创建容器存储数据集：

```sh
# zfs create -o mountpoint=/var/db/containers zroot/containers
# zfs snapshot zroot/containers@empty
```

文件描述符文件系统是必需的：

```sh
# mount -t fdescfs fdesc /dev/fd
```

将其添加到 **/etc/fstab** 以在重启后保持生效：

```sh
fdescfs  /dev/fd  fdescfs  rw  0  0
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://book.bsdcn.org/handbook/di-18-zhang-oci-rong-qi/18.5.-wei-podman-rong-qi-zhun-bei-xi-tong.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
