linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: sri <toyours_sridhar@yahoo.co.in>, linux-btrfs@vger.kernel.org
Subject: Re: btrfs snapshot root level and for subvolumes
Date: Wed, 22 Apr 2015 09:53:58 -0400	[thread overview]
Message-ID: <5537A7F6.9040003@gmail.com> (raw)
In-Reply-To: <loom.20150422T130823-598@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

On 2015-04-22 07:19, sri wrote:
> Hi,
> I btrfs file system created with one device /dev/sdb and mounted under
> /btrfs1.
>
> created one file /btrfs1/errno.h, one directory /btrfs1/dir1 and
> 2 subvolumes /btrfs1/subvol1 and /btrfs/subvol2
>
> create directories and files under subvolume /btrfs1/subvol1.
> Nothing inside /btrfs1/subvol2.
>
> Below is tree representation of the file system.
>
> #cd /btrfs1
> #tree /btrfs1
>   - errno.h
>    -dir1
>       - file1
>       - file2
>    -subvol1
>       -dir1
>         -file1
>       -file2
>
>    -subvol2
>
>
> at root level of /btrfs1, i have one file errno.h, dir1, and 2
> subvolumes subvol1, subvol2.
>
> When I create snapshot for subvol1 (say snap_subvol1), I can able to see
> all files and directories of subvol1 are showed in /btrfs1/snap_subvol1
>
> But when I create snapshot at btrfs1 level by using below command
> "btrfs subvolume snapshot /btrfs1 /btrfs1/root_snap"
>
> and see contents of /btrfs1/root_snap, I can able to see all root level
> files and directories but cannot find any files and directories inside
> subvol1.
>
> My question is can't we take btrfs root level snapshot and get snapshot
> of everything under root file system ??
> Is btrfs subvolume snapshot is only to take subvolume snapshot?
>
> If it so, is there a way to take snapshot at root level? (in this case
> /btrfs1)
>
> I am just confused how subvolume snapshot work in this case.

Because of how subvolumes work on btrfs, snapshots currently stop at 
subvolume boundaries.  This is an intended behavior to people from 
shooting themselves in the foot with recursive snapshots stored in the 
subvolume that is being snapshotted.  As far as I know, there is 
currently no way to do recursive snapshotting of subvolumes without 
using some form of scripting.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2967 bytes --]

      reply	other threads:[~2015-04-22 13:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 11:19 btrfs snapshot root level and for subvolumes sri
2015-04-22 13:53 ` Austin S Hemmelgarn [this message]

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=5537A7F6.9040003@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=toyours_sridhar@yahoo.co.in \
    /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).