> For the complete documentation index, see [llms.txt](https://handbook.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://handbook.bsdcn.org/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
```
