Skip to content

zfs: add idmapped mount support for rootless containers#621

Draft
li-nkSN wants to merge 1 commit intocontainers:mainfrom
li-nkSN:feat/zfs-idmap-support
Draft

zfs: add idmapped mount support for rootless containers#621
li-nkSN wants to merge 1 commit intocontainers:mainfrom
li-nkSN:feat/zfs-idmap-support

Conversation

@li-nkSN
Copy link

@li-nkSN li-nkSN commented Feb 1, 2026

Apply idmapped mounts to ZFS storage layers when UID/GID mappings are
provided. This translates file ownership through the user namespace
mapping, allowing containers to perform chown operations that appear
as root inside the container but map to unprivileged UIDs on the host.

The overlay and btrfs drivers already support idmapped mounts; this
brings ZFS to feature parity for rootless container support.

This works in conjunction with ZFS's zoned_uid property proposed
separately to OpenZFS
which delegates dataset operations to user
namespaces, enabling full rootless podman/docker with native ZFS
storage.

Signed-off-by: Colin K. Williams colin@li-nk.org

Resolves #147

@github-actions github-actions bot added the storage Related to "storage" package label Feb 1, 2026
Apply idmapped mounts to ZFS storage layers when UID/GID mappings are
provided. This translates file ownership through the user namespace
mapping, allowing containers to perform chown operations that appear
as root inside the container but map to unprivileged UIDs on the host.

The overlay and btrfs drivers already support idmapped mounts; this
brings ZFS to feature parity for rootless container support.

This works in conjunction with ZFS's zoned_uid property (proposed
separately to OpenZFS) which delegates dataset operations to user
namespaces, enabling full rootless podman/docker with native ZFS
storage.

Signed-off-by: Colin K. Williams <colin@li-nk.org>
@li-nkSN li-nkSN force-pushed the feat/zfs-idmap-support branch from 3f0ed86 to 7180d9a Compare February 1, 2026 04:52
@giuseppe
Copy link
Member

is this still a WIP?

@li-nkSN
Copy link
Author

li-nkSN commented Feb 11, 2026

Just working through the PR through OpenZFS and I will open this.

@li-nkSN
Copy link
Author

li-nkSN commented Feb 11, 2026

@giuseppe do you have any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rootless Podman with zfs Storage Driver -- "Error: cannot find root filesystem"

2 participants