growfs says 'we are not growing' ?!?!

Dan Nelson dnelson at allantgroup.com
Thu Dec 4 11:52:57 PST 2003


In the last episode (Dec 04), Rishi Chopra said:
> Any idea why my partitions (da0s1a, da0s1d, da0s1e) don't have valid 
> disk labels?
> 
> # disklabel -A da0s1d | more
> disklabel: /dev/da0s1d: no valid label found
> # disklabel -A da0s1e | more
> disklabel: /dev/da0s1e: no valid label found
> 
> I created the partitions and mount points when installing the os
> using the standard GUI.

You don't run disklabel on partitions; you run it on slices.  Most
disks will have a single disklabel, which creates all the partitions
needed.  Let me see if I can do an ascii-art drawing of a resize
operation:

Original system:
        ____________________________________________________ 
1      |______________________DISK__________________________|
2      |MBR|______Slice 1_________|______Slice 2____________|
3                                 |_a_|___b___|__d___|___e__|
4                                 |_/_|       |_/var_|_/usr_|

Row 1 is the physical layout.  Row 2 is composed of the MBR and fdisk
slices.  Row 3 is BSD disklabels, and row 4 is filesystems.  In this
example, we'll say da0s1 is a non-unix filesystem and ignore it. 
da0s2b is swap, which always uses the entire space given to it, which
is why I didn't extend it to row 4.  The disklabel header for Slice 2
is actually embedded in the first block of the first partition which is
why there's no |DL| on row 3 to match the |MBR| for slices on row 2. 
UFS filesystems skip the first 8k or 64k in a partition to leave room
for the disklabel header and boot blocks.

Grow RAID array:
        _____________________________________________________________
       |____________________________DISK_____________________________|
       |MBR|______Slice 1_________|______Slice 2____________|
                                  |_a_|___b___|__d___|___e__|
                                  |_/_|       |_/var_|_/usr_|

Run fdisk on da0 and grow slice 2:
        _____________________________________________________________
       |____________________________DISK_____________________________|
       |MBR|______Slice 1_________|___________Slice 2________________|
                                  |_a_|___b___|__d___|___e__|
                                  |_/_|       |_/var_|_/usr_|

Run disklabel on da0s2 and grow partition e:
        _____________________________________________________________
       |____________________________DISK_____________________________|
       |MBR|______Slice 1_________|___________Slice 2________________|
                                  |_a_|___b___|__d___|_______e_______|
                                  |_/_|       |_/var_|_/usr__|        

Run growfs on da0s2e and grow the filesystem:
        _____________________________________________________________
       |____________________________DISK_____________________________|
       |MBR|______Slice 1_________|___________Slice 2________________|
                                  |_a_|___b___|__d___|_______e_______|
                                  |_/_|       |_/var_|_/usr__________|

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list