* different st_dev's in one subvolume
@ 2011-06-02 0:39 Stephane Chazelas
2011-06-02 0:59 ` Stephane Chazelas
0 siblings, 1 reply; 2+ messages in thread
From: Stephane Chazelas @ 2011-06-02 0:39 UTC (permalink / raw)
To: linux-btrfs
Hiya,
please consider this:
~# truncate -s1G ./a
~# mkfs.btrfs ./a
~# sudo mount -o loop ./a /mnt/1
~# cd /mnt/1
/mnt/1# ls
/mnt/1# btrfs sub c A
Create subvolume './A'
/mnt/1# btrfs sub c A/B
Create subvolume 'A/B'
/mnt/1# touch A/inA A/B/inB
/mnt/1# btrfs sub snap A A.snap
Create a snapshot of 'A' in './A.snap'
/mnt/1# zmodload zsh/stat
/mnt/1# zstat +device ./**/*
. 25
A 26
A/B 27
A/B/inB 27
A/inA 26
A.snap 28
A.snap/B 23
A.snap/inA 28
Why does A.snap/B have a different st_dev from A.snap's?
Also:
/mnt/1# touch A.snap/B/foo
touch: cannot touch `A.snap/B/foo': Permission denied
I can rmdir that directory OK though.
Also note that the permissions are different:
/mnt/1# ll A
total 0
drwx------ 1 root root 6 Jun 2 00:54 B/
-rw-r--r-- 1 root root 0 Jun 2 00:54 inA
/mnt/1# ll A.snap
total 0
drwxr-xr-x 1 root root 0 Jun 2 01:29 B/
-rw-r--r-- 1 root root 0 Jun 2 00:54 inA
If I create another snap of A or A.snap, the "B" in there gets
the same st_dev (23).
/mnt/1# btrfs sub create A.snap/B/C
Create subvolume 'A.snap/B/C'
ERROR: cannot create subvolume
# btrfs sub snap A.snap/B B.snap
ERROR: 'A.snap/B' is not a subvolume
--
Stephane
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: different st_dev's in one subvolume
2011-06-02 0:39 different st_dev's in one subvolume Stephane Chazelas
@ 2011-06-02 0:59 ` Stephane Chazelas
0 siblings, 0 replies; 2+ messages in thread
From: Stephane Chazelas @ 2011-06-02 0:59 UTC (permalink / raw)
To: linux-btrfs
2011-06-02 01:39:41 +0100, Stephane Chazelas:
[...]
> /mnt/1# zstat +device ./**/*
> . 25
> A 26
> A/B 27
> A/B/inB 27
> A/inA 26
> A.snap 28
> A.snap/B 23
> A.snap/inA 28
>
> Why does A.snap/B have a different st_dev from A.snap's?
[...]
> If I create another snap of A or A.snap, the "B" in there gets
> the same st_dev (23).
[...]
And same inode, ctime, mtime, atime... And when I create a new
snapshot, all those (regardless of where they are) have their
times updated at once.
I also noticed the st_nlink is always one but then came accross
http://thread.gmane.org/gmane.comp.file-systems.btrfs/4580
--
Stephane
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-02 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-02 0:39 different st_dev's in one subvolume Stephane Chazelas
2011-06-02 0:59 ` Stephane Chazelas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.