Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.zfs directory, of a dataset, not showing one snapshot directory #2930

Closed
flaviomreis opened this issue Nov 24, 2014 · 1 comment
Closed
Milestone

Comments

@flaviomreis
Copy link

Hello, sorry my english, I am brazilian

I have a pool named pool01 with a dataset named testa/bb. This dataset is teaching dataset, it is small. In this dataset I have the following snapshots:

# zfs list -t all -r testa/bb
NAME         USED  AVAIL  REFER  MOUNTPOINT
testa/bb     143K  62,2M    30K  /testa/bb
testa/bb@b    19K      -    30K  -
testa/bb@c    19K      -    30K  -
testa/bb@d    19K      -    30K  -
testa/bb@e    19K      -    30K  -
testa/bb@f    19K      -    30K  -
testa/bb@g    18K      -    30K  -

And a ls in /testa/bb (the mountpoint), I receive:

# ls -al /testa/bb/.zfs/snapshot/
total 0
dr-xr-xr-x 2 root root 2 Nov 24 10:43 .
dr-xr-xr-x 1 root root 0 Nov 24 10:43 ..
dr-xr-xr-x 1 root root 0 Nov 24 10:43 b
dr-xr-xr-x 1 root root 0 Nov 24 10:43 c
dr-xr-xr-x 1 root root 0 Nov 24 10:43 d
dr-xr-xr-x 1 root root 0 Nov 24 10:43 f
dr-xr-xr-x 1 root root 0 Nov 24 10:43 g

Where is the directoy "e", corresponding to snapshot "e"?

This directory is showed with a ls -dla:

# ls -dla /testa/bb/.zfs/snapshot/e
dr-xr-xr-x 1 root root 0 Nov 24 11:45 /testa/bb/.zfs/snapshot/e

I can access the directory "e" and list files:

# cd /testa/bb/.zfs/snapshot/e
# pwd
/testa/bb/.zfs/snapshot/e
# ls -al
total 4
drwxr-xr-x 2 root root 7 Nov 24 10:35 .
dr-xr-xr-x 3 root root 3 Nov 24 10:43 ..
-rw-r--r-- 1 root root 0 Nov 24 10:25 a
-rw-r--r-- 1 root root 0 Nov 24 10:25 b
-rw-r--r-- 1 root root 0 Nov 24 10:25 c
-rw-r--r-- 1 root root 0 Nov 24 10:25 d
-rw-r--r-- 1 root root 0 Nov 24 10:35 e

# dmesg | grep SPL
[    5.738688] SPL: Loaded module v0.6.3-1_gf6a8696
[    6.876229] SPL: using hostid 0x007f0101
# dmesg | grep ZFS
[    6.065538] ZFS: Loaded module v0.6.3-14_g1e8db77, ZFS pool version 5000, ZFS filesystem version 5

I send the dataset to a file, but I dont know how attach here. It's a small file, 110kb.

Whats happening. How can I relate this?

Thanks,

@behlendorf
Copy link
Contributor

There's a fix for this issue in #2797. If you could test the patch stack there and verify it fixes your issue that would be helpful.

@behlendorf behlendorf added this to the 0.6.4 milestone Dec 2, 2014
DeHackEd pushed a commit to DeHackEd/zfs that referenced this issue Apr 4, 2015
dmu_snapshot_list_next stores the index of the next snapshot entry to the offp
argument, which zpl_snapdir_iterate then uses for the dir_emit. This
result in an off-by-one error. Therefore a temporary variable should be
used.

This was a regression introduced in commit openzfs/zfs@0f37d0c.

Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#2930
DeHackEd pushed a commit to DeHackEd/zfs that referenced this issue Apr 5, 2015
dmu_snapshot_list_next stores the index of the next snapshot entry to the offp
argument, which zpl_snapdir_iterate then uses for the dir_emit. This
result in an off-by-one error. Therefore a temporary variable should be
used.

This was a regression introduced in commit openzfs/zfs@0f37d0c.

Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#2930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants