Date: Sun, 3 Feb 2013 12:06:41 -0800 From: Tim Kientzle <kientzle@freebsd.org> To: freebsd-current Current <freebsd-current@freebsd.org> Subject: gpart resize vs. cache? Message-ID: <3D812191-2D6E-43B2-B9C1-F00FFA44C5F8@freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D812191-2D6E-43B2-B9C1-F00FFA44C5F8>