Hello,

On Mon, Jan 31, 2022 at 05:27:56PM +0000, Gareth Evans wrote:
> > On 31 Jan 2022, at 14:41, Martin McCormick <marti...@suddenlink.net> wrote:
> > 
> > #I should be telling resize2fs to squeeze everything in to a 7GB
> > #partition.
> >   sudo resize2fs /dev/loop0p2 +7G
> > [...]
> > then I delete P2 and then add a
> > new partition which defaults to 2.
> 
> This seems to replace the partition containing the filesystem you've just 
> resized with an empty one - doesn't it?

When you change a partition table it doesn't do anything to the
data on the disk, only the partition table. Every partition resizing
operation that only has to move the end position essentially does it
this way.

(If you have to move the start then the data has to be moved first)

If you were using parted then you might type:

resizepart 2 7g

which looks less scary, but does exactly the same thing.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to