resampeling of a ZVOL that has been resized
Willem Jan Withagen
wjw at digiware.nl
Wed Apr 22 21:23:02 UTC 2015
Hi,
I'm trying to do some tests with resizing/growfsing partitions because
an earlier attempt for a online system did not work as expected.
So I first create ZVOL, format it and then mount it.
Fill it with some data.
And then grow it
----
zfs create -V 100G $VOL
gpart create -s GPT $DEV
gpart add -t freebsd-ufs -l test $DEV
newfs $DISK
mount $DISK $MNT
rsync -rav /usr/src/ $MNT
zfs set volsize=200G $VOL
----
Now gpart show gives me:
=> 40 209715120 zvol/zfsdata/vol GPT (200G)
40 8 - free - (4.0K)
48 209715104 1 freebsd-ufs (100G)
209715152 8 - free - (4.0K)
But I'm not able to grow partition 1....
Only once the system is rebooted is get:
=> 40 209715120 zvol/zfsdata/vol GPT (200G) [CORRUPT]
40 8 - free - (4.0K)
48 209715104 1 freebsd-ufs (100G)
209715152 8 - free - (4.0K)
'gpart recover zvol/zfsdata/vol' then recovers the GPT data.
After which we can resize the partition:
'gpart resize -i 1 zvol/zfsdata/vol'
And even when the partion is mounted growfs does its work and resizes
with a few seconds to the full size....
Now the question:
How can I get GEOM to resample the zvol, and have it really detect that
the disk has changed.... It sort of does, but not enough to actually
allow it to grow to the new size.
Thanx,
--WjW
More information about the freebsd-fs
mailing list