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

udev not creating device file for cloned zvol #10603

Closed
ghost opened this issue Jul 21, 2020 · 2 comments
Closed

udev not creating device file for cloned zvol #10603

ghost opened this issue Jul 21, 2020 · 2 comments
Labels
Component: Encryption "native encryption" feature Status: Stale No recent activity for issue Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@ghost
Copy link

ghost commented Jul 21, 2020

System information

Type Version/Name
Distribution Name Debian
Distribution Version Bullseye
Linux Kernel 5.7.6
Architecture x86_64
ZFS Version 0.8.4
SPL Version 0.8.4

Describe the problem you're observing

I have an encrypted zvol pool_name/base and a snapshot of it pool_name/base@snapshot.
When a zvol clone pool_name/clone is created from the snapshot, udev creates a device file /dev/zvol/pool_name/clone(symlink to /dev/zdX).
However, this does not seem to survive an export. When the zfs pool is re-imported, device file is only created for the base zvol, not the clone.

Describe how to reproduce the problem

zpool create pool_name backing_device
zpool import pool_name
zfs create -V 1G -o encryption=on,keylocation=file:///path_to_encryption_key pool_name/base
zfs snapshot pool_name/base@snapshot
zfs clone pool_name/base@snapshot pool_name/clone
By now /dev/zvol/pool_name/clone should show up.

zfs export pool_name
We would expect that after the re-import, /dev/zvol/pool_name/clone would appear again. However, only pool_name/base is under /dev/zvol/
zpool import -l pool_name

Side note:

  • There seems to be a certain degree randomness in its behaviour. Sometimes (but rarely) /dev/zvol/pool_name/clone does show up.
  • In reality, I have multiple zvol clones based off the snapshot. There have been cases when only some of these zvol clones appear under /dev/zvol
  • When /dev/zvol/pool_name/clone is not created, neither is /dev/zdX, so it doesn't seem like a problem with udev configuration.

Include any warning/errors/backtraces from the system logs

Not sure which file contains the log for zfs.

@danielfullmer
Copy link

I am encountering the same issue as well. This appears to be an issue with combining encryption with zvol clones. Running the instructions for reproducing above will work fine if encryption is not enabled, but fail if encryption is enabled.

(As mentioned in the original issue, I don't think this is an issue with udev, since even the /sys/block/zd[0-9]* device doesn't show up at all.)

System information

Type Version/Name
Distribution Name NixOS
Distribution Version 21.11.20210628.b809a63
Linux Kernel 5.4.127
Architecture x86_64
ZFS Version 2.1.0-rc7
SPL Version 2.1.0-rc7

@stale
Copy link

stale bot commented Jul 10, 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 Jul 10, 2022
@stale stale bot closed this as completed Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Encryption "native encryption" feature Status: Stale No recent activity for issue Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants