Operating System - HP-UX
1833030 Members
2492 Online
110049 Solutions
New Discussion

Need to remove an lv from cluster

 
SOLVED
Go to solution
Sreer
Valued Contributor

Need to remove an lv from cluster

Hi Gurus,
I need to remove an lv from my cluster.
I have some theoretical knowledge regarding this.

I prepared a master plan for this and is pasted below.

login to the pkg/node where the concerned Vg is active.

1. Un export the FS if its in HANFS !!!

exportfs -u /fsname

2. Check filesystem isn’t used or kill processes if necessary

fuser -cu /fsname

3. umount the fs ==> umount -f /data

4. delete the mount point

rmdir /fsname

5. remove lv ==> lvremove -f /dev/vgname/lv

6. export the VG in preview mode:

7. /usr/sbin/vgexport -p -v -s -m /tmp/vgname.map /dev/vgname

8. rcp the map file to other node => rcp -p /tmp/vgname.map nodeB:/tmp/


9. note vg control file and create in other node

In other nodes: [ node B]
==============

/usr/sbin/vgexport -s -m /tmp/vgname.map /dev/vgname

remove the mount directory

rm -r /dev/vgname

Create VG control file

/usr/sbin/mknod /dev/vgname/group c 64 0xXy0000

Import VG:

/usr/sbin/vgimport -s -m /tmp/vgname.map /dev/vgname


In current node:[Node A]::
==========================

modify pkg.sh /pkg.cntl file

rcp both modified files to all nodes

Modift hanfs.sh

rcp the hanfs.sh to all nodes

In Node [B]::
=============

Activate vg in Read only mode and check.

Could you pls advice me the mentioned steps are perfect and Can I use it for the activity? Incase any change needed pls correct me.
Thanks in advance.

Rgds
Sree





2 REPLIES 2
Sreer
Valued Contributor

Re: Need to remove an lv from cluster

Hi Gurus,

A small correction:

In other nodes: [ node B]
==============

/usr/sbin/vgexport -s -m /tmp/vgname.map /dev/vgname

create the mount directory [ I mentioned as delete]

mkdir -p /dev/vgname

Create VG control file with same minor nos.

/usr/sbin/mknod /dev/vgname/group c 64 0xXy0000

Import VG:

/usr/sbin/vgimport -s -m /tmp/vgname.map /dev/vgname

g3jza
Esteemed Contributor
Solution

Re: Need to remove an lv from cluster

Hi,

Starting from these steps:
...
7. /usr/sbin/vgexport -p -v -s -m /tmp/vgname.map /dev/vgname
---> that's ok
8. rcp the map file to other node => rcp -p /tmp/vgname.map nodeB:/tmp/
--> you are going to copy the mapfile to other node/nodes under /tmp/vgname.map

9. note vg control file and create in other node

In other nodes: [ node B]
==============

/usr/sbin/vgexport -s -m /tmp/vgname.map /dev/vgname
--> here's the problem which is connected with step 8. You would rewrite your current UPDATED mapfile, which you created in step 8.
So be carefull about this. So I would just do
#vgexport vgname
on the node B, which should have the VG inactive at this time. Then continue vgimporting the current/latest mapfile from the first (active) node.