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 mount fails without showing any error or output #12560

Closed
Carbon401 opened this issue Sep 12, 2021 · 5 comments
Closed

zfs mount fails without showing any error or output #12560

Carbon401 opened this issue Sep 12, 2021 · 5 comments
Labels
Status: Stale No recent activity for issue Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@Carbon401
Copy link

Carbon401 commented Sep 12, 2021

System information

Type Version/Name
Distribution Name Debian
Distribution Version 11.0
Kernel Version 5.10.0-8-amd64
Architecture amd64
OpenZFS Version zfs-2.0.3-9

Describe the problem you're observing

"zfs mount" fails without error if mount point is set to /home but succeeds if mount point is changed to anything else. /home is empty, there are no open files there (checked with lsof) and not currently a mount point. Sound very strange and there could be some obscure reason why this happens but without proper error reporting there's no way to know what's going on. Any ideas how to debug this?

Describe how to reproduce the problem

root@test:~# zfs list tank/home
NAME        USED  AVAIL     REFER  MOUNTPOINT
tank/home  1.55T  1.96T      272K  /home

root@test:~# mount | grep /home

root@test:~# zfs mount tank/home
# no error message or output

root@test:~# mount | grep /home
# no output - not mounted

root@test:~# zfs set mountpoint=/home2 tank/home

root@test:~# zfs mount tank/home

root@test:~# mount | grep /home
# mounted at /home2
tank/home on /home2 type zfs (rw,relatime,xattr,posixacl)

# change back to /home
root@test:~# zfs set mountpoint=/home tank/home
# no error message or output

root@test:~# zfs mount base/home
# no error message or output

root@test:~# mount | grep /home
# not mounted again

Include any warning/errors/backtraces from the system logs

@Carbon401 Carbon401 added the Type: Defect Incorrect behavior (e.g. crash, hang) label Sep 12, 2021
@Carbon401 Carbon401 changed the title zfs mount fails if mount point is /home zfs mount fails without showing any error or output Sep 17, 2021
@mafredri
Copy link

mafredri commented Oct 21, 2021

I had the same issue after sending some datasets, turns out the culprit was systemd:

systemd[1]: data-backup.mount: Unit is bound to inactive unit zfs-load-key-rpool-data-backup.service. Stopping, too.
systemd[1]: Unmounting /data/backup...
systemd[4155]: data-backup.mount: Succeeded.
systemd[1]: data-backup.mount: Succeeded.
systemd[1]: Unmounted /data/backup.

Trying to manage this service results in:

Warning: The unit file, source configuration file or drop-ins of zfs-load-key-rpool-data-downloads.service changed on disk. Run 'systemctl daemon-reload' to reload units.

And the problem was solved simply by running:

systemctl daemon-reload

@Carbon401
Copy link
Author

Thanks for the suggestion but that wasn't the issue in my case. Still wondering how can I debug this. The failed mount command doesn't print any error or message, no output in any log file. Just silently fails. Works immediately if mount point is changed to anything else.

@mtippmann
Copy link

@Egalitarian looks like you hit the same bug as me: #12418 - I thought about using ftrace to get a stacktrace but had no time yet - it's still there on latest kernel and latest git (5.15, 380b072)

@Carbon401
Copy link
Author

Carbon401 commented Nov 15, 2021

I've just installed Debian on a flash drive using ext4 (it was on a zfs root before) and the issue is gone. Is there a possible connection here?

@stale
Copy link

stale bot commented Nov 22, 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 Nov 22, 2022
@stale stale bot closed this as completed Mar 19, 2023
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 Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

3 participants