用户工具

站点工具


18530927615

这是本文档旧的修订版!


yes | parted /dev/vdb mklabel gpt echo -e “n\n\n\n+120G\nn\n\n\n+240G\nn\n\n\n+400G\n\nw” >/tmp/fdisk.txt && fdisk /dev/vdb </tmp/fdisk.txt #echo -e “n\n\n\n+80G\nn\n\n\n+120G\nn\n\n\n\n\nw” >/tmp/fdisk.txt && fdisk /dev/vdb </tmp/fdisk.txt vgcreate volumegroup /dev/vdb{1,2,3} pvdisplay #lvcreate -l 20479 -n var volumegroup #lvcreate -l 30719 -n opt volumegroup #lvcreate -l 76799 -n home volumegroup # 整个分区(pv)分配给lv lvcreate -l 100%free -n var volumegroup /dev/vdb1 lvcreate -l 100%free -n opt volumegroup /dev/vdb2 lvcreate -l 100%free -n home volumegroup /dev/vdb3 # 整个分区扩展给已有lv(pv需要分配给vg) # lvextend /dev/mapper/volumegroup-var /dev/vdb3 mkfs.ext4 /dev/mapper/volumegroup-var mkfs.ext4 /dev/mapper/volumegroup-opt mkfs.ext4 /dev/mapper/volumegroup-home if [ -L “/dev/mapper/volumegroup-var” ] ; then sed -i -e '/volumegroup-var/s/^/#/g' -e '$a \/dev\/mapper\/volumegroup-var \/var ext4 defaults,nofail 0 0 ' /etc/fstab; fi if [ -L “/dev/mapper/volumegroup-opt” ] ; then sed -i -e '/volumegroup-opt/s/^/#/g' -e '$a \/dev/mapper/volumegroup-opt \/opt ext4 defaults,nofail 0 0 ' /etc/fstab; fi if [ -L “/dev/mapper/volumegroup-home” ] ; then sed -i -e '/volumegroup-home/s/^/#/g' -e '$a \/dev/mapper/volumegroup-home \/home ext4 defaults,nofail 0 0 ' /etc/fstab; fi cat /etc/fstab sleep 2 mkdir /tmp/tmp-{var,opt,home} mount /dev/mapper/volumegroup-var /tmp/tmp-var mount /dev/mapper/volumegroup-opt /tmp/tmp-opt mount /dev/mapper/volumegroup-home /tmp/tmp-home yes | cp -ap /var/. /tmp/tmp-var yes | cp -ap /opt/. /tmp/tmp-opt yes | cp -ap /home/. /tmp/tmp-home ls /tmp/tmp-var -alh sleep 2 mount -a umount /tmp/tmp-var umount /tmp/tmp-opt umount /tmp/tmp-home ls -alh /var/. lsblk mkdir /home/OneApm_installtmp tail -n +1086 eCloud_Server_3in1_INSTALL_3_0_2022-04-25_11-23-11_3.bin > /home/OneApm_installtmp/eCloud_Server_3in1_INSTALL_3_0_2022-04-25_11-23-11_3.bin.tar.gz head -n 1085 eCloud_Server_3in1_INSTALL_3_0_2022-04-25_11-23-11_3.bin > /home/OneApm_installtmp/eCloud_Server_3in1_INSTALL_3_0_2022-04-25_11-23-11_3.bin.sh tar -zxvf /home/OneApm_installtmp/eCloud_Server_3in1_INSTALL_3_0_2022-04-25_11-23-11_3.bin.tar.gz -C /home/OneApm_installtmp # arm

18530927615.1654831746.txt.gz · 最后更改: 2022/06/10 11:29 由 amos