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

Encryption issues with NVME (to quick to encrypt) #67

Closed
Torxed opened this issue Nov 10, 2020 · 2 comments
Closed

Encryption issues with NVME (to quick to encrypt) #67

Torxed opened this issue Nov 10, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Torxed
Copy link
Member

Torxed commented Nov 10, 2020

Some NVME drives are to quick to respond to parted and mkfs, which makes them unavailable when cryptsetup execution attempts to encrypt the drive. The underlying issue is that the disk haven't entered "ready state" in kernel in between sys calls.

A simple time.sleep(5) at luks() proved to solve the issue. A better approach would be to assert and evaluate the state of the drive and release a lock whenever the devices becomes ready.

Temporary solution: Re-run the installation as it's more of a race condition or skip encryption and manually encrypt.

Correction: This has to do with the formatting, not encryption. The disk formatting is to quick on some drives. Fix is on it's way although this happens rarely on most systems.

@Torxed Torxed added the bug Something isn't working label Nov 10, 2020
@Torxed Torxed pinned this issue Nov 10, 2020
Torxed added a commit that referenced this issue Dec 7, 2020
Torxed added a commit that referenced this issue Dec 7, 2020
It's a 0.025 second sleep waiting for the partition to pop up in partprobe.

Also added a grace period of 10 seconds for that to occur. Otherwise we'll throw an exception since something most likely broke down. (Note here: Older drives, say 6200 RPM spin disks, might take a few seconds to come online. Have no such hardware to test with, but worth testing)
@Torxed
Copy link
Member Author

Torxed commented Dec 7, 2020

Fixed in commit e637852: (next release candidate will contain this fix)

It's a 0.025 second sleep waiting for the partition to pop up in partprobe after add_partition() is called.

Also added a grace period of 10 seconds to that while loop. We'll throw an exception if the 10 second mark is triggered since something most likely broke down. (Note here: Older drives, say 6200 RPM spin disks, might take a few seconds to come online. Have no such hardware to test with, but worth testing)

@Torxed Torxed closed this as completed Dec 7, 2020
@Torxed
Copy link
Member Author

Torxed commented Jan 19, 2021

Released in v2.1.0 :)

@Torxed Torxed unpinned this issue Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant