unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Rutger Helling <rhelling@mykolab.com>
To: ludo@gnu.org
Cc: 29674@debbugs.gnu.org
Subject: bug#29674: Ceph creates Btrfs subvolumes on Btrfs during tests.
Date: Tue, 12 Dec 2017 14:23:56 +0100	[thread overview]
Message-ID: <370b49eecdaf24eaf076fc9ef7479b61@mykolab.com> (raw)
In-Reply-To: <e62ff91ce749fecd4efbe7c623b1e10e@mykolab.com>

Actually, I just tested it with the following:

$ cd /tmp
$ sudo -s -u guixbuilder01
bash-4.4$ guix environment -C --ad-hoc btrfs-progs
guixbuilder01@guixsd /tmp [env]#  btrfs subvol create test-snapshot
Create subvolume './test-snapshot'
guixbuilder01@guixsd /tmp [env]#  btrfs subvol del test-snapshot
Delete subvolume (no-commit): '/tmp/test-snapshot'
ERROR: cannot delete '/tmp/test-snapshot': Operation not permitted
guixbuilder01@guixsd /tmp [env]# exit
exit
bash-4.4$ guix environment -C --ad-hoc coreutils
guixbuilder01@guixsd /tmp [env]#  rm -rfv test-snapshot/
rm: cannot remove 'test-snapshot/': Operation not permitted
guixbuilder01@guixsd /tmp [env]#  rmdir  -v test-snapshot/
rmdir: removing directory, 'test-snapshot/'
rmdir: failed to remove 'test-snapshot/': Operation not permitted
guixbuilder01@guixsd /tmp [env]#

On 2017-12-12 14:10, Rutger Helling wrote:

> Hi Ludo,
> 
> I'll try building again later (could be a while, Ceph takes a really 
> long time to build), but I highly doubt that that's the case.
> Btrfs subvolumes cannot be deleted with tools such as rm/rmdir, even as 
> root. You have to run 'btrfs subvolume delete /subvolume' as root.
> Although a regular user may create subvolumes, they cannot delete it 
> (unless the USER_SUBVOL_RM_ALLOWED mount option is on).
> Since the building is done as a guixbuilder user, I don't see how that 
> would work.
> And even if it did, if a build failed for example you'd still be left 
> with a bunch of subvolumes in /tmp that can only be deleted as root.
> 
> On 2017-12-12 13:52, ludo@gnu.org wrote:
> 
> Hi Rutger,
> 
> Rutger Helling <rhelling@mykolab.com> skribis:
> 
> I was surprised to learn that Ceph creates Btrfs subvolumes during its
> tests.
> This is problematic because on Btrfs regular users can create
> subvolumes, but they cannot delete them.
> This means I had to manually delete the following subvolumes as root:
> 
> ID 1744 gen 819598 top level 257 path
> tmp/guix-build-ceph-12.0.2.drv-0/td/t-7201/dev/osd0/current
> ID 1745 gen 819598 top level 257 path
> tmp/guix-build-ceph-12.0.2.drv-0/td/t-7201/dev/osd0/snap_1
> Does that mean that wiping out /tmp/guix-build-ceph-*, as happens when
> build finishes, isn't enough to get rid of those volumes?
> 
> Ludo'.

  reply	other threads:[~2017-12-12 13:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 10:28 bug#29674: Ceph creates Btrfs subvolumes on Btrfs during tests Rutger Helling
2017-12-12 12:52 ` Ludovic Courtès
2017-12-12 13:10   ` Rutger Helling
2017-12-12 13:23     ` Rutger Helling [this message]
2017-12-12 16:03       ` Ludovic Courtès
2017-12-12 16:13         ` Tobias Geerinckx-Rice
2017-12-12 20:19           ` Ludovic Courtès
2017-12-13  8:44             ` Rutger Helling
2017-12-27 22:50             ` Rutger Helling
2017-12-27 23:07               ` Leo Famulari
2017-12-27 23:16               ` Tobias Geerinckx-Rice
2017-12-28  4:30                 ` Tobias Geerinckx-Rice
2017-12-28  7:31                   ` Rutger Helling
2018-01-08 14:29                     ` Ludovic Courtès
2018-01-08 15:38                       ` Rutger Helling
2017-12-28  0:04               ` Marius Bakke
2017-12-12 15:58 ` Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=370b49eecdaf24eaf076fc9ef7479b61@mykolab.com \
    --to=rhelling@mykolab.com \
    --cc=29674@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).