Bug 260160 - zfs jailed: snapshots not accessible
Summary: zfs jailed: snapshots not accessible
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2021-12-01 21:51 UTC by Urs
Modified: 2021-12-02 11:57 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Urs 2021-12-01 21:51:43 UTC
When setting the property "jailed=on" for a dataset and this dataset is mounted in a jail: any snapshot will not be accessible:

How to reproduce:

On host create a dataset
   # zfs create zdisk/test
   # zfs set mountpoint=/mnt/famnas
   # zfs set jailed=on zdisk/test

Make sure that /mnt is writable in the jail...
go into jail:
   # zfs list
NAME                       USED  AVAIL     REFER  MOUNTPOINT
zdisk                     5.08T  8.97T       88K  /zdisk
zdisk/test                5.08T  8.97T      136K  /mnt/test

   # zfs snapshot zdisk/test@now
   # ls -li /mnt/myjail/.zfs/snapshot
ls: now: Operation not permitted
total 0

On older FreeBSD versions this worked.
Comment 1 Fabian Keil 2021-12-02 11:57:18 UTC
I can confirm that ZFS snapshots are accessible in jails on my systems based on 12.3-STABLE.