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.
|