【成功实现】CentOS磁盘扩容

对服务器磁盘扩容操作步骤

查看磁盘信息

fdisk -l

创建新分区

fdisk /dev/sda

P

n

p

...

t

回车

8e

w

重启虚拟机

reboot

mkfs.ext4 /dev/sda4

查看磁盘信息

fdisk -l

创建物理卷

pvcreate /dev/sda4

y

创建卷组 并绑定物理卷

vgcreate centos /dev/sda4

创建逻辑卷

lvcreate -n centos-data1 -L 80G centos

lvcreate -n centos-data2 -L 80G centos

lvcreate -n centos-data3 -L 80G centos

查询逻辑卷情况

lvdisplay

设置格式

mkfs.xfs /dev/centos/centos-data1

mkfs.xfs /dev/centos/centos-data2

mkfs.xfs /dev/centos/centos-data3

lvdisplay

mount /dev/centos/centos-data1 挂载路径

常见问题FAQ

右上角网络图标消失 需要手动连接问题

systemctl is-enabled NetworkManager

systemctl enable NetworkManager

sed -i s/ONBOOT=no/ONBOOT=yes/ /etc/sysconfig/network-scripts/ifcfg-ens33

相关推荐
小雪_Snow8 小时前
CentOS 7 初始化脚本
centos
confiself11 小时前
GO环境配置
linux·运维·centos
_叶小格_1 天前
cp、scp、rsync命令详解
linux·运维·服务器·ubuntu·centos·运维开发
小天源1 天前
CentOS 7介绍及其下载
linux·运维·ubuntu·centos·麒麟·windows11·windows10
unable code1 天前
磁盘取证-Flying_High
网络安全·ctf·misc·1024程序员节·磁盘取证
nangonghen1 天前
centos 7.9安装postman v9.31.0
centos·api·postman
unable code2 天前
磁盘取证-ColorfulDisk
网络安全·ctf·misc·1024程序员节·内存取证
黑色的山岗在沉睡2 天前
CentOS 10 Stream 配置远程桌面,基于HeadLess gnome-remote-desktop。
linux·运维·centos
独自归家的兔2 天前
CentOS 8 系统下的包依赖冲突问题
linux·运维·centos
unable code3 天前
磁盘取证-[第十章][10.1.2 磁盘取证方法]磁盘取证1
网络安全·ctf·misc·1024程序员节·内存取证