-
Notifications
You must be signed in to change notification settings - Fork 574
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
change default root partition size #2415
change default root partition size #2415
Conversation
00b3973
to
bd36339
Compare
This only changes the example code not the actual core logic. |
My bad it was late, I updated the PR, it should be better. |
This code is quite confusing and incomplete. It only handles the single partitioning layout suggestion not the multi disk layout suggestion. From this code what I understand you're trying to
I would recommend to normalize the received size first
and then use that as the value to be interpreted for deciding how to partition |
You're right it was confusing, it's much better with the convert function first, I updated the code. For the multidisk behaviour, I think it's not required because the root will take the entire disk if I understood correctly. For the singledisk, the idea was to put a minimum of 20GiB up to 50GiB depending on the disk size, from what I read on the issue discussion. Also I was waiting for the workflow to generate the ISO but it seems broken at the moment so I didn't tested it yet but I'll do it in local. Tell me what you think! |
8910e73
to
4ed371b
Compare
The build is simply blocked from automatically running on first-time contributors, but I've pushed it through so it's building right now :) |
The example code still contains the first version and should be updated as well. I think for multi disk support we're also using 20GB https://github.com/archlinux/archinstall/blob/master/archinstall%2Flib%2Finteractions%2Fdisk_conf.py#L359 Also, if the total size is 200 < x < 500 then you're assigning the entire total size? |
Oh makes sense! I tested yesterday with a locally generated ISO in VMs:
I'll test more with the generated ISO to make sure there isn't issue between local/deployed. |
I did a revert for the example code, it should be good now. If the size is between 200GB and 500 I am assigning 10% of this size for the root partition, I thought reading the discussions on the issue that it would be a good start, what do you think? As for the multi disk support I missed it indeed! I saw there are these 2 links in the comments in the code, I'll start there: |
So I looked a bit into it, from what I understood from the multidisk layout:
What I would suggest to improve a bit the situation regarding the size issue:
I also looked into the subvolumes with BTRFS in multidisks layout (which doesn't seem to be handled here if I am not mistaken), and would propose something like this (taken from reddit submission):
I would also suggest to handle the part with subvolumes and multidisks on another PR though because I'm not yet familiar with the codebase and would require a bit more work. |
I agree, and the root size has been discussed as a wanted change before. And I agree that splitting up the changes regarding multidisk btrfs into a separate PR is ideal :) |
That sounds good for now |
I actually made a mistake reading the code, sorry about that: the hardcoded 20GiB is only used to identify the disk for the /root part. Just to make sure: do we want to change this behaviour in multidisk layout? If we want to keep using the entire disk for root in multidisk layout: I revert the last commit. Here are the tests I did:
Only one issue with the multi disk layout where the root isn't on the first disk, I guess it's an issue with the VM config? Not sure about that. |
Workflow isn't working on mkarchiso: |
Just to provide more information for the issue, it's been a problem for about 2 weeks. I have a similar workflow that I use myself and I noticed it was also failing here with the same error message, hence I opened an issue. |
root_start = boot_partition.start + boot_partition.length | ||
root_length = root_device.device_info.total_size - root_start | ||
available_space = root_device.device_info.total_size - root_start | ||
root_length = process_root_partition_size( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused by this logic, above we're saying that the minimum root size needs to be 20GB and then we look for a device that comes closest to that number. Now here we'll determine the actual root size.
So lets say there's devices with 25GB, 30GB, 50GB. Then it'll pick the 25GB one, and based on the root size logic it'll get set to 20GB. Wouldn't it make more sense to actually utilize the entire disk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yes I see your point, for a 25GB it feels a bit ridiculous to leave 5GB empty.
My idea was that for a 200GB disk, we'll take 20GB and leave the rest unused, so that you can resize it however you want later on.
In the end it's a matter of choice, what do you think should be the best strategy? Do you have a high level algorithm in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we just leave the multi disk suggestion as is for now and update only the single one, I think that one is the one causing the most headaches for people at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's probably easier that way.
I'll reset a few commit, test again to make sure it's working and ping you here when it's done!
674667e
to
667499a
Compare
7722bef
to
e77959c
Compare
I cleaned the commit history to remove the mess, removed the multi disk suggestion part and tested again with single layout (100GB / 250GB / 600GB) disks: suggestions are correct (20GB / 25GB / 50GB) and the OS is working after reboot. Tell me if anything else is required! |
That looks good now, thanks for this change it has been anticipated! |
Hiii Kevin I saw you mentioned on reboot I have actually been having this problem for a while now and resulted to deleting multifiles without success of update how do I implement this solution. Is it only with a new archinstall or I can do it manually. |
Hi, If you are asking if you can update an already installed archlinux with archinstall to do the root partition size update then the answer is no. It's only for new install. To update yours you would need to look for "resize linux root partition" and backup your data before doing so in case something goes wrong. If you are asking why you don't see the root partition update by using archinstall, I think it's because this merge isn't yet bundled into a release. You can either wait for that or update the file yourself before installing arch with archinstall. The change is on the tab "File changed" of this PR. Kevin |
PR Description:
Increase the default root partition size following these rules:
10% of the total disk size, from 20GiB up to 50GiB maximum
Tests and Checks