From: "Stephen C. Tweedie" <sct@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Stephen Tweedie <sct@redhat.com>
Subject: Re: [linux-lvm] LVM onFly features
Date: Tue, 13 Dec 2005 11:56:10 -0500 [thread overview]
Message-ID: <1134492971.3991.9.camel@orbit.scot.redhat.com> (raw)
In-Reply-To: <A8AB02E392149E55AC45BF7A@dhcp-2-206.wgops.com>
Hi,
On Sat, 2005-12-10 at 13:14 -0700, Michael Loftis wrote:
> ReiserFS has hot expansion capabilities, but no (yet?) hot shrinking
> capabilities. One of the reasons it has these features and ext2/3 does not
> is because ext2/3 are very old filesystems designed on a different
> mentality of a static filesystem. On-line expansion of ext2 based
> filesystems is an extremely complicated venture, it might honestly even be
> impossible.
I guess that the code that went into fs/ext3/resize.c last year must
have been in my imagination, then. :-) And the
# lvextend -L+20g /dev/ext/backup
# ext2online /disk/backup
that I did 2 days ago to add another 20G to the mounted backup volume
must have been a dream... (I've used these same commands while the
backup was actively in progress in the past, too.)
Seriously, it's really no big deal to grow ext2/3 filesystems, with one
exception --- there's a single data structure, the group descriptor
table, that we're saddled with for backwards compatibility purposes
which needs to grow in-place when we add new block groups to the fs.
Andreas Dilger did work a while ago to add pre-allocation for that
space; mkfs with "-O resize_inode" and a new hidden inode is created
with space reserved for the group descriptor table to grow into. After
that, online resize has no trouble with ext2 on-disk format issues.
> ReiserFS has the advantage here because it doesn't necessarily pre-write
> out a lot of filesystem meta-information (superblocks, inodes, bitmaps,
> etc)
ext2/3 writes that metadata out in discrete block groups, so adding new
block groups to grow a fs is really very simple.
> Ext2 resizing requires actually rewriting a lot
> of filesystem metadata.
No; it only requires adding new metadata. Even that troublesome group
descriptor table only needs new entries added, not existing ones
modified. And once all the new metadata is written, a single write to
the superblock's number-of-block-groups field enables all the new space
atomically.
--Stephen
prev parent reply other threads:[~2005-12-13 16:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-10 19:38 [linux-lvm] LVM onFly features Mag Gam
2005-12-10 19:48 ` Marc-Jano Knopp
2005-12-10 20:03 ` Michael Loftis
2005-12-10 20:06 ` Marc-Jano Knopp
2005-12-10 20:14 ` Michael Loftis
2005-12-10 20:22 ` Marc-Jano Knopp
2005-12-10 22:10 ` Michael Loftis
2005-12-10 22:31 ` Marc-Jano Knopp
2005-12-10 22:44 ` Michael Loftis
2005-12-10 22:51 ` Michael Loftis
2005-12-10 23:03 ` Marc-Jano Knopp
2005-12-11 3:38 ` Mag Gam
2005-12-11 7:43 ` Michael Loftis
2005-12-11 14:08 ` Fredrik Tolf
2005-12-11 15:32 ` Mag Gam
2005-12-15 20:44 ` David Johnston
2005-12-18 0:27 ` Mag Gam
2005-12-11 22:15 ` Nathan Scott
2005-12-12 1:14 ` Michael Loftis
2005-12-12 2:28 ` Nathan Scott
2005-12-10 20:47 ` Graham Wood
2005-12-13 16:56 ` Stephen C. Tweedie [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=1134492971.3991.9.camel@orbit.scot.redhat.com \
--to=sct@redhat.com \
--cc=linux-lvm@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).