Re: Making a partition larger without affecting my OS.
Nate Eldredge <[email protected]>
| Newsgroups | gmane.linux.gentoo.user |
|---|---|
| Message-ID | <010d019cecf720bb-c7bccfdd-8ce8-44ba-bbef-1dec02bc329b-000000@ca-central-1.amazonses.com> |
> On Mar 14, 2026, at 08:06, Dale <[email protected]> wrote: > > This is the current layout. > > > > Part. # Size Partition Type Partition Name > ---------------------------------------------------------------- > 1007.0 KiB free space > 1 2.0 GiB EFI system partition efi-part > 2 10.0 GiB Linux filesystem boot > 3 400.0 GiB Linux filesystem root-part > 4 180.0 GiB Linux filesystem var-part > 5 150.0 GiB Linux filesystem build-part > 189.5 GiB free space > > > > I think I can just delete the partition for build-part and then add a new partition that is larger, then do a file system and rsync the files back over. My question, thing I want to be sure of, if I delete that and re-add it, that will not affect my OS at all? Right? I may do a back up first but still, I'd like to be sure this is at least doable and not risky. I'll be using cgdisk and the usual file system tools for this. I'm assuming I'll have to recreate the file system and such. That should certainly work. Definitely back up the entire disk, though, as it is too easy to make a typo and erase the wrong partition. If your system has a GUI (or can forward over ssh to one that does), you might consider trying gparted for this. It handles both the partitioning and filesystem tools, and lets you queue up operations so you can see what the overall effect would be. I do prefer command-line tools for most things, but gparted is so handy that I would make an exception for it. (Not to be confused with parted, which isn't just a text-based version of the same; it's a totally different tool that only does partitioning and has much less functionality in general.) If it's just for builds, there's probably a minimal amount of data on build-part that needs to be kept, so rsync'ing elsewhere won't take an excessive amount of time or storage space. But you might be interested to know that, depending on the circumstances, there may be ways to grow the filesystem in-place, without having to recreate it and restore all the data (if all goes well). In some cases you may not even have to unmount it. If you want to know more, just ask. But please specify what filesystem type is on build-part (ext4, btrfs, zfs, ...?).