Operating System - HP-UX
1833345 Members
4533 Online
110051 Solutions
New Discussion

add one more new file system to a volume group in serviceguard

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

add one more new file system to a volume group in serviceguard

I want to add one more file system into a existing share volume group in SG environment
which means that I don’t need to do steps to create a vg. On primary node, I just need to do these usual steps to create the new file system, and manually mount it on a new mount point. I also need to add this new mount point into the package control script. Now my question is following:

1. how to change the pkg script file on adoptive node? Should I manually add the new mount point into the control script on adoptive node, copy the script file from primary to adoptive node, or either way doesn’t really matter?
2. when I do vgimport -v -s -m /tmp/vgshared.map /dev/vgshared on the adoptive node, I am getting the message:
vgimport: Volume group "/dev/vgshared" already exists in the "/etc/lvmtab" file.
What is the right way to reflect the change on the adoptive node.
3. the only way to test mounting the new file system, is to deactivate the package and reactivate the package which should wait until next system maintenance window. Am I right?

Thanks for your inpu
none
12 REPLIES 12
RAC_1
Honored Contributor

Re: add one more new file system to a volume group in serviceguard

Hanry,

Be careful in what you do. Read throughly. the procedure should be as follows.

1. Add fs in vg.
2. vgexport -p -vs -m /tmp/vgxx.map /dev/vgxx
3. Put the file on adaptive node.
4. On adaptive node, vgexport /dev/vgxx
5. vgimport -pvs -m /tmp/vgxx.map /dev/vgxx
6. If all OK, vgimport -vs -m /tmp/vgxx.map /dev/vgxx

Though steps 2-6 are not required, when package switches to alternate node, it takes care of all those things.

Anil
There is no substitute to HARDWORK
Sanjay_6
Honored Contributor
Solution

Re: add one more new file system to a volume group in serviceguard

Hi Hanry,

if you are just creating a filesystem and not adding any new pvs to the VG, then this is what you can do.

create the lv on the node on which this VG is currently active. Note down the major & minor number for this lv in /dev/vg_name for both the block device and the character device. Create the device files on the adoptive node using mknod command.

Modify the package control file on the primary node to reflect the addition of this new lv and rcp /scp over this file to the adoptive node.

You can then test the failover if you want, but you should be good to go.

Hope this helps.

Regds
Kent Ostby
Honored Contributor

Re: add one more new file system to a volume group in serviceguard

Hanry -- check out the document :

UXSGLVKBAN00000012

http://www6.itrc.hp.com/service/cki/search.do?category=c0&mode=id&searchString=UXSGLVKBAN00000012&searchCrit=allwords&docType=EngineerNotes&search.x=44&search.y=7
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Hanry Zhou
Super Advisor

Re: add one more new file system to a volume group in serviceguard

Sanjay,

Your answer makes sense to me. So, I did the following on adoptive node:
mknod rlvol10 c 64 0x04000a
mknod lvol10 b 64 0x04000a
Also, remove copy the pkg control file to another node.

RAC,
Are you sure what you said is correct?
I have problems with your answers? First of all, if I just need to do step 1 in your answers, how the changes I made to LVM would be reflected on adoptive node?

Kent,
The thread you are referring to for the situation when I create a new shared "vg". That is not what I'm asking.
none
Kent Ostby
Honored Contributor

Re: add one more new file system to a volume group in serviceguard

Sorry .. should have been this doc:

UXSGLVKBAN00000008

http://www6.itrc.hp.com/service/cki/search.do?category=c0&mode=id&searchString=UXSGLVKBAN00000008&searchCrit=allwords&docType=EngineerNotes&search.x=44&search.y=7
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Rita C Workman
Honored Contributor

Re: add one more new file system to a volume group in serviceguard

Hanry,

RAC and Sanjay gave you 'somewhat' similar answers.
They both told you that you can do this with the package up and running.
They both told you (albeit worded differently) to create the fs (lvol info) on the primary node; to create a mapfile with vgexport and copy to the adaptive node(s); to then use the new mapfile on the adaptive nodes and re-create your vg there using vgexport and then vgimport of new mapfile.
And last....to copy your package control file to the adaptive nodes.

The one and only thing I couldn't find in their explanation was ...the obvious...
...After you create your new file system remember to edit your package control script on the primary node and then copy it to your remote hosts.

Rgrds,
Rita
Hanry Zhou
Super Advisor

Re: add one more new file system to a volume group in serviceguard


What I'm not so sure is the following comments RAC made in his response:
"Though steps 2-6 are not required, when package switches to alternate node, it takes care of all those things."

what he said seems to me is that the only thing I need to do is step 1, and I dont' need to worry about step 2-6, because all these things will be taken care of on adoptive node when the package is switched over. Is that right?
none
Hanry Zhou
Super Advisor

Re: add one more new file system to a volume group in serviceguard

Also, with Sanjay's response, I don't have to do vgimport/vgexport, all I need to do is to manually create a device files for the new created logical volume on the adoptive node. And plus, modify the control file on the primary node, and copy it over to the adoptive node.
none
Devender Khatana
Honored Contributor

Re: add one more new file system to a volume group in serviceguard

Hi,
Steps by Anil are not complete for a SG envoronment. As he no where mentioned to add it to control file which is actually required.

The error in vgimport what you get on adoptive node is bacause you have not done a vgexport prior to vgimport. Vgexport will remove entry from /etc/lvmtab file and vgimport will recreate it again alongwith creating files for new file system.

You can copy control file in order but both control files should be always same.

Yes the actual testing of a file system in SG environment is to start package and see bdf on that node.

HTH,
Devender
Impossible itself mentions "I m possible"
RAC_1
Honored Contributor

Re: add one more new file system to a volume group in serviceguard

I made a mistake in my eariler post. I was thinking that it is about adding a disk to vg. When ading a FS to package, as pointed by Rita, yes you need to modify package control and config scripts and push the changes on alternate nodes.

cmpplayconf and apply changes to that package only.

Anil
There is no substitute to HARDWORK
Hanry Zhou
Super Advisor

Re: add one more new file system to a volume group in serviceguard

The major difference here is that I dont' have to do vgexport/vgimport on either one of nodes. As Sanjay said, instead, after I have done everything on the primary node, what I can do is to create device files for the new created lv on the adoptive node. That's it following the same major and minor number on the primary node. No need to do vgexport and vgimport on the adoptive node.
none
Hanry Zhou
Super Advisor

Re: add one more new file system to a volume group in serviceguard

Just want to confirm with this approach:


"The major difference here is that I dont' have to do vgexport/vgimport on either one of nodes. As Sanjay said, instead, after I have done everything on the primary node, what I can do is to create device files for the new created lv on the adoptive node. That's it following the same major and minor number on the primary node. No need to do vgexport and vgimport on the adoptive node. "
none