Operating System - HP-UX
1833011 Members
2761 Online
110048 Solutions
New Discussion

Re: Removing VG and filesystems in SG

 
SOLVED
Go to solution
GTownes
Advisor

Removing VG and filesystems in SG

Hi All,

I am preparing to remove a vg and a couple filesystems from another vg. Just wondering if I need to stop SG to accomplish this, and if I need to sync up the nodes after removing the vg and filesystems from another vg.

Basically, I am going to:

1. Unmount the mount points to vg's in question
2. deactivate the one vg to be removed
3. vgexport the one vg to be removed
4. lvremove the filesystems in question from the other vg.

At this point I'm not sure what further steps need to be taken. Would I need to sync up both nodes now, by:
1. creating mapfiles of the two vg's
2. ftp the mapfiles to the alternate node
3. mkdir and mknod
4. vgimport the two vg's with the 2 mapfiles


Thanks,

G
4 REPLIES 4
Redhat
Trusted Contributor

Re: Removing VG and filesystems in SG

The steps will be like for vg removal:
1)halt the package corrosponsing to the vg
2)vgexport
3)cmdeleteconf -c -p

for LV removal:
1)remove the entry for corrosponding LV from package cntl file
2)lvremove

for extact steps you may need to present your current senario and requirement ..
Hope this will help

Rita C Workman
Honored Contributor
Solution

Re: Removing VG and filesystems in SG

You do not need stop SG for this.

I am going to assume you have more than just this volume group - and that anything that might be using these file systems is stopped !! If your package is up and running (which it can be) you can do it live and then just do a quick fix when you stop/restart it. If it's stopped then you can do it all at same time.

On the box that has these mountpoints (remember on that box the vg is set to exclusive mode)

1. umount all / you want to take down.
2. lvreduce the lvols
3. lvremove the lvols
4. vgreduce the volume group
5. vgremove the volume group
6. Edit the package:
If pkg is running - edit the pkg.cntl file to take out the removed mountpoints. NOTE!!! You may have to go back and fix the mount order numbers for each mountpoint entry to put them back in numerical order after you stop the pkg.
If pkg is not running - edit the pkg.cntl file to take out the removed mountpoints & fix the mount order numbers for each mountpoint entry to put them in numerical order BEFORE you try to restart the pkg.
LV[0]
FS[0]
FS_MOUNT_OPT[0]
The zero is the mount order number and must run sequentially correct throughout your pkg.cntl file.
7. Edit the cluster.ascii file and remove the volume group you removed
8. cmcheckconf -v -P pkg.ascii
When it runs clean - run
cmaplyconf -v -P pkg.ascii
9. cmcheckconf -k -v -C cluster.ascii
When it runs clean - run
cmapplyconf -k -v -C cluster.ascii

Now go back to the box you reduced lvols on, but left the volume group.

vgexport -pvs -m /etc/lvmconf/vgname.map /dev/vgname

remote copy that mapfile to the other nodes.

On other nodes in cluster:

vgexport /dev/
vgexport /dev/

mkdir /dev/
mknod /dev/ c 64 0x
vgimport -vs -m /etc/lvmconf/vgname.mapmmddyy /dev/

All with the cluster (and pkg) up!

Hope this helps,
Rgrds,
Rita
Rita C Workman
Honored Contributor

Re: Removing VG and filesystems in SG

Oops...I forgot to mention on the one. You also need to:

On pkg:

Edit the pkg.cntl file and remove the volume group reference

VG[0]="remaining vg"
VG[1]="vg being removed"

Take out or rem out that line.

Save the file.

/rcw
GTownes
Advisor

Re: Removing VG and filesystems in SG

Hi,

Perfect. Thats exactly what I was looking for.

Thanks for the replies.

G