2021-01-18

ehowton: (Default)
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
# if adding single-disk, just /etc/vx/bin/vxdisksetup -I sde (no /dev, for example)
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
# if adding single-disk, just vxdg init vgDISK4 sde=sde (for example)
# vxprint -htg vgDISK4 (helpful command to identify size): bold, italics below
#
# dm sde sde auto 65536 978688 -

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 (use size from above)
/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:
ehowton: (TRON)
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:

June 2025

S M T W T F S
1 2 3 4 5 6 7
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Expand Cut Tags

No cut tags