Operating System - HP-UX
1833502 Members
2802 Online
110057 Solutions
New Discussion

Re: Need to add a disk to a VG contolled by MCSG

 
SOLVED
Go to solution
Filipe_1
Frequent Advisor

Need to add a disk to a VG contolled by MCSG

Hi Forumers,

First of all, I´m not a MCSG specialist at all, and we have an emegerncy here.

We need to insert a new disk to a VG controlled by MC ServiceGuard. We have to do it without disruption of the application, but I can stop the cluster if needed.

The fact is: I can't unredistribute without making the VG unavailable. I really need to insert a new disk to the VG even if the cluster is compromised (we'll work on it later).

Any good soul could guve us a hint? We need to make room to acommodate new volumes.

Thanks in advance,

Filipe
4 REPLIES 4
KapilRaj
Honored Contributor

Re: Need to add a disk to a VG contolled by MCSG

so i am (not an mcsg expert) but hv worked on other clusters .. so to me if you can compromise cluster it would be ..

twintail the disks
insf
vgextend to add the new disk
newfs / extendfs / fsadm
Basically on the standby node we will need to import the vg definitions .. i.e. don't vgchange -a y .. but we can do it later...

Kaps
Nothing is impossible
Suraj_2
Valued Contributor
Solution

Re: Need to add a disk to a VG contolled by MCSG

Hi

To add the disk to the Cluster System , no need to stop the cluster, but u may have to stop the package in whcih u are adding the disk

Please find tha attached procedure

Rgds
Suraj
David de Beer
Valued Contributor

Re: Need to add a disk to a VG contolled by MCSG

Filipe,

It's pretty straight-forward and you should not run into hassles at all. What you are trying to do is fully supported for both RAW devices and filesystems controlled by MCServiceGuard.

The main thing to remember is to vgexport your VG info to a map file, and then import it on the other 'secondary' nodes that you are running your package on.

This is a script that we use to simplify the process - we automate it via crontab to run everyday - so should we add an oracle raw volume, or make changes to a filesystem - it will also be on our failover node the next day. (We usually run it manually anyway after we modify anything).

We use scp, but you can also automate it for rcp or ftp.

vg_export script, sits on 'primary' node:
#!/bin/ksh
for vg in `ll /dev | grep | awk '{print $9}'`
do
/usr/sbin/vgexport -s -p -m /etc/cmcluster/$vg.map /dev/$vg
done
/usr/local/bin/scp /etc/cmcluster/*.map :/etc/cmcluster

vg_import script, sits on 'secondary' nodes:
#!/bin/ksh
#mv /etc/cmcluster/*.disk /etc/cmcluster/disks > /dev/null
cmviewcl | grep | grep > /dev/null
x=$?
if [ $x -ne 0 ]
then
echo " package is NOT running on "
for VgName in `ll /dev | grep | awk '{print $9}'`
do
minor=`ll /dev/$VgName | grep group | awk '{print $6}'`
vgexport /dev/$VgName
mkdir /dev/$VgName
mknod /dev/$VgName/group c 64 ${minor}
vgimport -v -s -m /etc/cmcluster/$VgName.map /dev/$VgName
echo $VgName
chown oracle:dba /dev/$VgName/r*
chmod 755 /dev/$VgName/r*
done
chmod 777 /dev/vg_gens*
else
echo " package IS running on "
echo " Sorry cannot perform the required function"
fi

Regards,
David de Beer
Geoff Wild
Honored Contributor

Re: Need to add a disk to a VG contolled by MCSG

You can add disks on-the-fly to MC/SG without an outage....

First - this is a great doc:

http://docs.hp.com/en/B3936-90079/index.html

On the node with the package running:

ioscan -funC disk >/tmp/ioscan-funC.disk.current
Add the disk (hot swap or on a SAN)...
ioscan -fnC disk
insf -C disk
ioscan -funC disk >>/tmp/ioscan-funC.disk.new

diff >/tmp/ioscan-funC.disk.current
>/tmp/ioscan-funC.disk.new

Those are the new devs...extend them into the vg
vgextend /dev/vgXX /dev/dsk/cXtXdX
lvextend your lvol(s)

Then create a map file for other node(s)

vgexport -p -s -v -m /tmp/vgXX.map /dev/vgXX

Copy that file to the other node(s)

On the other node(s):

vgexport /dev/vgXX
mkdir /dev/vgXX
mknod /dev/vgXX/group c 64 0xHH0000

(where XX is the vg number and HH is the Hex equivalent)

vgimport -s -v -m /tmp/vgXX /dev/vgXX

Done!

Rgds...Geoff





Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.