public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] extending /usr partition...
Date: Sun, 22 Mar 2009 13:45:56 +0200	[thread overview]
Message-ID: <200903221345.56656.alan.mckinnon@gmail.com> (raw)
In-Reply-To: <49C61A03.6050800@gmail.com>

On Sunday 22 March 2009 12:59:15 Jarry wrote:
> Are you sure? man resize2fs says:
>
> "...The resize2fs program will resize ext2 or ext3 file systems.
>   It can be used to enlarge or shrink an unmounted file system
>   located on device. If the filesystem is mounted, it can be used
>   to expand the size of the mounted filesystem, assuming the kernel
>   supports on-line resizing..."
>
> If I understand correctly, you can only extend ext3-partition
> with it. But shrinking must be done off-line, on unmounted fs...

Yes, and this is true for *any* filesystem. Some mature filesystems out there 
don't support resizing at all in any form.

Enlarging a filesystems on line is easy. Make the device holding it bigger, 
add new inodes, add inodes to the inode tree and Hey Presto! filesystem is 
bigger. It's quick as you are *guaranteed* that the new inodes are not in use 
until the resize ends.

Reducing is entirely different. You have to take inodes in use at the end of 
the filesystem, move them to somewhere else, fix the pointers in other inodes 
that point to them, repeat for all other inodes that will have to go away 
after the resize. Yuck. Tricky code :-)

You are going to have this problem with any inode-based filesystem, not just 
ext3.


-- 
alan dot mckinnon at gmail dot com



  reply	other threads:[~2009-03-22 11:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 18:05 [gentoo-user] extending /usr partition Jarry
2009-03-21 18:12 ` Alan McKinnon
2009-03-21 18:20   ` Dirk Heinrichs
2009-03-21 18:39   ` Jarry
2009-03-21 18:53     ` Alan McKinnon
2009-03-21 19:37     ` Daniel Troeder
2009-03-21 20:57     ` Neil Bothwick
2009-03-21 21:13       ` BRM
2009-03-21 23:39         ` Neil Bothwick
2009-03-22  2:46         ` Albert Hopkins
2009-03-22  6:36           ` [gentoo-user] " Francesco Talamona
2009-03-22  7:16             ` Philip Webb
2009-03-22  8:44             ` Alan McKinnon
2009-03-22 11:12             ` Albert Hopkins
2009-03-22 12:53               ` Francesco Talamona
2009-03-22 15:06                 ` Albert Hopkins
2009-03-22  8:42         ` [gentoo-user] " Alan McKinnon
2009-03-23 12:44           ` BRM
2009-03-22  9:32     ` Dirk Heinrichs
2009-03-22 10:59       ` Jarry
2009-03-22 11:45         ` Alan McKinnon [this message]
2009-03-22 10:37     ` Dirk Heinrichs
2009-03-22  6:39   ` [gentoo-user] " Francesco Talamona
2009-03-22  8:32     ` Alan McKinnon
2009-03-21 18:16 ` [gentoo-user] " Dirk Heinrichs

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=200903221345.56656.alan.mckinnon@gmail.com \
    --to=alan.mckinnon@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /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