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

NAS-134309 / 25.10 / Make data partition slightly smaller than the disk #15825

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

themylogin
Copy link
Contributor

Reserve 2 GiB of disk space (but no more than 1%) to allow the data disk to be replaced with a slightly smaller one in the future.

I removed the usage of pyparted because it was creating partitions that were smaller than requested, and despite significant effort, I was unable to resolve the issue. We had agreed to remove this library if it continued to cause trouble, and that moment has now arrived.

@themylogin
Copy link
Contributor Author

themylogin commented Feb 23, 2025

@themylogin
Copy link
Contributor Author

time 8:00

@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Make data partition slightly smaller than the disk NAS-134309 / 25.10 / Make data partition slightly smaller than the disk Feb 23, 2025
@yocalebo
Copy link
Contributor

I'll review this in a bit but pyparted actually has a critical issue that I discovered yesterday in 6.12 kernel. It's using the optimal_io_size as the factor for the starting offset of the partitions. That's wrong and so we have a situation where drives that were partitioned with a starting offset of 1MiB, now have different start positions....on these SAS disks, it's now starting at 16.8MiB. I say all that to say that I agree we should remove this program. It's unpredictable and doing wrong things. However, I have been sitting on code for awhile where I used sgdisk source code as a reference to write a python equivalent that doesn't use subprocess. I'll send that to you because I think we should do it here. We're selling increasingly larger systems (many 100's of disks) and we're being pushed to make things efficient.

@themylogin
Copy link
Contributor Author

@yocalebo do you plan non-subprocess disk formatting for 25.04?

@yocalebo
Copy link
Contributor

@yocalebo do you plan non-subprocess disk formatting for 25.04?

No, probably not. Would rather do that for 25.10 only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants