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 send without -R on bastille create #845

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vegged
Copy link

@vegged vegged commented Feb 14, 2025

Since there are no descendent file systems in the bastille create scenario, stripping zfs send of the --replicate option enables support for encrypted datasets. Fixes #839.

…e create scenario, enabling compatibility with encrypted datasets
@tschettervictor
Copy link
Collaborator

What about cloning?
And renaming?

@vegged
Copy link
Author

vegged commented Feb 14, 2025

What about cloning?

Cloning requires further brainstorming. Getting thick jails to work is a first step, and an opportunity to get confirmation on the use of -R with zfs send: if it serves no other purpose than sending a snapshot -r comprised of several datasets in one go, I suppose we could check source datasets for zfs native encryption properties before snapshotting, and implement their replication individually? I'm happy to try once/if the loss of -R is cleared.

And renaming?

No issue there AFAIK! Renaming works out of the box on encrypted datasets in my experience.

Happy to get feedback from you seasoned Bastille folks & run tests to further my understanding!

@tschettervictor
Copy link
Collaborator

There shouldn't be an issue removing the -R I think. It just replicates the release to the jail base, so there are no child datasets when creating.

Cloning will need some more work to achieve this goal.

@yaazkal @bmac2

@vegged
Copy link
Author

vegged commented Feb 19, 2025

Unrelated to encryption, second commit fixes #858.

@tschettervictor
Copy link
Collaborator

I have a suggestion. What if we check the property of the Bastille dataset, and if encryption is enabled, we send with -w but if not then we send as we currently do.

…ince it breaks several bastille functions"

This reverts commit 1f1cf72. Upstream
implemented a more direct fix.
@tschettervictor
Copy link
Collaborator

@vegged Here is what I mean.

We can "zfs get -H -o encryption pool/dataset" to return "on" for encryption enabled, and "off" for disabled. We will then use the output to build an "OPTIONS" variable that will add "-w" if encryption is enabled.

Would this work for you?
Does sending with -w resolve the issue?

@bmac2
Copy link
Collaborator

bmac2 commented Feb 23, 2025

@vegged fix the conflicts in your branch so I can merge this one

@bmac2
Copy link
Collaborator

bmac2 commented Feb 23, 2025

this PR addresses #839

@tschettervictor
Copy link
Collaborator

Let's hang on with merging.

@vegged did you read my suggestion?

@vegged
Copy link
Author

vegged commented Feb 24, 2025

I have a suggestion. What if we check the property of the Bastille dataset, and if encryption is enabled, we send with -w but if not then we send as we currently do.

Unfortunately, sending with -w (or --raw) is not a valid workaround, as I mentioned in this comment, due to a long lasting zfs limitation.

Since there are no child datasets in the thick jail scenario, is there any drawback to removing -R altogether, @tschettervictor?

@tschettervictor
Copy link
Collaborator

None that I can see.

But if there was a reason it is included, we should do what I suggested, but except for -w, we just send without -R on encrypted datasets.

@bmac2
Copy link
Collaborator

bmac2 commented Feb 24, 2025

I think victor;s suggestion of checking if the db is encrypted and remove the -R so we don't accidentally break anything

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

Successfully merging this pull request may close these issues.

[BUG] Creating a thick jail on a ZFS encrypted dataset fails
3 participants