2019-01-16

[OVH-SP-32-S] Build SSD LVM

A/ Install OS from OVH UBUNTU 16.04 TEMPLATE
A.1/ /dev/sda

/boot: 500MB
/: 20GB
swap: default

/var: lv01: 20GB
/opt: lv02: remain

A.2/ dev/sdb
+DELETE OLD DATA
+FORMAT EXT4
+Add to LVM, lv02

B/ CONFIG SERVER WITH THESE INFO

watch -n 5 "COLUMN= lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL;pvs;vgs;lvs;df -h;date;"

#Change LVM INFO:
nano /etc/lvm/lvm.conf
        #QWERTY: ORIGIN:
#       locking_type = 1
        locking_type = 0

#Disable iptables:            
service netfilter-persistent flush

#
lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL


#1/
fdisk /dev/sdb

#2/ 
mkfs.ext4 /dev/sdb1

#3/
root@ns563707 /# pvcreate /dev/sdb1
WARNING: ext4 signature detected on /dev/sdb1 at offset 1080. Wipe it? [y/n]: y
  Wiping ext4 signature on /dev/sdb1.
  Physical volume "/dev/sdb1" successfully created
  
#4/
root@ns563695 /# vgextend  vg /dev/sdb1
  Volume group "vg" successfully extended

#5/  
lvscan

#6/
lvresize -l +100%FREE --resizefs  /dev/vg/lv02

No comments:

Post a Comment