Set debugflags
sysctl kern.geom.debugflags=16
Resize root partition
Show the current partition
gpart show => 40 8388528 da0 GPT (30G) [CORRUPT] 40 1024 1 freebsd-boot (512K) 1064 7965696 2 freebsd-ufs (3.8G) 7966760 421808 - free - (206M)
Apply the partition
/etc/rc.d/growfs onestart
Growing root partition to fill device Adding swap partition da0 recovered da0p3 added da0p2 resized super-block backups (for fsck_ffs -b #) at: 8963328, 10243776, 11524224, 12804672, 14085120, 15365568, 16646016, 17926464, 19206912, 20487360, 21767808, 23048256, 24328704, 25609152, 26889600, 28170048, 29450496, 30730944, 32011392, 33291840, 34572288, 35852736, 37133184, 38413632, 39694080, 40974528, 42254976, 43535424, 44815872, 46096320, 47376768, 48657216, 49937664, 51218112, 52498560, 53779008, 55059456, 56339904 Metadata value stored on da0p3. Done.
Check the result
df -h Filesystem Size Used Avail Capacity Mounted on /dev/gpt/rootfs 26G 2.2G 22G 9% / devfs 1.0K 0B 1.0K 0% /dev
Change back the debugflags
sysctl kern.geom.debugflags=0
Swap partition
If you've swap partition, please remove it before resize the root partition.
Comments
Post a Comment