FreeBSD:文件系统扩容

root@riguz:~ # gpart show
=>      63  83886017  vtbd0  MBR  (40G)
        63         1         - free -  (512B)
        64  41942975      1  freebsd  [active]  (20G)
  41943039  41943041         - free -  (20G)

root@riguz:~ # gpart resize -i 1 -a 4k -s 39G vtbd0
vtbd0s1 resized
root@riguz:~ # df -h
Filesystem                     Size    Used   Avail Capacity  Mounted on
/dev/ufsid/59a7effe7885633c     19G    3.9G     14G    22%    /
devfs                          1.0K    1.0K      0B   100%    /dev
root@riguz:~ # service growfs onestart
Growing root partition to fill device
vtbd0s1 resized
super-block backups (for fsck_ffs -b #) at:
 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552, 51289792, 52572032, 53854272,
 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672,
 67958912, 69241152, 70523392, 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072,
 80781312, 82063552, 83345792
root@riguz:~ # df -h
Filesystem                     Size    Used   Avail Capacity  Mounted on
/dev/ufsid/59a7effe7885633c     39G    3.9G     32G    11%    /
devfs                          1.0K    1.0K      0B   100%    /dev
root@riguz:~ #