growfs on a large disk

Dean Hamstead dean at fragfest.com.au
Fri Sep 24 12:28:46 UTC 2010


Evening,

Im trying to growfs a very large filesystem and not having a lot of luck.

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 have expanded the disk array and the volume at the raid card level. 
Then rebooted my machine. It was 4x2tb, and is now 5x2tb. Expanding on 
areca is non-destructive.

Here is the current filesystem size when mounted, da0 is the

-----

[root at batou /home/dean]# df -h
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/ad4a     496M    280M    176M    61%    /
devfs         1.0K    1.0K      0B   100%    /dev
/dev/ad4e     496M    155M    301M    34%    /tmp
/dev/ad4f      68G    8.0G     54G    13%    /usr
/dev/ad4d     1.9G    529M    1.2G    30%    /var
/dev/da1      4.4T    4.4T     28G    99%    /volumes/store2
/dev/da0      5.3T    3.9T    1.4T    74%    /volumes/store1

-----

 From dmesg you can see that freebsd knows its now bigger (7.6 rather 
than 5.3tb)

-----

da0 at arcmsr0 bus 0 scbus0 target 0 lun 0
da0: <Areca ARC-1261-VOL#00 R001> Fixed Direct Access SCSI-5 device
da0: 166.666MB/s transfers (83.333MHz, offset 32, 16bit)
da0: Command Queueing enabled
da0: 7629394MB (15624998912 512 byte sectors: 255H 63S/T 972611C)
da1 at arcmsr0 bus 0 scbus0 target 0 lun 1
da1: <Areca ARC-1261-VOL#01 R001> Fixed Direct Access SCSI-5 device
da1: 166.666MB/s transfers (83.333MHz, offset 32, 16bit)
da1: Command Queueing enabled
da1: 4768371MB (9765624320 512 byte sectors: 255H 63S/T 607881C)
SMP: AP CPU #1 Launched!

-----

if we consult diskinfo, it agrees

-----

[root at batou /home/dean]# diskinfo -v /dev/da0
/dev/da0
	512         	# sectorsize
	7999999442944	# mediasize in bytes (7.3T)
	15624998912 	# mediasize in sectors
	0           	# stripesize
	0           	# stripeoffset
	972611      	# Cylinders according to firmware.
	255         	# Heads according to firmware.
	63          	# Sectors according to firmware.
	0000001379342420	# Disk ident.


-----

fdisk shows us...

-----

[root at batou /home/dean]# fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=972611 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=972611 heads=255 sectors/track=63 (16065 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
     start 63, size 2740094532 (1337936 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 578/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

-----

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)


-----

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

-----

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


----

freebsd version is 8.0 64bit

-----

[root at batou /home/dean]# uname -a
FreeBSD batou.fragfest.net.au 8.0-STABLE FreeBSD 8.0-STABLE #7: Sun Jan 
24 17:13:52 EST 2010 
dean at batou.fragfest.net.au:/usr/obj/usr/src/sys/GENERIC  amd64

-----

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



Dean



More information about the freebsd-fs mailing list