我的是nvme的硬盘,/dev/nvme0n1p3一直是174.5G
Device Boot Start End Sectors Size Id Type
/dev/nvme0n1p1 2048 194559 192512 94M 83 Linux
/dev/nvme0n1p2 194560 134217727 134023168 63.9G 83 Linux
/dev/nvme0n1p3 134217728 500117169 365899442 174.5G fd Linux raid autodetect
要先执行parted /dev/nvme0n1 resizepart 3 100%
然后出现
Error: Error informing the kernel about modifications to partition /dev/nvme0n1p3 -- Device or
resource busy. This means Linux won't know about any changes you made to /dev/nvme0n1p3 until
you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Ignore/Cancel? Ignore
Error: Partition(s) 4 on /dev/nvme0n1 have been written, but we have been unable to inform the
kernel of the change, probably because it/they are in use. As a result, the old partition(s)
will remain in use. You should reboot now before **ng further changes.
Ignore/Cancel? Ignore
Information: You may need to update /etc/fstab.
然后reboot重启
再查看,分区3已经变化
Device Boot Start End Sectors Size Id Type
/dev/nvme0n1p1 2048 194559 192512 94M 83 Linux
/dev/nvme0n1p2 194560 134217727 134023168 63.9G 83 Linux
/dev/nvme0n1p3 134217728 2000409263 1866191536 889.9G fd Linux raid autodetect
然后 执行 mdadm --grow /dev/md3 -z max
再像楼主一样,扩展pv(pvresize),lv(lvresize),最后调整文件系统大小(btrfs filesystem resize max),最后成功

