From owner-freebsd-questions@FreeBSD.ORG Tue Jul 8 07:19:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A176E1065672 for ; Tue, 8 Jul 2008 07:19:13 +0000 (UTC) (envelope-from amsibamsi@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB8C8FC12 for ; Tue, 8 Jul 2008 07:19:12 +0000 (UTC) (envelope-from amsibamsi@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1310299fgb.35 for ; Tue, 08 Jul 2008 00:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=ywasAPcu+beiNy4jRBrb8sCaJxTxzLACM9hTq4dHJVA=; b=M3XGuZH1EdqIgKGoVhIfp08SVl0iY+PG5lV7KO7ocgE7V0CkBbeP6jN20lVAjBxo7d AT2wAUfEJsneuel5cD3UH9bDFL/QF3qgi/mXRZxpAf1g1/Oa1zysOZB5c5aV/gqzoq4T 8UJ2p6x29NEP6PkdhrYbM6ibaw4Q9E/q18xDs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=QxOLDvWym89ed6HYBDxa5nVMmcJSbOfG2pI0xLE/9NasPxdn2K767oVfvV9fhZNmhL PccYwcPqtneiulDDs8N2EkqQb0xE5A6UcalHtZYP90VjPokEIk95mHcuFBolggwiJXZr JGIyZU2MYkUWWwPO/N6o3ETCzQlJIkNshEJiU= Received: by 10.86.54.3 with SMTP id c3mr5128048fga.55.1215501551738; Tue, 08 Jul 2008 00:19:11 -0700 (PDT) Received: from marvelman.marvels.xx ( [77.57.75.125]) by mx.google.com with ESMTPS id 4sm6038269fge.5.2008.07.08.00.19.10 (version=SSLv3 cipher=RC4-MD5); Tue, 08 Jul 2008 00:19:10 -0700 (PDT) Message-Id: From: Anselm Strauss To: freebsd-questions@freebsd.org In-Reply-To: <588ED8E7-9EB7-4E15-A03B-06FAD0469294@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Tue, 8 Jul 2008 09:19:09 +0200 References: <588ED8E7-9EB7-4E15-A03B-06FAD0469294@gmail.com> X-Mailer: Apple Mail (2.926) Subject: Re: bsdlabel has no effect X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2008 07:19:13 -0000 On Jun 28, 2008, at 13:25 , Anselm Strauss wrote: > Hi, > > originally I had the following labels on my ad0 disk (no partitions, > directly labeled /dev/ad0): > > # /dev/ad0: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 1048576 0 4.2BSD 1024 8192 46248 > c: 1048576 0 unused 0 0 # "raw" part, > don't edit > > Since this was written from a file image the my compact flash card, > and the card has now 8GB instead of 512MB, I wanted to grow the > labels after having booted the system, and that worked. So now it is: > > # /dev/ad0: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 15662304 0 4.2BSD 1024 8192 46248 > c: 15662304 0 unused 0 0 # "raw" part, > don't edit > > But unfortunately, I also grew label 'a', although I did not grow > the filesystem. What I actually wanted was to stay 'a' the size it > is and add new labels. So I tried to shrink 'a' again, to finally > have something like: > > # /dev/ad0: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 1048576 0 4.2BSD 1024 8192 46248 > c: 15662304 0 unused 0 0 # "raw" part, > don't edit > > before adding new labels. But somehow bsdlabel has no effect when > shrinking 'a'. No error or verbose message, the labels are just the > same before running it, whether I use the edit mode or restore mode. > > Am I not supposed to shrink a label like that? > > Cheers, > Anselm > Okay, this was of course since I tried to resize a partition that is mounted. I guess this will never work, even when the filesystem actually already has the size the partition should be shrunk to. I think there is no other way of resizing the root partition/filesystem without booting a different system than the one on this partition. Anselm