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

Dataset not remounted after rollback of parent directory #11511

Closed
gioele opened this issue Jan 24, 2021 · 1 comment
Closed

Dataset not remounted after rollback of parent directory #11511

gioele opened this issue Jan 24, 2021 · 1 comment
Labels
Status: Stale No recent activity for issue Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@gioele
Copy link

gioele commented Jan 24, 2021

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 18.04.4
Linux Kernel 5.4.0-58-generic #64~18.04.1-Ubuntu
Architecture x84_64
ZFS Version 0.8.3-1ubuntu12.5
SPL Version 0.8.3-1ubuntu12.5

Describe the problem you're observing

It looks like a dataset mounted as A/B will no longer be accessible (or mounted at all) if A is rolled-back from a snapshot. Trying to force a remount via set mountpoint=A/B-foobar will not work. An effective workaround is first setting mountpount=none and then mountpoint=A/B again.

Describe how to reproduce the problem

The following steps come from the logs of my system. It is likely that some of these steps are not necessary to reproduce the issue.

These are the relevant datasets and snapshots present in the system

$ zfs list
NAME                    USED  AVAIL  REFER  MOUNTPOINT
FAST                    292G  95,7G    96K  none
[...]
FAST/srv/parent        84,5G  95,7G    96K  none
FAST/srv/parent/.sub   84,5G  95,7G  84,5G  /srv/parent/.sub
SLOW                   1,81T  5,00T   140K  none
SLOW/parent             177G  5,00T   161G  /srv/parent

$ zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
FAST/srv/parent/.sub@saturday   13,1M      -  84,5G  -
SLOW/parent@saturday            36,6G      -  88,6G  -

First, the parent/.sub dataset must be remounted somewhere else and the stray mountpoint removed.

$ sudo zfs set mountpoint=/srv/parent/.subX FAST/srv/parent/.sub
$ sudo rmdir /srv/parent/.sub
$ ls /srv/parent | grep .subX | wc -l
1

The issue start when a snapshot of the parent directory is rolled back:

$ sudo zfs rollback SLOW/parent@saturday

A this point, one expects /srv/parent/.subX to still be mounted/available. but it is not.

$ ls /srv/parent | grep .subX | wc -l
0

Remounting the .sub dataset with another mountpoint does not help.

$ sudo zfs set mountpoint=/srv/parent/.subX2 FAST/srv/parent/.sub
$ ls /srv/parent | grep .subX | wc -l
0

A workaround that works is first unmounting the dataset and then remounting it

$ sudo zfs set mountpoint=none FAST/srv/parent/.sub
$ sudo zfs set mountpoint=/srv/parent/.subX FAST/srv/parent/.sub
$ ls /srv/parent | grep .subX | wc -l
1

Include any warning/errors/backtraces from the system logs

None that I could find. It is a bit worrysome that the set mountpoint operation is silently failing (from the point of view of the user) without any kind of feedback.

@gioele gioele added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Jan 24, 2021
@stale
Copy link

stale bot commented Jan 26, 2022

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale No recent activity for issue label Jan 26, 2022
@stale stale bot closed this as completed Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale No recent activity for issue Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

1 participant