growfs on a large disk

Rick C. Petty rick-freebsd2009 at kiwi-computer.com
Fri Sep 24 21:21:56 UTC 2010


> On Friday, September 24, 2010 05:23:46 am Dean Hamstead wrote:
> > 
> > To give some background, im running the filesystem on a raid array
> > running on an areca raid card. I have an existing filesytem which was
> > formatting /dev/da0 and mounting it. (I understand that this is the
> > preferred alternative to the deprecated 'dangerously dedicated' mode).

I thought using the whole device *was* the "dangerously dedicated" mode,
since there is no partition table on the disk this way.

http://www.freebsd.org/doc/en/books/faq/disks.html#DANGEROUSLY-DEDICATED

> > fdisk shows us...

This is meaningless if you're using dangerously-dedicated disks.

> > now if i unmount /dev/da0 and run growfs /dev/da0 i get the following
> > 
> > [root at batou /home/dean]# growfs /dev/da0
> > growfs: we are not growing (2929687296->685024256)

Looks like an integer maybe wrapped around somewhere?  I can't tell for
sure.

> > with lots of googling, i have found that there is much talk in various
> > freebsd forums about the need to use disklabel. however it seems unable
> > to fathom such a large disk...

If you're already using the device in dangerously-dedicated mode, you may
not be able to disklabel it.  Besides, you should use GPT instead.

#see gpart(8)

> > [root at batou /home/dean]# disklabel /dev/da0
> > disklabel: disks with more than 2^32-1 sectors are not supported

This is true, which is why I'm surprised anyone recommended disklabel.
And "disklabel" was deprecated in favor of "bsdlabel".

> > hopefully i am doing something wrong, or there is a patch set for growfs?

I'm not sure growfs is your problem.  Are you using UFS1 or UFS2?  What did
you specify as the fragment size when creating the file system?  You can
find this out by doing:

	ffsinfo -l 1 /dev/da0 | egrep '(fsize|magic)'

On Fri, Sep 24, 2010 at 12:06:45PM -0500, Josh Paetzel wrote:
> Not sure if you are running into a growfs limitation, you're certainly running 
> into the limits of UFS with those sizes.  Have you considered ZFS?

You must be talking about UFS1, because UFS2 can support devices in the
zettabytes (billions of terabytes).

#see http://en.wikipedia.org/wiki/UFS2

> The man page for growfs mentions that some free space is needed in the first 
> cylinder group to resize.  Perhaps that is the problem you are running in to.

The OP's best option is to dump/restore the filesystem, thereby correcting
the "dangerously-dedicated" problem as well as use a partitioning scheme
invented this millenium (GPT).

-- Rick C. Petty


More information about the freebsd-fs mailing list