会输出以下文字
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
告诉我们系统依然在使用老的分区表,这时候我们重启一下系统
sudo reboot
复制代码
重启后运行命令
sudo resize2fs /dev/mmcblk0p2
复制代码
输出以下文字就代表扩容成功了
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk0p2 is now 7700608 (4k) blocks long.
可以用df -h看到分区变大
如提示The filesystem is already 1817600 (4k) blocks long. Nothing to do!
代表刷新分区表失败了,还是需要电脑进行操作