Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent: unmirror volume group 1

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi folks,

we're using a mirrored rootvg in one of our system.
Yesterday one of the two disks (hdisk1) got a disk_err1 and needs to be replaced.

I'm trying to unmirrorvg via smitty but it's quite confusing.

I have to specify a disk for the volume group as well as number of lp copies ...

Is the disk I have to enter here the one that is supposed to be thrown out of the mirror or do I have to specify the disk that shall remain ?

Thanks in advance ...

Regards,
Thomas
 
according to smit :
Code:
                                             Remove Copies from a Logical Volume

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
* LOGICAL VOLUME name                                 lvoracle
* NEW maximum number of logical partition             2                                                                     +
    copies
  PHYSICAL VOLUME name(s) to remove copies from      []                                                          
           +

looks like you have to specified the on you want to removed

 
the one that is supposed to be thrown out of the mirror
 
Here is a script I wrote to take care of it. I ended up writing this when we went through the "IBM bad disk" phase on one of our larger sp complexes.

Look it over and see if it might be what you want to use. Then again, I always use the command line. So smitty may be easier. Don't know.

##################################################
# #
# This script is used to prepare a node for the #
# replacement of an hdisk. It will remove all #
# logical volume mirrors from the disk, modify #
# the boot list, remove the disk from the rootvg #
# volumegroup, and remove the disk from the #
# logical hardware configuration. #
# #
# Written by Rich Hickey #
# Date 19 Aug 2001 #
# Revision 1.0 #
# #
# History:
# -------
# 2002-05-07 kac uncomment 'enter to continue' prior to rmdev
# 2001-12-20 gm Add odm check to make sure device is truly gone
##################################################


TMPDIR=/tmp

# Find out which disk to remove #
##################################################
clear
echo ""
echo ""
echo ""
echo "Which disk needs to be removed? ie) hdisk0 or hdisk1 "
echo ""
read gonner


# Verify the validity of the choice #
##################################################
if [[ "$gonner" != hdisk[0-1] ]]
then
echo "That is an invalid disk"
echo "Please start over"
exit
fi


# Set keeper disk #
##################################################
if [[ "$gonner" = hdisk0 ]]
then keeper=hdisk1
else keeper=hdisk0
fi


# Report on gonner and keeper. Get verification. #
# If response is not yes then abort #
##################################################
echo "the disk to remove is :" $gonner
echo "the disk to keep is :" $keeper
echo "If this is correct enter y. Any other key to exit"
read answer
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]
then
echo "You did not select y or Y. Exiting"
exit
else
echo ""
fi


# Changing bootlist to boot from keeper first #
##################################################
# clear
echo ""
echo ""
echo ""
echo "Changing bootlist to boot from $keeper first"
echo "---------------------------------"
#echo "Hit enter to continue or ctrl-c to abort"
#read
echo "bootlist -m normal $keeper $gonner"
bootlist -m normal $keeper $gonner


# If Gonner is hdisk1 then remove sysdump device#
##################################################
#if [[ "$gonner" = hdisk1 ]]
# then
# echo "Removing sysdumpdev from hdisk1"
# sysdumpdev -p /dev/sysdumpnull
# fi


# Get a list of all Logical Volumes to remove #
# and remove all logical Volumes from gonner #
##################################################
echo ""
echo " Removing logical volume mirrors from $gonner"
echo "---------------------------------"
#echo "Hit enter to continue or ctrl-c to abort"
#read
for logicalvol in `lspv -p $keeper|awk 'NF==7 {print $5} NF==6 {print $4}'|sort -u`
do
echo "rmlvcopy $logicalvol 1 $gonner"
rmlvcopy $logicalvol 1 $gonner
done


# Remove $gonner from the rootvg Volume Group #
##################################################
echo ""
echo " Removing $gonner from rootvg"
echo "----------------------------"
#echo "Hit enter to continue or ctrl-c to abort"
#read
echo "reducevg rootvg $gonner"
reducevg rootvg $gonner


# Remove gonner from the hardware configuration #
##################################################
echo ""
echo "Removing $gonner from the hardware configuration"
echo "-----------------------------------------------"
echo "Hit enter to continue or ctrl-c to abort"
read
echo "rmdev -dl $gonner"
rmdev -dl $gonner


# Check the odm to see of all traces of $goner are gone #
#########################################################
echo " "
echo "Checking the customized attributes class (CuAt) in the odm "
echo "for remnants of $goner"
echo "Hit enter to continue or ctrl-c to abort"
read
echo "/bin/odmget -q\"name=$goner\" CuAt"
/bin/odmget -q"name=$goner" CuAt > $TMPDIR/odmget.pre.$$
LN_CNT=`/bin/cat $TMPDIR/odmget.pre.$$ | /bin/wc -l`
if [ $LN_CNT -eq 0 ]; then
echo "The odm is clean, $gonner is now ready to be replaced by the IBM CE. "
else
echo " "
echo "odmget returned this output:"
echo " "
cat $TMPDIR/odmget.pre.$$
echo " "
echo "Resolve this prior to continuing with the disk replacement."
fi

echo " Good luck and may the force be with you!"






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top