From owner-freebsd-geom@freebsd.org Tue Jul 12 11:38:13 2016 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F923B935AA for ; Tue, 12 Jul 2016 11:38:13 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0121.outbound.protection.outlook.com [104.47.37.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB4BB1733 for ; Tue, 12 Jul 2016 11:38:12 +0000 (UTC) (envelope-from decui@microsoft.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lBSYlsbKlVN49BRJ7pv6P8+doT799wXoBSUqdOv5KpM=; b=bXJ4X6QSoBCI1RhYgAeZZqkK0L0PNZtJE05eYjs2sauM9H0/HL61LtJ7Laz4J3HwF4VgDlB6nY8aNISGy6kQlzeBVyKAmotrJhvFLGzc24HFVSIhxj0hQGnQMCpkCI45w7e7i+HH9kMCLa5/LWFqhQSHmH2/FEGdzsgCsTr/h0c= Received: from CO2PR03MB2182.namprd03.prod.outlook.com (10.166.92.17) by CO2PR03MB2183.namprd03.prod.outlook.com (10.166.92.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.534.14; Tue, 12 Jul 2016 10:04:59 +0000 Received: from CO2PR03MB2182.namprd03.prod.outlook.com ([10.166.92.17]) by CO2PR03MB2182.namprd03.prod.outlook.com ([10.166.92.17]) with mapi id 15.01.0534.023; Tue, 12 Jul 2016 10:04:59 +0000 From: Dexuan Cui To: "Andrey V. Elsukov" , "freebsd-geom@freebsd.org" CC: Sepherosa Ziehau Subject: RE: How to force GEOM to recalculate the free space after the disk is resized? Thread-Topic: How to force GEOM to recalculate the free space after the disk is resized? Thread-Index: AdHZDRzvMnaRHenxQ+mzWQWfArdlkwAMXuMAABJ8R0AADJ1qAACaAytg Date: Tue, 12 Jul 2016 10:04:59 +0000 Message-ID: References: <577FE380.8020601@yandex.ru> <5780B436.4070309@yandex.ru> In-Reply-To: <5780B436.4070309@yandex.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [2404:f801:9000:18::ab] x-ms-office365-filtering-correlation-id: 9efc66c1-eaa8-4e34-c5cf-08d3aa3bfc1b x-microsoft-exchange-diagnostics: 1; CO2PR03MB2183; 6:Gz2Aeg9FQzlogZfdlCP5BePyJBi162YULd4Uc0yl2pUF5A+hhMTZ+5NuLwp54bakjCcxfKiNoLugQhDlVKRxyFcSznPBTcr96SuIBFDCr9A/HQtou6tvWX6yTvW5xZ/dRhz16nNf/cDOei5NsS7/64BbtwS7peS+B2fxDzsvzwHIdt9TPYxE0v1+xRnSVNlbVaqa30jYhVjW59R5OveXSO0OH3GTqhfvf7Y5PziNm9R71xtyk365QZxjyzGtrSh7Yw+hC3I73ON4t1YyvSi5uugAwLGMDZcqMjee2XNHInsbL5NZrCiduUoyI2GTEFyaYPBEgULIAcVPP5ZckiQgUw==; 5:/f++rf6j2MCNR/zF+0brgcb0hEn/UahafYOhyWjRBuxnIXTu+ukZz9TcXcbOiiddU9rOZq3GaDajcAD3TBSYGzclFZkk5yM5wWbBVSoNaRbfZEYSHhS8jMr2gxpvGx6gkLMa6FDFxj5c75BRFNy0uw==; 24:J0r876W9FFpsv0OnNL+84LdxLzxg/jki6NsBuiDeCo41Axdk1XVZhD/+sfFx39JmXjlGYmBW38Z73OtI24XYaJ7Iklrje3nHiSwpRLkGDpc=; 7:ZLhVAnA9jkFhuRtvsU4DGtktHFOgQm70BT/cYq6FHLW+RufuaSb/DKBFZHHwOeX+U05DD6GYOEqvPWOe/jS14YNzTT0wJLD9IJXmm2Ve1JxqkIh+jN6EIIP2apitE2u6HCc1AxjP+DzC5Fbk2eyGpR6qLBiPbzyMYkLFSisxwL/uvt3gQKHdFHpOooWqiUzV9VbT9sV7mYnlbtaJ0Tt/3WoAwXUD/35XhMzvygKWjJZV6ul3K1VAH2ZHEg3nA2Fc x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR03MB2183; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(144735808701293); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(61426038)(61427038); SRVR:CO2PR03MB2183; BCL:0; PCL:0; RULEID:; SRVR:CO2PR03MB2183; x-forefront-prvs: 0001227049 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(189002)(199003)(24454002)(9686002)(2501003)(93886004)(5002640100001)(2906002)(4326007)(19580395003)(19580405001)(76176999)(50986999)(68736007)(105586002)(106356001)(33656002)(10090500001)(345774005)(86362001)(54356999)(122556002)(3280700002)(7846002)(7736002)(7696003)(5003600100003)(3660700001)(305945005)(87936001)(10400500002)(5005710100001)(10290500002)(8936002)(92566002)(101416001)(8990500004)(102836003)(6116002)(11100500001)(2900100001)(2950100001)(81156014)(586003)(81166006)(8676002)(99286002)(86612001)(15975445007)(77096005)(5001770100001)(76576001)(189998001)(74316002)(97736004)(23180200002)(3826002)(563744003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR03MB2183; H:CO2PR03MB2182.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2016 10:04:59.7611 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2183 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 11:38:13 -0000 > From: Andrey V. Elsukov [mailto:bu7cher@yandex.ru] > Sent: Saturday, July 9, 2016 16:22 > To: Dexuan Cui ; freebsd-geom@freebsd.org > Subject: Re: How to force GEOM to recalculate the free space after the di= sk is > resized? >=20 > On 09.07.16 05:32, Dexuan Cui wrote: > >> What FreeBSD version do you use? > >> What messages do you see in the console/dmesg after resizing of disk? > >> > >> WBR, Andrey V. Elsukov > > > > I'm using 11-CURRENT, but I also tried 10.3 and got the same result. >=20 > GEOM should be notified by disk driver, but I don't see that it did. > I think you need to try `camcontrol reprobe` command >=20 > WBR, Andrey V. Elsukov Hi Andrey, Thank you for the suggestion! With "camcontrol reprobe", GEOM can detect the new disk capacity and the new "free" space! :-) However, there is a strange issue: after I resize "da1" from Hyper-V,=20 if there is a disk read before "camcontrol reprobe da1", gpart couldn't detect the new free space, though it can detect the new disk capacity. I reported a bug for this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211028 The workaround is to open da1 for writing. This is weird: how can "read" prevent "camcontrol reprobe da1" from working? It looks there is still a bug somewhere? Thanks, -- Dexuan