From owner-freebsd-questions@FreeBSD.ORG Thu Dec 4 11:52:57 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A31616A4CE for ; Thu, 4 Dec 2003 11:52:57 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CC7343F93 for ; Thu, 4 Dec 2003 11:52:56 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id hB4Jqsut095619; Thu, 4 Dec 2003 13:52:54 -0600 (CST) (envelope-from dan) Date: Thu, 4 Dec 2003 13:52:54 -0600 From: Dan Nelson To: Rishi Chopra Message-ID: <20031204195254.GH32713@dan.emsphone.com> References: <3FCEF97C.2020401@cal.berkeley.edu> <20031204152733.GG32713@dan.emsphone.com> <3FCF87CF.30207@cal.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FCF87CF.30207@cal.berkeley.edu> X-OS: FreeBSD 5.2-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: doublef@tele-kom.ru cc: questions@freebsd.org Subject: Re: growfs says 'we are not growing' ?!?! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2003 19:52:57 -0000 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