欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 美食 > linux 扩容

linux 扩容

2025/1/24 10:11:10 来源:https://blog.csdn.net/cybersnow/article/details/145330632  浏览:    关键词: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
[输入命令]# 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com