Is creating a partition necessary for LVM?
Posted: Thu Dec 21, 2017 3:56 am
This is how I used to do to add new virtual HDD into my HMS volume thru LVM:
After adding a new virtual HDD, I run a scan:
If the above command is executed without any error messages prompted, run the next command:
(The output will indicate new hard-disk that was added /dev/sdh etc)
The newly added hard-disk was then insert into the HSM's LVM volume with the following commands:
However, my peer told me that I should create a partition first for the new HDD before adding it into the LVM volume: https://www.tecmint.com/extend-and-redu ... -in-linux/
After creating a partition, it will become /dev/sdh1:
What is the difference and impact between having LVM using HDD with partition and without? Does this apply to both Ubuntu and CentOS?
After adding a new virtual HDD, I run a scan:
Code: Select all
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
Code: Select all
fdisk -l
The newly added hard-disk was then insert into the HSM's LVM volume with the following commands:
Code: Select all
pvcreate /dev/sdh
vgextend volgrp2 /dev/sdh
lvextend -L +250G /dev/volgrp2/hsmvol
After creating a partition, it will become /dev/sdh1:
Code: Select all
pvcreate /dev/sdh1
vgextend volgrp2 /dev/sdh1
lvextend -L +250G /dev/volgrp2/hsmvol
What is the difference and impact between having LVM using HDD with partition and without? Does this apply to both Ubuntu and CentOS?