LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with partitioning - shrink an Extended Partition (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-partitioning-shrink-an-extended-partition-4175704460/)

Milo4t 12-03-2021 10:55 PM

Help with partitioning - shrink an Extended Partition
 
1 Attachment(s)
Hello all. Just wondering if the assembled wisdom could assist me with this problem.

I have previously mucked around (successfully) with re-sizing & moving partitions, but that was with primary partitions when there was spare space to do it - and not dealing with an Extended partition.

I have a drive containing several partitions, one being /var. /var is now full, I can't print or install updates. I could expand /var by 1.6Gb that is free to the right of it (not enough for what I want), but I want to double the size of /var but I am hampered by the fact that the partition to the right (see screen shot) is an Extended partition containing a Logical partition which takes up the rest of the room to the end of the drive.

My question is, to create the required space to expand /var, do I first have to shrink the Logical partition /dev/sdc5, then shrink and move the Extended partition (/dev/sdc4) to the right thus creating some spare space that I can expand /var into?

I found another problem on here similar to this from a few years ago, but the person had an extended partition containing swap in the middle of other primary partitions, so not quite the same.

I don't have any experience with re-sizing Extended partitions and I just don't want to be mucking around with this, not knowing and not being comfortable with what I'm doing, and completely mucking the drive up.

Any help greatly appreciated.

syg00 12-03-2021 11:16 PM

The extended is just a container - it's always the least of your worries. Just grab sda5 and drag it all the way to the right. Apply that. Then just drag the left boundary of the extended to free up as much space as you want. Can be done again (just the extended) anytime.

Easy.

yancek 12-04-2021 04:11 AM

GParted should be able to handle this without problem but first unmount the logical (sdc5) partition before trying to resize. This would need to be done from a system not in use so use a GParted live CD/USB or another live Linux system. THe /var directory often fills up with log files so you might also check that to see if you can free space. THe link below is to the GParted manual on resizing.

https://gparted.org/display-doc.php%...tition-actions

Milo4t 12-06-2021 08:07 PM

Thanks
 
Thanks for the help, greatly appreciated. I finally got it sorted yesterday, much easier than I thought.


All times are GMT -5. The time now is 10:02 AM.