linux 扩容
tmpfs tmpfs 82M 0 82M 0% /run/user/1002
tmpfs tmpfs 82M 0 82M 0% /run/user/0
[输入命令]# fdisk -lu
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76042835
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 41943039 41940992 20G 83 Linux
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]#
[输入命令]# fdisk -lu
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76042835
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 41943039 41940992 20G 83 Linux
[输入命令]# type growpart || yum install -y cloud-utils-growpart
growpart is /usr/bin/growpart
[输入命令]# LC_ALL=en_US.UTF-8 growpart /dev/vdb 1
FAILED: /dev/vdb: does not exist
[输入命令]# fdisk -lu
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76042835
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 41943039 41940992 20G 83 Linux
[输入命令]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 395M 0 395M 0% /dev
tmpfs tmpfs 410M 0 410M 0% /dev/shm
tmpfs tmpfs 410M 504K 409M 1% /run
tmpfs tmpfs 410M 0 410M 0% /sys/fs/cgroup
/dev/vda1 xfs 20G 20G 510M 98% /
tmpfs tmpfs 82M 0 82M 0% /run/user/1002
tmpfs tmpfs 82M 0 82M 0% /run/user/0
[输入命令]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 395M 0 395M 0% /dev
tmpfs tmpfs 410M 0 410M 0% /dev/shm
tmpfs tmpfs 410M 504K 409M 1% /run
tmpfs tmpfs 410M 0 410M 0% /sys/fs/cgroup
/dev/vda1 xfs 20G 20G 510M 98% /
tmpfs tmpfs 82M 0 82M 0% /run/user/1002
tmpfs tmpfs 82M 0 82M 0% /run/user/0
[输入命令]# fdisk -lu
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76042835
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 41943039 41940992 20G 83 Linux
[输入命令]# LC_ALL=en_US.UTF-8 growpart /dev/vdb 1
FAILED: /dev/vdb: does not exist
[输入命令]# LC_ALL=en_US.UTF-8 growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=41940992 end=41943040 new: size=83883999,end=83886047
[输入命令]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 395M 0 395M 0% /dev
tmpfs tmpfs 410M 0 410M 0% /dev/shm
tmpfs tmpfs 410M 504K 409M 1% /run
tmpfs tmpfs 410M 0 410M 0% /sys/fs/cgroup
/dev/vda1 xfs 20G 20G 510M 98% /
tmpfs tmpfs 82M 0 82M 0% /run/user/1002
tmpfs tmpfs 82M 0 82M 0% /run/user/0
[输入命令]# resize2fs /dev/vda1
resize2fs 1.45.4 (23-Sep-2019)
resize2fs: Bad magic number in super-block while trying to open /dev/vda1
Couldn't find valid filesystem superblock.
[输入命令]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 395M 0 395M 0% /dev
tmpfs tmpfs 410M 0 410M 0% /dev/shm
tmpfs tmpfs 410M 504K 409M 1% /run
tmpfs tmpfs 410M 0 410M 0% /sys/fs/cgroup
/dev/vda1 xfs 20G 20G 510M 98% /
tmpfs tmpfs 82M 0 82M 0% /run/user/1002
tmpfs tmpfs 82M 0 82M 0% /run/user/0
[输入命令]# resize2fs /dev/vda1^C
[输入命令]# fdisk -l
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76042835
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 83886046 83883999 40G 83 Linux
[输入命令]#