VERIFY THAT THE ROOT DISKS TO REMAIN UNTOUCHED ARE IN H/W PATH 0/0/0 & 1/0/0ioscan -funC disk
Add discs to be smashed:for x in `ioscan -funC disk | awk {'A=$1;B=$3;C=$7;D=$8;getline;E=$1;F=$2;print B,F}' | grep -v 0/0/0 | grep -v 1/0/0 | awk '{print $2}'`
do pvcreate -f $x
doneMake a new Smash-It volume group:mkdir /dev/vgsmashit && mknod /dev/vgsmashit/group c 64 0x040000
(if fails, increment by 10000, e.g. 0x050000; 0x060000)
rm -Rf /dev/vgsmashit && mknod /dev/vgsmashit/group c 64 0x050000
rm -Rf /dev/vgsmashit && mknod /dev/vgsmashit/group c 64 0x060000
Add discs to be smashed to the volume group you just created, and give them a physical volume group name:for x in `ioscan -funC disk | awk {'A=$1;B=$3;C=$7;D=$8;getline;E=$1;F=$2;print B,E}' | grep -v 0/0/0 | grep -v 1/0/0 | awk '{print $2}' | grep dsk`
do vgcreate -g pvgsmashit vgsmashit $xMake empty placeholder volumes, striped across your new pvg:x=`vgdisplay -v vg00 | grep "LV Name" | grep lvol | awk '{print $3}'| wc -l`
while [ $(ls /dev/vgsmashit/lvol* | wc -l) -lt $x ]
do lvcreate -D y -s g /dev/vgsmashit
doneInflate your volumes using 1024 blocks of "Free PE" integer from vgdisplay vgsmashit output:typeset -i I
I=1
x=1024
while [ $( vgdisplay vgsmashit | grep "Free PE" ) -gt 1024 ]; do
lvextend -l $x /dev/vgsmashboot/lvol$I pvgsmashit
I=$(( I + 1 ))
done For every logical volume found in /dev/vgsmashit, create a filesystem on it and mount it:for FILE in /dev/vgsmashit/lv*
do DIR=$( print $FILE | sed -e "s#/dev/vgsmashit/##" ) mkdir /tmp/$DIR mount -F vxfs $FILE /tmp/$DIR
donePlace the smash-it executable into the root filesystem, then run this command:for x in `vgdisplay -v vgsmashboot | grep lvol | awk -F '/' '{print $4}'` ; do
FS=/tmp/$x
typeset -i I
I=0
while [ $( bdf $FS | grep -iv avail | grep -iv smashit | awk '{ print $3 }' | tr -d '%' ) -gt 0 ]; do
dd if=/dev/zero of=$FS/smash$I bs=1024k seek=1024 count=1
nohup /smash-it $FS/smash$I > /dev/null &
I=$(( I + 1 ))
done
Unmount the smashed filesystemsumount /tmp/lvol*
Remove extents from the smashed logical volumesfor x in `cat /etc/lvmpvg | grep dsk`
do lvreduce -f -l 0 $x
doneRemove the smashed logical volumesfor x in `vgdisplay -v vgsmashit | grep lvol | awk '{print $3}'`
do lvremove -f $x
doneRemove the physical volumes from the smashed volume groupfor x in `cat /etc/lvmpvg | grep dsk`
do vgreduce vgsmashit $x
doneRemove the smashed volume groupvgremove vgsmashit
...
So that's the entire thing all put together.
I've not completed that last part yet.
Thanks for your help drax0r.