From: Andy Lutomirski <luto@mit.edu>
To: Goffredo Baroncelli <kreijack@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Snapshot mysteries (and an oops)
Date: Sat, 12 Dec 2009 13:37:21 -0500 [thread overview]
Message-ID: <4B23E2E1.4020103@mit.edu> (raw)
In-Reply-To: <200912112040.18415.kreijack@alice.it>
Goffredo Baroncelli wrote:
> Hi Andrew
>
> On Friday 11 December 2009, Andrew Lutomirski wrote:
>> Hi all-
>>
>> [test]# rm -rf snap1
>> rm: cannot remove directory `snap1': Directory not empty
>> [test]# ls snap1
>> [test]#
>>
>> OK, so rmdir can't remove snapshots. (Is there any good reason for that?)
> The volume is like a filesystem: you cannot remove a directory where is
> mounted a filesystem
>
Currently an unprivileged user can create snapshots but can't remove
them. Of course, allowing rmdir on an empty snapshot wouldn't help, but
at least the admin wouldn't be confused when rm -rf fails.
>
>> [test]# btrfsctl -D snap1
>> ioctl:: No such file or directory
>> [test]# btrfsctl -D snap1 .
>> operation complete
>> Btrfs v0.19-4-gab8fb4c
>>
>> I can't make any sense of that. What's the second parameter to -D
>> supposed to do?
>>
>> [test]# btrfsctl -D subvol1 .
>> operation complete
>> Btrfs v0.19-4-gab8fb4c
>>
>> Phew. That worked :)
>
> Yes the docs may be improved. The syntax is:
>
> btrfsctl -D <snapshotname> <directory>
> <snapshotname> snapshot name
> <directory> where the snapshot is
>
What's the point of the last parameter? Can't either btrfsctl or the
filesystem figure that out on its own?
(Can a subvolume be "mounted" in two places at once? If so, maybe the
second parameter makes a tiny bit of sense.)
--Andy
next prev parent reply other threads:[~2009-12-12 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 19:16 Snapshot mysteries (and an oops) Andrew Lutomirski
2009-12-11 19:40 ` Goffredo Baroncelli
2009-12-12 18:37 ` Andy Lutomirski [this message]
2009-12-12 19:17 ` Goffredo Baroncelli
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B23E2E1.4020103@mit.edu \
--to=luto@mit.edu \
--cc=kreijack@gmail.com \
--cc=linux-btrfs@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox