Discussion:
Resizing ext3 Inode Size from 128 to 256
(too old to reply)
Sheridan Hutchinson
2008-02-04 17:30:19 UTC
Permalink
Hi,

I've got two machines currently with inode sizes of 128. In order bring
these machines ext3 partitions in line with ext4's projected defaults I
would like to change the inode sizes from 128 to 256.

After persistent googling I could not find any reference to any solution
for this. I'm starting to wonder if there is actually a way to change
this or whether I'm essentially stuck with it.

Any pointers would be appreciated.

- --
Regards,
Sheridan Hutchinson
***@Shezza.org
Will Kemp
2008-02-04 22:25:46 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've got two machines currently with inode sizes of 128. In order bring
these machines ext3 partitions in line with ext4's projected defaults I
would like to change the inode sizes from 128 to 256.
After persistent googling I could not find any reference to any solution
for this. I'm starting to wonder if there is actually a way to change
this or whether I'm essentially stuck with it.
You're stuck with it.

From the mkfs.ext2 (8) man page (note particularly the last sentence) :

The larger the inode-size the more space the inode table will
consume, and this reduces the usable space in the filesystem and
can also negatively impact performance. Using the default value
is always safe, though it may be desirable to use 256-byte
inodes if full backward compatibility is not a concern.
Extended attributes stored in large inodes are not visible with
older kernels, and such filesystems will not be mountable with
2.4 kernels at all. It is not possible to change this value
after the filesystem is created.
Sheridan Hutchinson
2008-02-05 00:18:07 UTC
Permalink
It is not possible to change this value after the filesystem is
created.
Thanks for the information; the situation is not looking good.

I think what I'll do is do a clone backup and experiment with creating
new partitions and copying everything across.

Seems as though the only way around this is to create brand new partitions.

We'll see what happens once ext4 has been out for a while, a tool may
very well show up to facilitate this.

- --
Regards,
Sheridan Hutchinson
***@Shezza.org
Will Kemp
2008-02-05 08:23:23 UTC
Permalink
Post by Sheridan Hutchinson
Seems as though the only way around this is to create brand new partitions.
You don't need to create new partitions - only new filesystems on those
partitions.
Post by Sheridan Hutchinson
We'll see what happens once ext4 has been out for a while, a tool may
very well show up to facilitate this.
Yeah, it may. In a way, i'm surprised there isn't one already. But maybe
that shows that it really is impossible. I've got no idea about the
intricate technicalities of the ext2 filesystem, but i can imagine it
would be a very complicated process to convert from one size of inode to
another.

However, i would have imagined it wouldn't be that much more complex than
moving the filesystem - in the way that parted does, for example.

Out of interest, what's so good about ext4? I don't know anything about
it.
Sheridan Hutchinson
2008-02-05 08:53:34 UTC
Permalink
Post by Will Kemp
Out of interest, what's so good about ext4? I don't know anything
about it.
Wikipedia gives a nice little summary http://en.wikipedia.org/wiki/Ext4
and shows that most of the improvements are centred towards increasing
performance and reducing fragmentation.

Frankly, the casual user would be very unlikely to notice any change or
have reason to know the details; this looks more like an evolution of
ext4 than a revolution, and in my opinion that's quite a welcome thing.

- --
Regards,
Sheridan Hutchinson
***@Shezza.org
Nix
2008-02-07 01:07:03 UTC
Permalink
Post by Will Kemp
Yeah, it may. In a way, i'm surprised there isn't one already. But maybe
that shows that it really is impossible. I've got no idea about the
intricate technicalities of the ext2 filesystem, but i can imagine it
would be a very complicated process to convert from one size of inode to
another.
Especially if the filesystem was quite full, it could be *really*
annoying. You'd have to expand the inode table in every block group,
moving any data in the way out of the way first, and then shifting and
expanding the inodes in that group.

It's certainly not impossible, but it's sufficiently irritating that
nobody's done it (especially given that mkfs is rarely impossible).

Myself I'm looking forward to btrfs getting stabler :) it's extremely
impressive that it's flexible enough to convert on the fly from ext3
*nondestructively* (i.e. none of the metadata is damaged, although a bit
has to be moved; you can revert again in about five seconds).

And cheap writable snapshots! :)
--
`The rest is a tale of post and counter-post.' --- Ian Rawlings
describes USENET
Sheridan Hutchinson
2008-02-12 16:52:41 UTC
Permalink
Post by Sheridan Hutchinson
I've got two machines currently with inode sizes of 128. In order
bring these machines ext3 partitions in line with ext4's projected
defaults I would like to change the inode sizes from 128 to 256.
I have good news! It seems that the ext4 devs have considered this:
https://ols2006.108.redhat.com/2007/Reprints/mathur-Reprint.pdf

With reference to section 6.1, it states that a tool will be made
available to migrate existing ext3 filesystems to ext4, and at the same
time it will enlarge the inode size to 256 bytes.

It will be somewhat to my chargrin if the devs don't deliver however ;)

- --
Regards,
Sheridan Hutchinson
***@Shezza.org

Loading...