linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Determining if an ext4 fs uses the whole partition
@ 2012-04-30 17:19 Daniel Drake
  2012-04-30 17:29 ` Eric Sandeen
  2012-04-30 17:33 ` djwong
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Drake @ 2012-04-30 17:19 UTC (permalink / raw)
  To: linux-ext4

Hi,

OLPC has started using ext4 online resizing to grow our filesystems to
use the whole SD card on first boot - something we never did before.
Working very nicely, thanks!

I'm trying to simplify/improve the scripts involved in doing this.

How can I programatically check if an ext4 fs already fills its
partition, or if it has room to grow?


The numbers produced by dumpe2fs (e.g. block count) or "df" don't seem
to exactly line up with the sizes produced by fdisk.
One easy solution, if possible, would be to find out the number of the
last sector used by the filesystem. I could then very easily compare
this to the "end" information found in sysfs for the partition. Then I
can make the decision on whether to grow or not.

Thanks
Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-30 19:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30 17:19 Determining if an ext4 fs uses the whole partition Daniel Drake
2012-04-30 17:29 ` Eric Sandeen
2012-04-30 17:37   ` Jeff Moyer
2012-04-30 19:01     ` Ted Ts'o
2012-04-30 18:18   ` Daniel Drake
2012-04-30 18:26     ` Eric Sandeen
2012-04-30 17:33 ` djwong

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).