win10下的wsl2扩充空间
参考microsoft官方文档:https://learn.microsoft.com/zh-cn/windows/wsl/disk-space#how-to-locate-the-vhdx-file-and-disk-path-for-your-linux-distribution
但是到最后一步时会报错:“The containing partition (or device) is only 67108864 (4k) blocks.
You requested a new size of 230400000 blocks.”
!!!重点就是重启电脑!!!
然后参考:
https://github.com/microsoft/WSL/issues/4373
我没有使用Debian所以前面我都没有执行命令,
只需要以下:
sudo e2fsck -f /dev/sdb
sudo resize2fs /dev/sdd 512000M #这里我是扩充到512G,要跟前面你扩充的空间相对应
就ok了
使用以下命令查看空间:
df -h