public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Håkon Alstadheim" <hakon@garbo.alstadheim.priv.no>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: How to move ext4 partition
Date: Sat, 23 Sep 2023 14:16:46 +0200	[thread overview]
Message-ID: <bc05fca4-3ee1-c031-b582-df54e8925bd6@garbo.alstadheim.priv.no> (raw)
In-Reply-To: <a7310846-5ef5-253e-602e-4ba721516927@youngman.org.uk>


Den 22.09.2023 08:48, skrev Wols Lists:
> On 20/09/2023 23:39, Grant Edwards wrote:
>> Assuming GParted is smart enough to do overlapping moves, is it smart
>> enough to only copy filesystem data and not copy "empty" sectors?
>> According to various forum posts, it is not: moving a partion copies
>> every sector. [That's certainly the obvious, safe thing to do.]
>
> Seeing as it knows nothing about filesystems, and everything about 
> partitions, it will treat the partition as an opaque blob and move it 
> as a single object ...
>>
>> The partition in question is 200GB, but only 7GB is used, so I think
>> backup/restore is the way to go...
>
> You would think so :-)
>
> I use ext4, and make heavy use of hard links. Last time I tried a 
> straight copy (not backup/restore) I think the copied partition would 
> have been three times the size of the original - that is if it hadn't 
> run out of space first :-)
>
Just for completeness, you should check out the e2image command, though 
NOT for direct in-place overlapping move. Something like "e2image -ra 
$sourcevol $targetvol" has worked very well for me. That is obviously 
NOT for overlapping move, but for a backup it is quite fast. If you are 
moving to a bigger volume, I'd do resize as a separate step after the move.



      reply	other threads:[~2023-09-23 12:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 20:24 [gentoo-user] How to move ext4 partition Grant Edwards
2023-09-20 21:16 ` Neil Bothwick
2023-09-20 21:28   ` [gentoo-user] " Grant Edwards
2023-09-20 21:57     ` Victor Ivanov
2023-09-20 22:12       ` Frank Steinmetzger
2023-09-20 23:03         ` Grant Edwards
2023-09-21  9:20         ` Victor Ivanov
2023-09-20 22:58       ` Grant Edwards
2023-09-21  9:32         ` Victor Ivanov
2023-09-21 20:23           ` Grant Edwards
2023-09-21 21:39             ` Jack
2023-09-21 22:17               ` Grant Edwards
2023-09-20 23:03     ` Neil Bothwick
2023-09-20 21:37   ` [gentoo-user] " Wol
2023-09-20 22:39     ` [gentoo-user] " Grant Edwards
2023-09-22  6:48       ` Wols Lists
2023-09-23 12:16         ` Håkon Alstadheim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc05fca4-3ee1-c031-b582-df54e8925bd6@garbo.alstadheim.priv.no \
    --to=hakon@garbo.alstadheim.priv.no \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox