From owner-freebsd-fs@freebsd.org Fri Mar 9 07:03:08 2018 Return-Path: Delivered-To: freebsd-fs@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 24320F32102 for ; Fri, 9 Mar 2018 07:03:08 +0000 (UTC) (envelope-from spry@anarchy.in.the.ph) Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com [IPv6:2607:f8b0:400d:c0d::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9F988768F for ; Fri, 9 Mar 2018 07:03:07 +0000 (UTC) (envelope-from spry@anarchy.in.the.ph) Received: by mail-qt0-x234.google.com with SMTP id m13so9653453qtg.13 for ; Thu, 08 Mar 2018 23:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarchy-in-the-ph.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XGCregocTVWpMgy0YaxjSDC7fuEOmPxDJp0SxgrENzI=; b=gVqIczIoWn6nZURA3ai5getZo3Y4HUuNzcXiBnI6nSOQiHzI4N3CKEKuj0OlVQNhCe wD7zta2oCAgq3v+X0Pip8EByBp/PGL3vnfljwQhyLLIQilkw7ZL7a4rT3otqiZ4Skwnj 0RAAJ1IiIlq8eizbzD6PjZlILhPk6yRzO4m0BQpzLYhzfHITleYpnR7FnMm1UJSev7tu 2Msrey/0pCRXN8dwqyzFWxAQNlHdNdnFgFD3Yi7aHt9knaAmwcGPdSBnaS6rVwFqwY7N nAJjWPUtv/nU9tQe9GZMh1aRYo223mWBepp8jUeZ9ZtCMZt5RqDFJzn6MUyqWvU90ZxG e39g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XGCregocTVWpMgy0YaxjSDC7fuEOmPxDJp0SxgrENzI=; b=LSHaJnOc3plOZg4t2QtnsHqbXj4Pb2B86uhOjZPTEEJM/vAN+bxzuhtyZ8ku4WkbwO BaP16+xsaCZngdWryyKYZAO8A4FPWNg8/4F0DngbDhBmLyiZ2EnIo8+3Yl2d7ESw3Qa3 BCuz7dML32qyxbKcyHdmDH2iWaF6tm106U9sXyjTyyZV7mUq2CGTuUGY0gl3iFOAuDpi 2iTQoPA2CD2tcYjIT8LVcCQRSZ4d/xbQvVfLE9W0GEicDpUllvyNYTpqSwbyskyflxPX WGB7zsKIvqdDoTqoGhOBmeSerO+NrBp9BC5Yl3+TPk6lw+6fw8MwTWE+JpVgen0vFi17 jU+Q== X-Gm-Message-State: AElRT7ErCJQdjdhsf8KwKztAQ9k5mIRnXjFiucYdRUPCoEioSDXJ3OHY 8JBQqpqPD1Fd/8dlFoR6yzDR4ulwO2OF1amF7WIhFA== X-Google-Smtp-Source: AG47ELseNB4P6vHOHVNfztLvT17tQJyU+hU/pMh80/YQSupn/VcME9pLBNppKHhRQ0Bb7K5eH2T1IDuQD/bow5neD2M= X-Received: by 10.200.10.3 with SMTP id b3mr43251985qti.236.1520578987060; Thu, 08 Mar 2018 23:03:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.149.120 with HTTP; Thu, 8 Mar 2018 23:03:06 -0800 (PST) In-Reply-To: <201803081426.w28EQNE6003598@higson.cam.lispworks.com> References: <201802261411.w1QEBRt1002026@higson.cam.lispworks.com> <5A9A4B1E.8070206@anarchy.in.the.ph> <20180303113306.GB2029@brick> <201803081426.w28EQNE6003598@higson.cam.lispworks.com> From: Mars G Miro Date: Fri, 9 Mar 2018 15:03:06 +0800 Message-ID: Subject: Re: growfs only works on GPT partitioning schemes? To: Martin Simmons , =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Cc: Warner Losh , FreeBSD FS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 07:03:08 -0000 On Thu, Mar 8, 2018 at 10:26 PM, Martin Simmons wrote: > >>>>> On Thu, 8 Mar 2018 13:54:03 +0000, Edward Napierala said: > > > > 2018-03-03 15:29 GMT+00:00 Mars G Miro : > > > > > On Sat, Mar 3, 2018 at 7:33 PM, Edward Tomasz Napiera=C5=82a < > trasz@freebsd.org > > > > wrote: > > > > > >> On 0303T1513, Mars G. Miro wrote: > > >> > On 02/26/18 22:30, Warner Losh wrote: > > >> > > > > >> > > On Mon, Feb 26, 2018 at 7:11 AM, Martin Simmons < > martin@lispworks.com > > >> > > > wrote: > > >> > > > > >> > > >>>>> On Mon, 26 Feb 2018 11:55:10 +0800, Mars G Miro said: > > >> > > > > > >> > > > It seems that growfs only works on GPT partitioned > schemes ? > > >> > > > > > >> > > > When I first installed my FreeBSD, I unfortunately chos= e > BSD > > >> during the > > >> > > > FS creation. Now that I ran out of space, I wanted to > increase > > >> the > > >> > > > filesystem size. Successfully did so in Virtualbox but aft= er > > >> rebooting, the > > >> > > > HD doesn't see the new allocated space. It has another > virtual > > >> HD, one > > >> > > > created with GPT and I was able to increase it via growfs. > > >> > > > > >> > > For the BSD scheme, I think you also have to resize the slic= e > > >> (i.e. > > >> > > the MBR > > >> > > entry) and then resize the BSD partition within the slice. > > >> > > > > >> > > > > >> > > You do. The /etc/rc.d script that does resize on boot does that > > >> > > automatically, but we have no other automation for the process. > > >> > > > > >> > > Warner > > >> > > > >> > You guys have any idea how to resize the slice ? > > >> > > > >> > I have 2 HDs, both have already been increased (in VirtualBox). Th= e > BSD > > >> > partitioned scheme below doesn't see the newly allocated disk spac= e, > > >> > only the GPT one. > > >> > > > >> > camcontrol reprobe / gpart recover / etc doesn't do anything. > > >> > > > >> > mars@fbsd11vm1:~ % gpart show > > >> > =3D> 0 83886080 ada0 BSD (40G) > > >> > 0 4194304 1 freebsd-ufs (2.0G) > > >> > 4194304 16777216 2 freebsd-ufs (8.0G) > > >> > 20971520 62914559 4 freebsd-ufs (30G) > > >> > 83886079 1 - free - (512B) > > >> > > > >> > =3D> 40 104857520 ada1 GPT (60G) [CORRUPT] > > >> > 40 12582912 1 freebsd-swap (6.0G) > > >> > 12582952 92274608 2 freebsd-ufs (44G) > > >> > > >> What does "geom disk list" show? > > >> > > >> > > > > > > Supposedly the first drive should already have been 80Gb but: > > > > > > mars@fbsd11vm1:~ % geom disk list > > > ... > > > Geom name: ada0 > > > Providers: > > > 1. Name: ada0 > > > Mediasize: 42949672960 (40G) > > > Sectorsize: 512 > > > Mode: r3w3e6 > > > descr: VBOX HARDDISK > > > ident: VB1e5e1cab-a4c47c87 > > > rotationrate: 0 > > > fwsectors: 63 > > > fwheads: 16 > > > > > > Geom name: ada1 > > > Providers: > > > 1. Name: ada1 > > > Mediasize: 64424509440 (60G) > > > Sectorsize: 512 > > > Mode: r2w2e3 > > > descr: VBOX HARDDISK > > > ident: VBef5bd266-afbdd2b4 > > > rotationrate: 0 > > > fwsectors: 63 > > > fwheads: 16 > > > > > > > Okay, so this explains why you can't resize the partition: it's not > > the partitioning scheme, but the actual device size. > > > The actual size is already increased in Virtualbox but the FreeBSD BSD partitioned HD does not see it. The second GPT partitioned HD did not have problems (I was able to growfs it). > > Does a reboot make "geom disk list" show expected sizes? If not, > > what does a "dmesg | grep ada" show? > > I've rebooted it many times. See more below. > Also, check the size using "vboxmanage showhdinfo" on the host and check > that > the virtual disk doesn't have any vbox snapshots. > > __Martin > It does have 2 snapshots in fact, this is a known problem ? root@fbsd11z51vm1:~ # gpart list Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 83886079 first: 0 entries: 8 scheme: BSD Providers: 1. Name: ada0a Mediasize: 2147483648 (2.0G) Sectorsize: 512 Mode: r1w1e1 rawtype: 7 length: 2147483648 offset: 0 type: freebsd-ufs index: 1 end: 4194303 start: 0 2. Name: ada0b Mediasize: 8589934592 (8.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 2147483648 Mode: r1w1e1 rawtype: 7 length: 8589934592 offset: 2147483648 type: freebsd-ufs index: 2 end: 20971519 start: 4194304 3. Name: ada0d Mediasize: 32212254720 (30G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 2147483648 Mode: r1w1e1 rawtype: 7 length: 32212254720 offset: 10737418240 type: freebsd-ufs index: 4 end: 83886079 start: 20971520 Consumers: 1. Name: ada0 Mediasize: 42949672960 (40G) Sectorsize: 512 Mode: r3w3e6 Geom name: ada1 modified: false state: OK fwheads: 16 fwsectors: 63 last: 125829079 first: 40 entries: 152 scheme: GPT Providers: 1. Name: ada1p1 Mediasize: 6442450944 (6.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 20480 Mode: r1w1e0 rawuuid: 1a11b419-f839-11e7-9145-080027d107ad rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 6442450944 offset: 20480 type: freebsd-swap index: 1 end: 12582951 start: 40 2. Name: ada1p2 Mediasize: 57982017536 (54G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 2147504128 Mode: r1w1e1 rawuuid: 288ccc2c-f839-11e7-9145-080027d107ad rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 57982017536 offset: 6442471424 type: freebsd-ufs index: 2 end: 125829079 start: 12582952 Consumers: 1. Name: ada1 Mediasize: 64424509440 (60G) Sectorsize: 512 Mode: r2w2e3 root@fbsd11z51vm1:~ # dmesg -a | grep ^ada ada0 at ata0 bus 0 scbus0 target 0 lun 0 ada0: cd0: ATA8-ACS device ada0: Serial Number VB1e5e1cab-a4c47c87 ada0: 16.700MB/s transferscd0: 16.700MB/s transfers ( (WDMA2, ATAPI 12bytes, PIO 65534bytes)WDMA2, ada0: 40960MB (83886080 512 byte sectors) ada1 at ata0 bus 0 scbus0 target 1 lun 0 ada1: ATA8-ACS device ada1: Serial Number VBef5bd266-afbdd2b4 ada1: 16.700MB/s transfers (WDMA2, PIO 65536bytes) ada1: 61440MB (125829120 512 byte sectors) root@fbsd11z51vm1:~ # vboxmanage showhdinfo FreeBSD11.1x64_1.vdi UUID: 1e5e1cab-2281-445c-9ded-10e7877cc4a4 Parent UUID: base State: locked read Type: normal (base) Location: C:\XXXXXXXXXXX\FreeBSD11.1x64_1.vdi Storage format: VDI Format variant: dynamic default Capacity: 81920 MBytes Size on disk: 28419 MBytes Encryption: disabled In use by VMs: FreeBSD11.1x64#1 (UUID: 2231222c-b7aa-4976-ba5e-a4524a7d7287) [Snapshot#1 (UUID: 54b79fb2-faa3-4072-a651-2f270022b950)] Child UUIDs: 46e7ebef-dd79-4147-b82d-f4abf75e50d2 vboxmanage showhdinfo FreeBSD11.1x64_2.vdi UUID: ef5bd266-fc22-402b-9ee6-126cb4d2bdaf Parent UUID: base State: locked write Type: normal (base) Location: C:\XXXXXXXXXXXXXXXXXX\FreeBSD11.1x64_2.vdi Storage format: VDI Format variant: dynamic default Capacity: 61440 MBytes Size on disk: 12084 MBytes Encryption: disabled In use by VMs: FreeBSD11.1x64#1 (UUID: 2231222c-b7aa-4976-ba5e-a4524a7d7287) Thanks all! --=20 cheers mars -----