resizing rootfs to fit the disk

Chris Ball cjb at laptop.org
Wed Mar 10 16:52:44 EST 2010


Hi,

   > if we (or someone else :-) can convince ourselves that the online
   > resize is really no less risky than simply using the filesystem
   > normally (i.e., if power fails, will the ext3 journal fix things
   > as well as it ever does?), then there's no real reason to do the
   > resize while the laptop is still booting.  we can just as easily
   > do it _after_ it has booted, while it's in use.

I asked some kernel folks on IRC about this:

<cjb> sandeen, etc: Do you know whether ext3 online-resize (in the 
      kernel) is power-loss safe?
<cjb> as in journal-recoverable or something.
<josef> cjb: yeah its all journaled
<sandeen> cjb, it probably is, yeah
<sandeen> nothing really happens that's critical until the end
<sandeen> oh, but actually it does log each piece
<sandeen> in fact there is a crapton of journal resizing and restarting
          as it goes
* sandeen remembers that bug ...
<cjb> does that make it less safe?
<josef> cjb: no just a pain
<sandeen> i'm not sure why it is so slow, I need to look into that some
          day :(
<sandeen> it does have to initialize inode & block tables

So, I'd say go ahead with this plan -- resize on first boot, but after
userspace is up and running (and if it fails, try it again until it
succeeds?).  And, of course, we should test power loss during resize
some more.

Thanks,

- Chris.
-- 
Chris Ball   <cjb at laptop.org>
One Laptop Per Child



More information about the Devel mailing list