Skip to content

expose dataset’s jail name via zfs list #15710

@dch

Description

@dch

Describe the feature would like to see added to OpenZFS

show name of assigned jail for a jailed dataset in ‘zfs list’
properties.

# zfs jail myjail zroot/jailed
### no way to see what this assignment was using existing commands
### what we would like
# zfs get -Ho jail zroot/jailed
myjail
### should probably return with NONE or similar, or error if dataset isn’t jailed
# zfs get -Ho jail zroot/notjailed
none

How will this feature improve OpenZFS?

allow scripts to correctly identify the full mount path for backups and other tasks

Additional context

zfs on FreeBSD allows jailing a dataset. It is mounted inside a jail aka “container” and can optionally be managed inside the container.

a common pattern is to use a script running outside the container for tasks like backups, thus denying an attacker or in-jail admin to prevent backups.

This external script needs a way to loop over jailed datasets, extract the mounted path as seen outside the jail, to backup correct paths inside the jail, for example a snapshot or just active files

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: FeatureFeature request or new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions