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

Misclassification of parent dataset as 'recursive' #45

Open
haasn opened this issue Apr 27, 2021 · 0 comments
Open

Misclassification of parent dataset as 'recursive' #45

haasn opened this issue Apr 27, 2021 · 0 comments

Comments

@haasn
Copy link

haasn commented Apr 27, 2021

$ zfs list -rt filesystem -o name,mounted,com.sun:auto-snapshot media
NAME                MOUNTED  COM.SUN:AUTO-SNAPSHOT
media               yes      true
media/movies        no       true
media/movies/anime  yes      true
media/movies/big    yes      true
media/movies/yt     yes      true
$ zfs-auto-snapshot -n -v hourly 24 -P media
zfs snapshot -r media@zfs-auto-snap_hourly-2021-04-27-10h53
zfs snapshot -r media/movies/anime@zfs-auto-snap_hourly-2021-04-27-10h53
zfs snapshot -r media/movies/big@zfs-auto-snap_hourly-2021-04-27-10h53
zfs snapshot -r media/movies/yt@zfs-auto-snap_hourly-2021-04-27-10h53

Because media/movies is not mounted, it decides to create the leaf children's snapshots recursively. (Which is an... interesting design decision, to not snapshot unmounted filesystems)

However, it fails to treat the parent (media) as non-recursive. This results in the creation (but not subsequent deletion) of snapshots in media/movies:

$ zfs list -t snapshot media/movies | wc -l
3989

If I may ask, why all this.. sophistication, especially given that it's (clearly) brittle and results in bugs? What's wrong with treating every dataset as independent and issuing a zfs snapshot per dataset?

@haasn haasn changed the title Misclassification of parent vdev as 'recursive' Misclassification of parent dataset as 'recursive' Apr 27, 2021
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

1 participant