嗨我试图为我的kubernetes集群中的pod调整磁盘大小,按照docs上的步骤,我ssh到实例节点按照步骤,但它给我一个错误
sudo growpart /dev/sdb 1
WARN: unknown label
failed [sfd_dump:1] sfdisk --unit=S --dump /dev/sdb
/dev/sdb: device contains a valid 'ext4' signature; it is strongly recommended to wipe the device with wipefs(8)
if this is unexpected, in order to avoid possible collisions
sfdisk: failed to dump partition table: Success
FAILED: failed to dump sfdisk info for /dev/sdb
我尝试从pod内部运行命令,但甚至找不到磁盘
root@rc-test-r2cfg:/# df -h
Filesystem Size Used Avail Use% Mounted on
overlay 59G 2.5G 56G 5% /
/dev/sdb 49G 22G 25G 47% /var/lib/postgresql/data
root@rc-test-r2cfg:/# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 96G 0 disk /var/lib/postgresql/data
sda 8:0 0 60G 0 disk
└─sda1 8:1 0 60G 0 part /etc/hosts
root@rc-test-r2cfg:/# growpart /dev/sdb 1
FAILED: /dev/sdb: does not exist
其中/ dev / sdb是磁盘位置
现在可以通过直接更新持久卷声明的存储规范来轻松完成此操作。请参阅这些帖子以供参考: