How to resize existing partition?

I know this shouldn’t be difficult.

I have a HDD that was partitioned into two partitions; one as /home, the other for Windows backup. I wanted to extend by /home partition to the full HDD size, so I deleted the Windows backup partition. All good so far. Now I can’t figure out how to make my /home partition the full HDD size. If I try to resize, it does not see the additional free space. I can add a new partition using the newly available space, but that doesn’t help. Clearly, I am trying to increase the size of my existing partition without wiping all my data. Is this even possible? I have memories of extending partitions in Windows years ago, so I figure I can do it in Linux.

I guess I’m missing something, but I cant’t figure it out.

All guidance gratefully accepted.

Peter

The sytem does not extend backwards so if windows was the first partition, you’re stuck. Was it the first partition?

If yes you might be able to reset it and copy your /home to the first partition if it’s big enough. You would then need to reset it in /etc/fstab and probably in Yast>Security and Users. If that works you can then delete the other partition and extend.

If you want to try that make sure you back up first.

Edit: As long as you don’t scrap the existing /home partiton until you’re sure everything is OK, you should be safe.

First and for all. please do not tell a srory alone, but show!

fdisk -l

And yes, you can not extend “backwards”. And most important message from @peteh100 is: make an extra backup.

BTW, when you try to follow up @peteh’s advice, do not forget that when manipulating the /home file system and/or it’s partition, it must be unmounted. Thus you can not use any of your users, that have their home directory in /home, while loged in into the GUI.

I’ve tried several times to fill a gap in partitions and have only ever been able to do it from th partition before the gap. I’d be interested to know how it’s done.
Of course you’re right about /home manipulation and I should hav theought of it. I always have at least 2 systmes and manipulate from one of the others.

Move it then expand it

Must be done when partition is not in use ie not mounted

Can’t extend “backwards?”
AFAIK it’s always possible to extend into adjacent free space, forwards or backwards.
If that’s possible, then the next issue is whether you’re trying to preserve data instead of restoring from backup or something else, in which case you probably do have to do a “move” since the start of the partition and file system is changed.

In any case,
Although it’s probably possible to do this because it’s not the root partition,
I’d still use Gparted Live for <all> partition modifications because it supports every scenario I can think of.

https://gparted.org/livecd.php

TSU

While I doubt many file systems can be extended “backwards”. I can imagine that a high level tool (you name Gparted, which I never used) is able to do the steps:

  • create a new partition covering the whole disk;
  • move the file system from it’s place (now somewhere in the middle of the new partition, but the tool will have noted where that is) to the beginning of the new partition; note that for this it is not needed that the former first partition is larger then the former second partition, copying must be done begin to end (that is what mostly happens) and when it is smaller, the end of the newly placed file system will overwrite the beginning of the old place;
  • extend the file system on it’s new place to the end of the partition.

Of course, to the user of the high level tool this would look as extending the file system “backwards”.

That said, we all are assuming a lot here because of the lack of information (the fdisk listing). It seems that the OP has gone sleeping soon after starting his thread, first answers/suggestions/requests for info were there within 1 - 1½ hour.

Yes, being the other side of the world, I went to bed. Thanks for the abundant and informative replies.

The Linux partition is at the end of the disk. I actually have another option as I’ve just popped in a new HDD. I’ll copy \home to that disk, set it as home then change the “old” drive. I’ll use GParted for this.

Thanks again.

For what you’re describing, IMO it’s simple to use YaST partitioner for that.

  • Create new partition on your new drive
  • Format the partition
  • Find the mount for your current /home and point it instead to your new partition
  • Copy all the data from your old partition to your new partition
  • reboot.

TSU

That is again a nice story (apart from the fact that you have thick fingers, typing \ instead of /), but we asked for real information. At least:

fdisk -l

And please also be aware that when you change things (as it seems to be the case) you have to inform us anew about the real situation. People here do not like to shoot at a fast moving duck.

I certainly do not claim to be a brilliant typist, but that was deliberate. It’s clearly a Windows hangup.

Again, I appreciate the offered assistance and I’ll remember to supply as much information as required. Also bear in mind, I had no idea you’d want to see the fdisk output. until it was requested, I was after what I thought was general advice. I’m good with PCs but still in the infancy of learning Linux.

Anyway, it’s all good now, I have my HDD fully allocated to Linux.

Regards