Score:0

Resize linux partition

bl flag

I need to resize /dev/sda1 partition. When I add free space in proxmox, I cannot resize the partition.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            475M     0  475M   0% /dev
tmpfs           100M   12M   89M  12% /run
/dev/sda1       6.9G  4.8G  1.8G  73% /
tmpfs           497M     0  497M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           497M     0  497M   0% /sys/fs/cgroup
/dev/sda6        13G  2.0G  9.5G  18% /home
tmpfs           100M     0  100M   0% /run/user/316800286

growpart /dev/sda 1 NOCHANGE: partition 1 could only be grown by 2046 [fudge=2048]

growpart /dev/sda 1 NOCHANGE: partition 1 could only be grown by 2046 [fudge=2048]

I tried do it via LiveCD but I cannot resize /dev/sda1.

GParted screenshot

oldfred avatar
cn flag
You can only use live installer, and unallocated must be next to partition you want to expand. Also better to use gpt, so you do not have complication of primary, extended & logical partitions. Also with that small of a drive, better to just have / (root) with /home as folder in /. Then less issue of one or the other using space. Also Ubuntu now defaults to swap file.
Score:2
cn flag
raj

There is no unused space right after the partition sda1, so you cannot expand it.

To expand, you need first to move partitions sda6 and sda5 towards the end of the disk, then change the start of extended partition sda2, so you get the free space directly after sda1 (between sda1 and sda2).

Only then you can expand sda1.

But as you gain only 2 GB, I don't think it's worth doing.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.