Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2003 13:52:54 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Rishi Chopra <rchopra@cal.berkeley.edu>
Cc:        questions@freebsd.org
Subject:   Re: growfs says 'we are not growing' ?!?!
Message-ID:  <20031204195254.GH32713@dan.emsphone.com>
In-Reply-To: <3FCF87CF.30207@cal.berkeley.edu>
References:  <3FCEF97C.2020401@cal.berkeley.edu> <20031204152733.GG32713@dan.emsphone.com> <3FCF87CF.30207@cal.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031204195254.GH32713>