#!/bin/bash

#create physical volume
if [ $# -eq 1 ]; then
	str=$1
	dev=${str:0:8}
	num=${str:8}
#	echo "dev: ${dev}"
	parted $dev set $num lvm on
	pvcreate $1
	pvs
	pvdisplay
#extern volume group
	vgextend LVM $1
	vgdisplay
#logic volumn	
	lvextend  -l +100%FREE  /dev/LVM/lvdisk
#take effect	
	resize2fs  /dev/LVM/lvdisk
else
	echo "Usage:saturn-lvm-extend.sh /dev/sdx1"
fi






 
