* btrfs snapshot root level and for subvolumes
@ 2015-04-22 11:19 sri
2015-04-22 13:53 ` Austin S Hemmelgarn
0 siblings, 1 reply; 2+ messages in thread
From: sri @ 2015-04-22 11:19 UTC (permalink / raw)
To: linux-btrfs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: btrfs snapshot root level and for subvolumes
2015-04-22 11:19 btrfs snapshot root level and for subvolumes sri
@ 2015-04-22 13:53 ` Austin S Hemmelgarn
0 siblings, 0 replies; 2+ messages in thread
From: Austin S Hemmelgarn @ 2015-04-22 13:53 UTC (permalink / raw)
To: sri, linux-btrfs
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-22 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-22 11:19 btrfs snapshot root level and for subvolumes sri
2015-04-22 13:53 ` Austin S Hemmelgarn
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).