Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #244878

Re: Resize2fs Questions

From Andy Smith <andy@strugglers.net>
Newsgroups linux.debian.user
Subject Re: Resize2fs Questions
Date 2022-01-31 18:40 +0100
Message-ID <DLIOJ-6GV-7@gated-at.bofh.it> (permalink)
References <DLGad-540-1@gated-at.bofh.it> <DLIF4-6DV-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Mon, Jan 31, 2022 at 05:27:56PM +0000, Gareth Evans wrote:
> > On 31 Jan 2022, at 14:41, Martin McCormick <martin.m@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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Resize2fs Questions "Martin McCormick" <martin.m@suddenlink.net> - 2022-01-31 15:50 +0100
  Re: Resize2fs Questions Andy Smith <andy@strugglers.net> - 2022-01-31 16:40 +0100
  Re: Resize2fs Questions Gareth Evans <donotspam@fastmail.fm> - 2022-01-31 18:30 +0100
    Re: Resize2fs Questions Andy Smith <andy@strugglers.net> - 2022-01-31 18:40 +0100
      Re: Resize2fs Questions Gareth Evans <donotspam@fastmail.fm> - 2022-01-31 19:00 +0100
        Re: Resize2fs Questions Gareth Evans <donotspam@fastmail.fm> - 2022-01-31 19:10 +0100
          Re: Resize2fs Questions Gareth Evans <donotspam@fastmail.fm> - 2022-01-31 19:20 +0100
        Re: Resize2fs Questions Andy Smith <andy@strugglers.net> - 2022-02-01 00:40 +0100
          Re: Resize2fs Questions Stefan Monnier <monnier@iro.umontreal.ca> - 2022-02-01 03:00 +0100

csiph-web