Add new partition Centos 7
  • Add new hard drive or add virtual disk in Vcenter.
  • df -h
  • fdisk -l
  • mkdir /databases
  • fdisk /dev/sdb
  • Type the 'p' to print the current partition table then create a new primary partition by typing the 'n' key and selecting the available sectors. Change the disk type to 'Linux LVM' by using 't' command and selecting the code to '8e' or leave as it to its default type that is '83'.
  • Now write the table to disk and exit by Entring 'w' key as shown.
  • partprobe
  • pvcreate /dev/sdb1
  • pvdisplay
  • free -m
  • mkfs -t ext3 /dev/sdb
  • mount -t ext3 /dev/sdb /databases
  • vi /etc/fstab

Add: /dev/sdb        /databases      ext3    defaults 0 0


S5 Box