From owner-freebsd-current@FreeBSD.ORG Sun Feb 3 20:06:51 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3C494A67 for ; Sun, 3 Feb 2013 20:06:51 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEF687B for ; Sun, 3 Feb 2013 20:06:50 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r13K6iss075010 for freebsd-current@freebsd.org; Sun, 3 Feb 2013 20:06:44 GMT (envelope-from kientzle@freebsd.org) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id 24py59izzhwq25nhazkwbznuja; for freebsd-current@freebsd.org; Sun, 03 Feb 2013 20:06:44 +0000 (UTC) (envelope-from kientzle@freebsd.org) From: Tim Kientzle Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: gpart resize vs. cache? Date: Sun, 3 Feb 2013 12:06:41 -0800 Message-Id: <3D812191-2D6E-43B2-B9C1-F00FFA44C5F8@freebsd.org> To: freebsd-current Current Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2013 20:06:51 -0000 I'm tinkering with a disk image that automatically fills whatever media you put it onto. But I'm having trouble with gpart resize failing. Disk layout: MBR with two slices mmcsd0s1 and mmcsd0s2 bsdlabel with one partition mmcsd0s2a Before I can use growfs, I have two gpart resize operations: 1) gpart resize -i 2 mmcsd0 2) gpart resize -i 1 mmcsd0s2 Step 1 resizes mmcsd0s2 and always succeeds. Step 2 resizes mmcsd0s2a and always fails with "No space on device." BUT if I reboot between these steps, step #2 always succeeds. I suspect that step #1 is updating the partition information on disk but that step #2 is somehow reading the old size of mmcsd0s2 and thus finding that there is no available space to grow the partition. gpart(1) doesn't say anything about caching of disk partiition info and "gpart list" does show the updated information after step #1. Is there some trick that will force the partition information in memory to be updated (short of a reboot or unmount/remount the root filesystem)? Tim