Hello there,

On Tue, May 11, 2021 at 10:48:00AM +0200, Sebastian Ramacher wrote:
> Thanks for adding zfs support to schroot. While entering a zfs-backed
> chroot works fine, i.e., schroot -c unstable-amd64-sbuild, trying to
> enter the source chroot fails:
> [...]

FWIW, this works for me, so it might simply be that some additional
configuration is required. Thus the following just for reference:

My bash history tells me that I actually applied

# zfs set mountpoint=legacy zfspool/SYSTEM/srv/chroot/unstable-amd64-sbuild

when migrating to a ZFS-based schroot setup as per

# cat /etc/schroot/chroot.d/unstable-amd64-sbuild-*
[unstable-amd64-sbuild]
description=Debian unstable/amd64 autobuilder
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild
type=zfs-snapshot
zfs-dataset=zfspool/SYSTEM/srv/chroot/unstable-amd64-sbuild
mount-options=-o relatime,async
command-prefix=/var/cache/pbuilder/ccache/sbuild-setup,eatmydata
aliases=UNRELEASED,sid,rc-buggy,experimental

and indeed it just works for me, cf. for illustration

$ schroot -c unstable-amd64-sbuild # normal access
(unstable-amd64-sbuild)fernst@fernst:~$ df -hT
Filesystem                                                                      
                                   Type   Size  Used Avail Use% Mounted on
zfspool/SYSTEM/srv/chroot/unstable-amd64-sbuild/schroot-unstable-amd64-sbuild-caeca563-8016-4209-a022-77f59f5d4058
 zfs     65G  359M   64G   1% /
tmpfs                                                                           
                                   tmpfs   16G     0   16G   0% /dev/shm
zfspool/SYSTEM/var                                                              
                                   zfs     50G   33G   18G  65% /build
zfspool/SYSTEM/home/fernst                                                      
                                   zfs    264G  201G   64G  76% 
/home/fernst/debian
/dev/mapper/lvmpool-root                                                        
                                   ext4    15G   11G  4.0G  73% 
/etc/sudoers.d/local-reprotest
(unstable-amd64-sbuild)fernst@fernst:~$ # CTRL+D here
exit
$ schroot -c source:unstable-amd64-sbuild # accessing the source chroot as a 
normal user
E: Access not authorised
I: You do not have permission to access the schroot service.
I: This failure will be reported.
$ sudo schroot -c source:unstable-amd64-sbuil # accessing the source chroot via 
sudo
(unstable-amd64-sbuild)root@fernst:/home/fernst# touch /blubber # apply some 
change
(unstable-amd64-sbuild)root@fernst:/home/fernst# # CTRL+D here
exit
$ schroot -c unstable-amd64-sbuild
(unstable-amd64-sbuild)fernst@fernst:~$ ls -al /blubber # check whether the 
above change persisted
-rw-r--r-- 1 root root 0 Mar 29 16:09 /blubber
(unstable-amd64-sbuild)fernst@fernst:~$ # CTRL+D here
exit

The only glitch I had so far with ZFS-based schroot I just reported in
<https://bugs.debian.org/1008616>, and there is a simple fix available.

Cheers,
Flo

Attachment: signature.asc
Description: PGP signature

Reply via email to