[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing ext3

From: Greg Roelofs
Subject: Re: Resizing ext3
Date: Sun, 15 Jun 2003 20:10:24 -0700

Andrew Clausen wrote:

> On Sun, Jun 15, 2003 at 06:29:19PM -0700, Greg Roelofs wrote:
>> Andrew Clausen wrote:
>> > On Wed, Jun 11, 2003 at 02:44:29PM -0700, Anand Panangadan wrote:
>> >
>> >> Can parted resize ext3 partitions (assuming that I am
>> >> not changing the START position)? When I try to do
>> >> this on an unmounted ext3 partition on Redhat 9
>> >> (parted 1.6.3), I get "No implementation: this ext2
>> >> filesystem has a rather strange layout!". But the GNU
>> >> parted webpage indicates that ext3 resizing is
>> >> possible.
>> > This is not an ext3-related problem.  It's probably due to some
>> > raid stride option, which Parted can't cope with.  See the
>> > mke2fs manpage... look for the -R option.
>> On the contrary, it _is_ an ext3-related problem.

> I define ext3 as "ext2's journalling feature".  I think this is the
> consensus definition.

I think you're saying that it's not _specific_ to ext3?  You may
very well be correct about that.

> Can Parted resize vanilla ext2 file systems created with e2fsprogs
> nowadays?  (I haven't tried it!  Not enough time for a while now). 

I don't recall whether I ended up formatting the hda5 in my example
with e2fsprogs 1.32 (Slackware) or 1.27 (Parted floppy), but judging
by the lack of any "reboot" comments in my notebook, it was probably
the latter.  (Given that I needed to use the floppy to run Parted
anyway, I probably did it all in one shot.)  So I'm afraid I don't
have any useful data on the ext2 question, nor any remaining space
on the laptop to run a test--after moving the newly formatted ext2
partition, I promptly resized it to fill all of the empty space.

> To be frank, I think Parted's ext2 code should be retired, and it should
> interface with e2fsprogs.  Just e2fsprogs isn't particularly easy to
> interface with.

Isn't there a libe2fsprogs or something these days?  I thought I recalled
seeing that somewhere in an embedded project we did last year.

>> Now, whether mke2fs -j internally triggers -R I leave to you folks;
>> the point is that -j == ext3, and there is no support in Parted 1.6.5
>> for doing much of anything with ext3 partitions created by newer versions
>> of e2fsprogs.  That includes a simple partition move into a larger and
>> contiguous empty space, something that should be trivial for Parted to
>> manage (given that it knows everything about the existing partition's
>> layout and size, and a byte-for-byte copy of the data into an identical
>> partition freshly created by itself as part of the "move" command should
>> not require any knowledge whatsoever of the internal filesystem).  The

> Well, a byte-for-byte copy would work, but it wouldn't utilize the
> entire partition.  (It wouldn't "notice" the extra space at the end)

What extra space?  If the original partition had extra space, presumably
the contents aren't used and therefore aren't of concern to the move/copy
operation.  (Or if they are used--in which case they're not really "extra"
--they'd simply get copied as part of the bytewise copy.)  On the target
side, I've assumed the "move" command would create precisely the same sized
partition since it knows (or should know) everything about the partition

Just because the unclaimed portion of the disk (i.e., target area for the
move) is larger than necessary doesn't mean Parted would try to expand the
partition being moved, does it?  That would just complicate things, I'd
think.  (Keep in mind that when I say "copy" I'm not referring to Parted's
literal "copy" command but rather the part of the "move" command's imple-
mentation that involves copying bytes.)

> I guess it could be useful to have such a feature.

Certainly if the alternative is not being able to do anything with such
partitions. ;-)  (But note that I already bit the bullet, made a tarball
backup, and wiped my existing partition in order to provide Parted with
a vanilla ext2 partition that it could move and resize.  Then I reformatted
it as ext3 with mke2fs 1.32 and restored the tarball.  Slightly painful but
effective, so I'm no longer in immediate need of either the move or resize
feature in Parted.)

As always, thanks for all of your work on this utility and your quick
responses to list queries!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]