From owner-freebsd-questions@FreeBSD.ORG Tue Jan 15 16:15:52 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 0952616A420 for ; Tue, 15 Jan 2008 16:15:52 +0000 (UTC) (envelope-from cptsalek@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 9127013C4D9 for ; Tue, 15 Jan 2008 16:15:51 +0000 (UTC) (envelope-from cptsalek@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so3028111fgg.35 for ; Tue, 15 Jan 2008 08:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Yv7viLdAJlnsBiKxqYnEIb3uIsTXII8CDUitgUI2gNQ=; b=fOcbYN8A7VvYoK18OzYt3DwkpTgG6Wu7wh8hDkI1oYIKJ80WX7TxtarT6xI9ffMIkwIRdGYu44iBzQdfnD+EB9A7AVGOYKFDHGpuPYL4jjJQOaGAFEiggoP83C5ayNcsU6ewWYACVdIHCzFW32KnQuCr/31wwhQFIfyJ8HR0V1Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dcApCwePG0hf7LWCizpl2L03CaN+Q5uDVDX7EgWank2rvF9dIzZNLbSEYCWSn8+6UNOSwTcFcyWwxBbnNzg4i0rjMmR07ERZZlR9OPiM8xk/YYcdwfK201hjbctbJ9mpdYt78b2XaP9psqlhiD3TrDIE2RDltN45cOKwyn7a/Zo= Received: by 10.82.134.12 with SMTP id h12mr13330424bud.29.1200413749958; Tue, 15 Jan 2008 08:15:49 -0800 (PST) Received: by 10.82.159.19 with HTTP; Tue, 15 Jan 2008 08:15:49 -0800 (PST) Message-ID: <14989d6e0801150815h3e006d45kaa7d3b91c2ae4cd0@mail.gmail.com> Date: Tue, 15 Jan 2008 16:15:49 +0000 From: "Christian Walther" To: jamesh@lanl.gov In-Reply-To: <1200408956.619.59.camel@p25dual1.lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1200408956.619.59.camel@p25dual1.lanl.gov> Cc: Aryeh Friedman , freebsd-questions@freebsd.org Subject: Re: Shrinking a partition 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, 15 Jan 2008 16:15:52 -0000 On 15/01/2008, James Harrison wrote: > On Tue, 2008-01-15 at 07:45 -0500, Aryeh Friedman wrote: > > After installing FreeBSD and Vista (463 GB and 30 GB respectivally) I > > found out I don't have enough free space on my 500 GB drive on the > > vista partition. How do I determine how much I can shrink the > > FreeBSD partition by safely (by just moving the end sector in > > fdisk(1))? > > I'd imagine that you could use the output of df -h to see how much > you're using on the /usr partition and then shrink appropriately. > AFAIK UFS (as well as other Unix FS) don't simply start writing at the beginning of a filesystem and continue until the end is reached. It's possible that data is written near the end of a filesystem nearly instantly after the first mount. To make sure that you don't loose any data I'd dump the FS to a save place and restore it afterwards using a LiveCD.