# scripts are only for Exchange learning and use!
# The current version of the script is 1.0. Implements the creation of physical volumes, removing, changing (enabling/disabling assignments), scanning, viewing features.
# The following will complement the management of volume groups and logical volumes and be integrated into a Linux LVM TOOL. Like the Smit of Aix. Although, it can only manage LVM.
# The script has been tested on red Hat Enterprise Linux 5.4 64bit. Applies in principle to Rhel 5 and Rhel 6.
# Welcome suggestions for improvement.
# Direct copy pay attention to punctuation. You can also download files through a micro-disk to avoid the problems caused by replication: Http://vdisk.weibo.com/s/zKW6M
#!/bin/bash
# Version 1.0
# author:xin23 http://weibo.com/231988
PV ()
{
Nextline ()
{
echo ""
}
Split ()
{
Echo '-----------------------------------------------------------------------'
}
Echotitle ()
{
echo "--------$Title-----------------------------------------"
}
Showpvfirstmenu ()
{
Echo '
Physical Volumn Main Menu
Input number to choose!
Create Physical Volumn ... 1
Remove Physical Volumn ... 2
Change Physical volumn ... 3
Show Physical volumn ... 4
Scan Physical Volumn ... 5
Exit ... 6 '
Nextline
}
Getchoice ()
{
Read-p ' Input Your Choice: ' Var
Nextline
}
Confirmoperate ()
{
Nextline
echo "Continue ... y
Return ... n "
Nextline
Getchoice
Nextline
Run
}