From: Andreas Dilger <adilger@clusterfs.com>
To: Austin Gonyou <austin@digitalroadkill.net>
Cc: DervishD <raul@pleyades.net>,
Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Shrinking ext3 directories
Date: Tue, 18 Jun 2002 10:39:47 -0600 [thread overview]
Message-ID: <20020618163947.GO22427@clusterfs.com> (raw)
In-Reply-To: <1024416626.7681.39.camel@UberGeek>
On Jun 18, 2002 11:10 -0500, Austin Gonyou wrote:
> Use a volume manager?(LVM or EVMS maybe.) You can grow and shrink their
> volumes dynamically. EXT3 mus support ioctls for this, but if it does,
> cause I've seen it doesn with EXT2, then you're good.
Totally irrelevant.
> On Tue, 2002-06-18 at 11:08, DervishD wrote:
> > Hi all :))
> >
> > All of you know that if you create a lot of files or directories
> > within a directory on ext2/3 and after that you remove them, the
> > blocks aren't freed (this is the reason behind the lost+found block
> > preallocation). If you want to 'shrink' the directory now that it
> > doesn't contain a lot of leafs, the only solution I know is creating
> > a new directory, move the remaining leafs to it, remove the
> > 'big-unshrinken' directory and after that renaming the new directory:
> >
> > $ mkdir new-dir
> > $ mv bigone/* new-dir/
> > $ rmdir bigone
> > $ mv new-dir bigone
> > (Well, sort of)
> >
> > Any other way of doing the same without the mess?
Not right now. Truncating directories on a mounted filesystem is
probably going to be a big source of strange problems. In the end
it isn't really a problem for most people, because if your directory
has grown big once it is likely to grow big again.
With htree directories we will have to make this work at some point,
because you will be able to create huge directories and not being able
to free directory blocks would be a big pain. It isn't in the current
htree directory code yet, but it has been discussed a bit already.
Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/
next prev parent reply other threads:[~2002-06-18 16:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-18 16:08 Shrinking ext3 directories DervishD
2002-06-18 16:10 ` Austin Gonyou
2002-06-18 16:39 ` Andreas Dilger [this message]
2002-06-18 19:39 ` DervishD
2002-06-18 19:34 ` DervishD
2002-06-18 16:21 ` Padraig Brady
2002-06-18 16:54 ` David Lang
2002-06-18 19:35 ` DervishD
2002-06-18 21:50 ` Stephen C. Tweedie
2002-06-18 22:18 ` Alexander Viro
2002-06-19 9:38 ` DervishD
2002-06-19 10:37 ` Stephen C. Tweedie
2002-06-19 17:03 ` [Ext2-devel] " Christopher Li
2002-06-19 20:10 ` Stephen C. Tweedie
2002-06-19 20:34 ` Stephen C. Tweedie
2002-06-19 20:13 ` Andrew Morton
2002-06-19 22:43 ` Stephen C. Tweedie
2002-06-19 23:54 ` Stephen C. Tweedie
2002-06-21 3:28 ` Daniel Phillips
2002-06-21 7:03 ` Helge Hafting
2002-06-21 14:02 ` Daniel Phillips
2002-06-24 7:12 ` Helge Hafting
2002-06-21 16:23 ` Daniel Phillips
2002-06-21 15:06 ` Stephen C. Tweedie
2002-07-04 4:48 ` Daniel Phillips
2002-07-04 14:15 ` jlnance
2002-07-05 2:11 ` Daniel Phillips
2002-06-22 5:53 ` Andreas Dilger
2002-06-22 20:59 ` Daniel Phillips
2002-06-23 0:01 ` Daniel Phillips
2002-06-23 7:57 ` Daniel Phillips
2002-06-19 22:49 ` Daniel Phillips
2002-06-20 0:24 ` Andreas Dilger
2002-06-20 9:34 ` Stephen C. Tweedie
2002-06-20 10:18 ` Andreas Dilger
2002-06-20 13:45 ` Daniel Phillips
2002-06-21 14:54 ` Ville Herva
2002-06-21 15:08 ` Stephen C. Tweedie
2002-06-21 15:38 ` Ville Herva
2002-06-21 16:15 ` Stephen C. Tweedie
2002-06-21 18:44 ` Ville Herva
2002-06-20 16:26 ` Bill Davidsen
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=20020618163947.GO22427@clusterfs.com \
--to=adilger@clusterfs.com \
--cc=austin@digitalroadkill.net \
--cc=linux-kernel@vger.kernel.org \
--cc=raul@pleyades.net \
/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