Bug#868883: schroot: btrfs-snapshot requires btrfs-snapshot-directory= but doesn't use it

2017-07-23 Thread Roger Leigh

On 19/07/17 13:56, Uwe Kleine-König wrote:

I have:

$ cat /etc/schroot/chroot.d/unstable-amd64-default-237842
[unstable-amd64-default]
description=Debian unstable/amd64 chroot
groups=root,sbuild
root-groups=root,sbuild
profile=default
type=btrfs-snapshot
btrfs-source-subvolume=/srv/chroot/unstable-amd64-default
btrfs-snapshot-directory=/srv/chroot/unstable-amd64-default-snaps

and it works as expected. However the snapshots are created below
/run/schroot/mount/.


Is it *created* below /run/schroot/mount or is it later *mounted* below 
this location?


Looking at the program logic, the session should be snapshotted under 
the specified snapshot directory:


  if (btrfs_snapshot && !btrfs_snapshot->get_snapshot_directory().empty())
{
  std::string snapname(btrfs_snapshot->get_snapshot_directory());
  snapname += "/" + clone->get_name();
  btrfs_snapshot->set_snapshot_name(snapname);
}

in sbuild/sbuild-chroot-facet-session-clonable.cc.  Would it be possible 
to double-check exactly what is where?



An unrelated FYI: On the schroot master branch, Btrfs snapshot support 
has been removed.  The repeated Btrfs filesystem unbalancing with 
intensive snapshotting made this feature unsuitable for production use. 
I will be replacing it with ZFS snapshot support.



Regards,
Roger



Bug#868883: schroot: btrfs-snapshot requires btrfs-snapshot-directory= but doesn't use it

2017-07-19 Thread Uwe Kleine-König
Package: schroot
Version: 1.6.10-3+b1
Severity: minor

Hello,

I have:

$ cat /etc/schroot/chroot.d/unstable-amd64-default-237842 
[unstable-amd64-default]
description=Debian unstable/amd64 chroot
groups=root,sbuild
root-groups=root,sbuild
profile=default
type=btrfs-snapshot
btrfs-source-subvolume=/srv/chroot/unstable-amd64-default
btrfs-snapshot-directory=/srv/chroot/unstable-amd64-default-snaps

and it works as expected. However the snapshots are created below
/run/schroot/mount/.

$ dpkg -L schroot | xargs grep -i btrfs.snapshot.directory 2>/dev/null
/etc/schroot/schroot.conf:#btrfs-snapshot-directory=/srv/chroot/btrsnap/snapshots
/etc/schroot/setup.d/05btrfs:if [ ! -d 
"$CHROOT_BTRFS_SNAPSHOT_DIRECTORY" ]; then
/etc/schroot/setup.d/05btrfs:fatal "Btrfs snapshot directory 
'$CHROOT_BTRFS_SNAPSHOT_DIRECTORY' does not exist"
Binary file /usr/bin/schroot matches

So I guess the respective if-block in 05btrfs can just be dropped
without loss.

Best regards
Uwe

-- System Information:
Debian Release: 9.0
  APT prefers stable
  APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (500, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages schroot depends on:
ii  libboost-filesystem1.62.0   1.62.0+dfsg-4
ii  libboost-iostreams1.62.01.62.0+dfsg-4
ii  libboost-program-options1.62.0  1.62.0+dfsg-4
ii  libboost-system1.62.0   1.62.0+dfsg-4
ii  libc6   2.24-11+deb9u1
ii  libgcc1 1:6.3.0-18
ii  libpam0g1.1.8-3.6
ii  libstdc++6  6.3.0-18
ii  libuuid12.29.2-1
ii  lsb-base9.20161125
ii  schroot-common  1.6.10-3

schroot recommends no packages.

Versions of packages schroot suggests:
pn  aufs-tools | unionfs-fuse  
pn  btrfs-tools
ii  debootstrap1.0.89
ii  lvm2   2.02.168-2
pn  qemu-user-static   

-- no debconf information