当前位置:   article > 正文

linux 镜像lvm,为LVM中的LV增加镜像(raid1)冗余-CentOS实操

lvm冗余

懒….

hostnamectl set-hostname virt-us-

df -h

umount /home

lvremove /dev/mapper/centos_hostname-home -y

pvdisplay

vgreduce centos_hostname /dev/sd{b,c}1

pvremove /dev/sd{b,c}1

yum -y install mdadm

sfdisk -d /dev/sda | sfdisk /dev/sdb

pvcreate /dev/sdb2

vgextend centos_hostname /dev/sdb2

lvconvert -m1 centos_hostname/root /dev/sdb2 -y

lvconvert -m1 centos_hostname/swap /dev/sdb2 -y

sed ‘s/\/dev\/mapper\/centos_hostname-home/#\/dev\/mapper\/centos_hostname-home/g’ /etc/fstab

mkfs.ext4 /dev/sdc1

echo ‘/dev/sdc1 /home ext4 defaults 0 0’ >> /etc/fstab

mount -a

mkdir /vz

lvcreate -m1 -l 100%FREE -n vz centos_hostname

mkfs.ext4 /dev/mapper/centos_hostname-vz

echo ‘/dev/mapper/centos_hostname-vz /vz ext4 defaults 0 0’ >> /etc/fstab

mount -a

df -h

This article is under CC BY-NC-SA 4.0 license.

Please quote the original link:https://www.liujason.com/article/324.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/674623
推荐阅读
相关标签
  

闽ICP备14008679号