centos新建逻辑分区

fdisk -l
cd /etc/
mv yum.repos.d/ yum.repos.d_bak
mkdir yum.repos.d
cd yum.repos.d
wget -O CentOs-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
yum install -y lvm2
fdisk -l
df -h
pvcreate /dev/vdc
vgcreate vg0 /dev/vdc
vgdisplay
lvcreate -l 230399 -n lv_opt vg0
lvdisplay
mount /dev/vg0/lv_opt /opt
mkfs -t ext4 /dev/vg0/lv_opt
mount /dev/vg0/lv_opt /opt
df -h
vi /etc/fstab
df -h
df -j
cd
pwd
history

 

posted @ 2022-03-23 16:52  feiyang7375  阅读(128)  评论(0编辑  收藏  举报