ehowton (ehowton) wrote,
ehowton
ehowton

Create Veritas Volumes

scripts]$ cat vxcreate1
x=0
while [ $x = 0 ]
do

clear
echo "Initialize all Veritas disks press 1"
echo "Create a vg and extend disks into it press 2"
echo "Create specific sized LV on specific disks and format press 3"
echo "Press 6 to exit"
read input1

case "$input1" in

1)
> vxcreate.out
vxdisk list
vxdisk list | grep -i emc-vplex1_ |awk '{print $1}' > vxcreate.out
for i in `cat vxcreate.out`
do
/etc/vx/bin/vxdisksetup -i $i
done
;;

2)
./stuff.pl
echo "Enter VG name"
read VGname
echo "Enter disk"
read disk0
echo "Enter Disk Name"
read disk1
vxdg init $VGname $disk1=$disk0

w=0
while [ $w = 0 ]
do
echo "Would you like to add another disk to the VG?"
read stuff1
case "$stuff1" in
y)
#echo "Enter VG name"
#read VGname
echo "The VG name is $VGname"
echo "Enter disk"
read disk0
echo "Enter Disk Name"
read disk1
vxdg -g $VGname adddisk $disk1=$disk0
;;
n)
w=1
;;
*)
echo "Invalid Choice"
sleep 1
;;
esac
done
;;

3)
vxdisk list
echo "Enter VG name"
read VGname
echo "Enter LV name"
read LVname
vxdg -g $VGname free
echo "Enter LV size as 10G or in blocks"
read LVsize
echo "Enter the disk"
read Disk
vxassist -g $VGname make $LVname $LVsize $Disk
/usr/lib/fs/vxfs/mkfs -t vxfs -o largefiles,bsize=8192 /dev/vx/rdsk/$VGname/$LVname
echo "Enter the Mount Point"
read mountp
echo "/dev/vx/dsk/$VGname/$LVname $mountp vxfs defaults,_netdev 0 0" >> /etc/fstab
mkdir $mountp
mount $mountp
;;

6)
echo exit
x=1
;;
*)
clear
echo "not a valid option"
sleep 2
;;
esac
done
Tags: #echo, #read, linux, unix, veritas
Subscribe

  • Guardians of the Galxay

    Word of mouth can be a powerful thing. Not having seen a single trailer (and not knowing anything about the film whatsoever), I did something…

  • photogoot

    My children do not call my mother, "Gram Gram" nor did she teach them it is better to be good, "than to not." Nonetheless, I remind them of this so…

  • Dancing in the Street

    During a lunchtime high school conversation my friend and neighbor Jesus Valdez mentioned he had seen me dancing in the street. Naturally, I looked…

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments