Q: How to add more hard disk to LVM2 , and move data to the new one? I have one Volume Group (named system) with 2 Logical volumes (/dev/system/swap and /dev/system/root) in one Physical volume (/dev/sda2) .
I want to add one more hard disk to that VG that will extend the size of directory /opt/splunk/lib. It has had already data inside. 
So how can i do to use totally the new hard disk for that directory and move data from original LV to new LV that is created from the new hard disk ?
Thanks

A: Ok- First, if you add a second hard disk to a existing volume group, you take a big risk: any disks failure from that volume group will make all logical volume go unavailable. You will also not have any of the added benefit such as stripping. You would have to add a raid array (+2 drives minium, for raid 5), to see at least some kind of benefit. 
The only reason why you would want to add a drive to an existing volume group is if you would like to extend a specific partition. In the present case, you want to add a new one (give all the space to /opt/splunk/lib). 
I would suggest you do the following: 


*

*Identify the new HD (for the rest of the walkthrough, I'll take for granted you found /dev/sdb): 
ls /dev/sd*

*Create a new partition on the drive (could also use the whole device and jump that step)
fdisk /dev/sdb ;
New, Primary, ID:1, from Start, to End ;
Write

*Create a new physical volume
pvcreate /dev/sdb1

*Create a new volume group
vgcreate splunk /dev/sdb1

*Create a new logical volume (size 100gb, named splunk_lib, from the splunk volume group)
lvcreate -l 100g -n splunk_lib splunk

*Create a file system on the new logical volume
mkfs.ext4 /dev/splunk/splunk_lib

*Create a mount point & Mount the new filesystem 
mkdir /tmp/splunk_lib
mount /dev/splunk/splunk_lib /tmp/splunk_lib

*Stop splunk, sync lib directory
rsync -avz /opt/splunk/lib/* /tmp/splunk_lib/.

*Unmount, move and remount 
umount /tmp/splunk_lib ; mv /opt/splunk/lib /opt/splunk/old-lib; mkdir /opt/splunk/lib ; mount /dev/splunk/splunk_lib /opt/splunk/lib 

*Don't forget to add it to /etc/fstab (to be up at next reboot)
vi /etc/fstab or nano /etc/fstab

*Start splunk.
