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

Raw send/recv of encrypted dataset hangs trying to mount #7142

Closed
aarononeal opened this issue Feb 8, 2018 · 2 comments
Closed

Raw send/recv of encrypted dataset hangs trying to mount #7142

aarononeal opened this issue Feb 8, 2018 · 2 comments

Comments

@aarononeal
Copy link

aarononeal commented Feb 8, 2018

System information

Type Version/Name
Distribution Name LinuxMint
Distribution Version 18.3
Linux Kernel 4.13.0-32-generic #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018
Architecture x86_64
ZFS Version 0.7.0-283_g6d82b79
SPL Version 0.7.0-24_g23602fd

Describe the problem you're observing

Receive hangs attempting to mount newly created dataset from raw send. Mounting is the default behavior after receiving a new dataset. Reboot is required as kill -9 fails.

Describe how to reproduce the problem

# Create a test pool
$ truncate -s 1G block
$ zpool create testpool $(pwd)/block

# Turn on encryption
$ zpool set feature@encryption=enabled testpool

# Create encrypted dataset
$ zfs create \
    -o encryption=on \
    -o keyformat=passphrase \
    testpool/enc1

# Snapshot
$ zfs snapshot testpool/enc1@snap

# Send encrypted dataset
$ zfs send -c -w testpool/enc1@snap | zfs recv testpool/bak

Observe send / receive completes then hangs on mount. Using -u on receive avoids the mount and hang.

Include any warning/errors/backtraces from the system logs

$ ps -aux | grep zfs
root     18171  0.0  0.0  36556  4028 pts/1    D    19:11   0:00 /sbin/mount.zfs testpool/bak /testpool/bak -o rw,strictatime,zfsutil

@tcaputi

@tcaputi
Copy link
Contributor

tcaputi commented Feb 8, 2018

@aarononeal I'm sorry, but I'm a bit confused at a few things in your environment:

  1. What commit are you actually running? I cant find a commit with the hash 6d82b79. There have been several updates recently made to encryption, so you might want to try grabbing the latest code from master.
  2. Raw sends should not attempt to mount the filesystem after the receive. Part of the purpose of raw sends is that the user's keys are not sent with the dataset, so the receiving side may be a completely untrusted machine.
  3. Can you give me more information about the hang? Usually when something like this happens you will see something in dmesg related to the event.

@aarononeal
Copy link
Author

@tcaputi I cloned the repo just yesterday but did again just now and it does appear to be working correctly after rebuilding. Sorry for the noise.

zfs: 0.7.0-286_g6f259b5
spl: 0.7.0-26_g48ef8ba

Really looking forward to using raw sends for archiving. Thank you so much for adding these encryption features!

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