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

[输入命令]#

相关推荐
hcja66632 分钟前
CVE-2024-23897-Jenkins任意文件读取漏洞复现
运维·web安全·网络安全·中间件·jenkins
最后一个bug1 小时前
页高速缓存与缓冲区缓存的应用差异
linux·c语言·arm开发·单片机·嵌入式硬件
wingaso1 小时前
[Linux]el8安全配置faillock:登录失败达阈值自动锁定账户配置
linux·运维·安全·ssh
linux修理工2 小时前
speedtest For Ubuntu/Debian
linux·运维·服务器
Steps-of-time2 小时前
Linux之NetLink学习笔记
linux·笔记·学习
vortex52 小时前
Linux 命令行十六进制编辑器:高效操作二进制文件
linux·运维·编辑器
mcharleylei3 小时前
Centos 安装docker
linux·docker·centos
jerry-894 小时前
系统安全及应用
linux·运维·服务器
AiFlutter4 小时前
在AlarmLinux系统中安装KeyDB
linux·运维·服务器
小徐同学14185 小时前
BGP边界网关协议(Border Gateway Protocol)路由聚合详解
运维·服务器·网络·网络协议·信息与通信·bgp