From: Goffredo Baroncelli <kreijack@libero.it>
To: "krzf83@gmail.com" <krzf83@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs subvolume snapshot syntax too "smart"
Date: Mon, 04 Apr 2011 21:47:10 +0200 [thread overview]
Message-ID: <4D9A203E.9090807@libero.it> (raw)
In-Reply-To: <BANLkTikvyUH2Dhm2p=N-GSzy7r4_nj=bNg@mail.gmail.com>
On 04/04/2011 09:09 PM, krzf83@gmail.com wrote:
> I understand btrfs intent but same command run twice should not give
> diffrent results. This really makes snapshot automation hard
>
>
> root@sv12 [/ssd]# btrfs subvolume snapshot /ssd/sub1 /ssd/5
> Create a snapshot of '/ssd/sub1' in '/ssd/5'
> root@sv12 [/ssd]# btrfs subvolume snapshot /ssd/sub1 /ssd/5
> Create a snapshot of '/ssd/sub1' in '/ssd/5/sub1'
> root@sv12 [/ssd]# btrfs subvolume snapshot /ssd/sub1 /ssd/5
> Create a snapshot of '/ssd/sub1' in '/ssd/5/sub1'
> ERROR: cannot snapshot '/ssd/sub1'
The same is true for cp:
# cp -rf /ssd/sub1 /ssd/5 -> copy "sub1" as "5"
# cp -rf /ssd/sub1 /ssd/5 -> copy "sub1" in "5"
However you are right. It could be fixed easily adding a switch like
"--script", which force to handle the last part of the destination as
the name of the subvolume, raising an error if it already exists.
"subvolume snapshot" is the only command which suffers of this kind of
problem ?
Regards
G.Baroncelli
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> .
>
next prev parent reply other threads:[~2011-04-04 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 19:09 btrfs subvolume snapshot syntax too "smart" krzf83@gmail.com
2011-04-04 19:47 ` Goffredo Baroncelli [this message]
2011-04-04 19:57 ` Freddie Cash
2011-04-05 14:29 ` Xavier Nicollet
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=4D9A203E.9090807@libero.it \
--to=kreijack@libero.it \
--cc=kreijack@inwind.it \
--cc=krzf83@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;
as well as URLs for NNTP newsgroup(s).