From owner-freebsd-questions@freebsd.org Fri Oct 5 09:05:25 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB85B10C72FE for ; Fri, 5 Oct 2018 09:05:25 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Received: from mail4.protonmail.ch (mail4.protonmail.ch [185.70.40.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.protonmail.ch", Issuer "QuoVadis Global SSL ICA G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6E77823D for ; Fri, 5 Oct 2018 09:05:25 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Date: Fri, 05 Oct 2018 09:05:05 +0000 To: FreeBSD Questions From: Lorenzo Salvadore Reply-To: Lorenzo Salvadore Subject: Re: Shrinking a partition Message-ID: Feedback-ID: X6az_D2smWSR8MT5MHqXnWF0upxehDyHia7Id1cbayHNBUkRu3CIeusDsZHiivIIjmaKB1_OofpALrRUYjNz3w==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.protonmail.ch X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2018 09:05:26 -0000 > Hello, > > Is it possible to shink a partition under FreeBSD? > > I found only one reference that seems to say it is possible > https://unix.stackexchange.com/questions/324308/resizing-root-partition > > but whenever I try, growfs complains that the new size is smaller than > the original size/ > > So, I am wondering if it is another case of "don't trust what you read > on the web"? > > Thanks in advance, > > Olivier Maybe it is possible: I do not know, I never tried. I admit I do not unders= tand the logic behind the answer of stackexchange (making smaller than what you want, then bigger again... when and how the data would be moved?), but even if I understood it, if I were you, I would try a different strategy. The best thing when changing partitions is to backup all data and restore i= t on the disk after having created the new partition scheme. Moreover, since you are dealing with sizes of partitions, I guess you are not using ZFS. With ZFS you do not have do worry about sizes of partitions any more: you can create as much filesystems as you want and their sizes will shrink and = grow accordingly to their need (you can set maximal and minimal sizes if needed)= . And it has many more other advantages, see https://www.freebsd.org/doc/handbook= /zfs.html . If you choose to move from UFS to ZFS, as far as I know you can do it only = by saving your data through backup and then restore it on your disk after havi= ng set ZFS. I hope my answer can be useful. Lorenzo Salvadore.