I too made an upgrade from 20GB to 30GB. I too was also attempting growfs /dev/vtbd0p3
with the same result.
Found myself exploring /etc/rc.d/growfs. Discovered it worked when called as a service.
- FreeBSD 10.2> df
- Filesystem 1K-blocks Used Avail Capacity Mounted on
- /dev/gpt/rootfs 20307196 5350028 13332596 29% /
- devfs 1 1 0 100% /dev
- FreeBSD 10.2> service growfs onestart
- Growing root partition to fill device
- vtbd0 recovered
- vtbd0p3 resized
- super-block backups (for fsck_ffs -b #) at: ###, ###, ...
- FreeBSD 10.2> df
- Filesystem 1K-blocks Used Avail Capacity Mounted on
- /dev/gpt/rootfs 29442440 5350028 21737020 20% /
- devfs 1 1 0 100% /dev
Alles anzeigen
Examined $rootdev
in /etc/rc.d/growfs and found to have the value of gpt/rootfs
So for the ‘hip’ crowd, we do
- FreeBSD 10.2> sysctl kern.geom.debugflags=16
- kern.geom.debugflags: 0 -> 16
- FreeBSD 10.2> gpart show
- => 3 44040224 vtbd0 GPT (30G) [CORRUPT] 3 32 1 freebsd-boot (16K) 35 2097152 2 freebsd-swap (1.0G) 2097187 41943040 3 freebsd-ufs (20G)
- FreeBSD 10.2> gpart recover /dev/vtbd0
- vtbd0 recovered
- FreeBSD 10.2> gpart show
- => 3 62914555 vtbd0 GPT (30G) **no longer corrupt** 3 32 1 freebsd-boot (16K) 35 2097152 2 freebsd-swap (1.0G) 2097187 41943040 3 freebsd-ufs (20G) 44040227 18874331 - free - (9.0G)
- FreeBSD 10.2> gpart resize -i 3 vtbd0
- vtbd0p3 resized
- FreeBSD 10.2> gpart show
- => 3 62914555 vtbd0 GPT (30G) 3 32 1 freebsd-boot (16K) 35 2097152 2 freebsd-swap (1.0G) 2097187 60817371 3 freebsd-ufs (29G)
- FreeBSD 10.2> df
- Filesystem 1K-blocks Used Avail Capacity Mounted on
- /dev/gpt/rootfs 20307196 5350052 13332572 29% /
- devfs 1 1 0 100% /dev
- FreeBSD 10.2> growfs -y /dev/gpt/rootfs
- super-block backups (for fsck_ffs -b #) at: ###, ###, ...
- FreeBSD 10.2> df
- Filesystem 1K-blocks Used Avail Capacity Mounted on
- /dev/gpt/rootfs 29442440 5350052 21736996 20% /
- devfs 1 1 0 100% /dev
Alles anzeigen
All the while mounted.
I’m not sure if sysctl kern.geom.debugflags=16
is really needed now as the /etc/rc.d/growfs script makes no attempt to call it, and it is successful.