[Top] [All Lists]

Re: Xfs partition "move" ?

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Xfs partition "move" ?
From: Theo Van Dinter <felicity@xxxxxxxxx>
Date: Thu, 20 Dec 2001 15:08:48 -0500
In-reply-to: <1008877552.19431.7.camel@jen.americas.sgi.com>; from lord@sgi.com on Thu, Dec 20, 2001 at 01:45:52PM -0600
References: <200112201855.fBKIt4X16354@oss.sgi.com> <1008873166.30178.0.camel@stout.americas.sgi.com> <3C223EBA.92C54144@idcomm.com> <1008877552.19431.7.camel@jen.americas.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Thu, Dec 20, 2001 at 01:45:52PM -0600, Steve Lord wrote:
> Trust me, you want a memmove type operation which works on disks here.

I was thinking of doing something like this on my home box.  There's one
partition which now has free space both in front and behind it that I'd like
to add to the used partition.  The plan goes something like this:

- make a new partition to encompass the filesystem.
- figure out the maximum "transfer block" size by figuring out the new
  space at the front of the filesystem.
- do iterations of dd of the appropriate safe size to copy parts of the
  filesystem from the old partition to the new.  copy from the front of the
  filesystem to the end.
- when finished, remove the old partition.  to make it easier, you could even
  renumber the new partition to the old partition number so you don't have to
  go changing fstabs and such.
- mount the filesystem and do a xfs_grow.

I never got around to actually coding something for it though.  Ideally, the
code would notice if you're moving forward or backward on the disk and either
work front to back or front to back.

Randomly Generated Tagline:
I'm not a computer nerd; merely a techno-weenie.

<Prev in Thread] Current Thread [Next in Thread>