System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the LUN of one HP-UX server to another server

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to use the LUN of one HP-UX server to another server

Hi All,

I have one HP-UX 11.11 server with some LUN (SAN disks).

Now i want to use the LUN linked with one HP-UX server in another HP-UX server.

Actually we are going to scrap the old HP-UX server.

How to use that LUN in new HP-UX server with all VGs and LVs and data intact.
25 REPLIES
Pete Randall
Outstanding Contributor

Re: How to use the LUN of one HP-UX server to another server

I'm assuing that both servers have connections to this SAN. If so, run vgexport against all the VGs on the original server (you can run in preview mode if you're not ready to actually disconnect), transfer the map file to the new server and run vgimport. You need to create device files first:

mkdir /dev/vgNN
mknod /dev/vgNN/group c 64 0xNN0000
vgimport -s -m /tmp/vgNN.map /dev/vgNN
vgchange -a y /dev/vgNN


Pete

Pete
R.K. #
Honored Contributor

Re: How to use the LUN of one HP-UX server to another server

Hi Senthil,

>> How to use that LUN in new HP-UX server with all VGs and LVs and data intact.


I *think* you have to:

- Create mapfiles of VGs in old server.
- Present LUNs from san side to the new server.
- Transfer the mapfiles to new server
- vgimport these VGs on new server.

This should solve the issue.
Don't fix what ain't broke
Gordon Sjodin
Frequent Advisor

Re: How to use the LUN of one HP-UX server to another server

I would use:

vgexport -pvs -m /tmp/vg01.map /dev/vg01
on the source and then rcp the file to the other node.

On the other node:

Vgexport /dev/vg01
Umask 655
Mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -vs -m /tmp/vg01.map /dev/vg01

singh sanjeev
Trusted Contributor

Re: How to use the LUN of one HP-UX server to another server

i will recmonned,

first vgexport:

vgexport -pvs -m /tmp/vg01.map /dev/vg01
on the source and then rcp the file to the other node.

Request SAN storagee team to make them avail to new server .
On new node:

Vgexport /dev/vg01
Umask 655
Mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -vs -m /tmp/vg01.map /dev/vg01
Sanjeev Singh
Shailendran V Naidu
Frequent Advisor
Solution

Re: How to use the LUN of one HP-UX server to another server

Hi Senthil,
a. Create a map file for the VG you want to remove, say NODE1:
# vgexport -p -s -v -m /tmp/vgxx.map /dev/vgxx
b. identify the UUID of the LUN and the Port WWN of the port the LUN is currently assigned to and will be assigned to:
ex : if you use IBM sdd "datapath query devices" will give the UUID of the VPATH you want to remove and "datapath query wwpn" or "fcmsutil /dev/tdx" will give the WWPN of the FC adapter port to which the LUN is assigned.
c. scp or ftp or rcp the map file to Node 2 where you want to move the LUN to.
d. unmount all the LVs and remove the VG permanently from Node1
# vgexport vgxx.
e. Disassociate the lun from the Port on Node1 and zone it to the port on Node 2. SAN storage team should be able to tell you how. the procedure Varies according to Storage Brand.
f. On Node 2 import the VG:
# ioscan -f
# ioscan -funC disk
# insf -eC disk
If you are using SDD "datapath query devices" will give the UUID of the VPATH you have just added.
# mkdir /dev/vgxx
# mknod /dev/vgxx/group c 64 0xMM0000 <- MM is the minor number you want to use.
# vgimport -s -v -m /tmp/vgxx /dev/vgxx
# vgdisplay vgxx <-- if it says not active use vgchange -a y vgxx - Cant remember if it will activate after you import-->
You can then start mounting the LVs.

All the Best!
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi Gordon Sjodin and singh sanjeev,

Why are you doing "Vgexport /dev/vg01" in another node.

Why it is required?
Pete Randall
Outstanding Contributor

Re: How to use the LUN of one HP-UX server to another server

The vgexport needs to be done on the node originally owning the LUN, not on the node acquiring the LUN.


Pete

Pete
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi All,

How to find the UUID of the local disk and LUN (SAN disk)?

What is the command in HP-UX?

What is the purpose of "# insf -eC disk"?
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi Pete Randall,

So we have to execute "vgexport vgXX" in source server after unmounting LV, then removing the LV, and then removing the vgXX, Am i correct?

Is it a custom that we have to run "vgexport vgXX in source or is there any special purpose to this?
Gordon Sjodin
Frequent Advisor

Re: How to use the LUN of one HP-UX server to another server

The vgexport command on the source server is done to export all of the logical volume information.
After you have imported the vg onto the new server make sure you run a vgexport again on the source server to remove the volume group otherwise you could have two systems accessing the file system at the same time.
Torsten.
Acclaimed Contributor

Re: How to use the LUN of one HP-UX server to another server

>> removing the LV, and then removing the vgXX, <<

Be careful, remove the LV and VG means deleting the data!

vgexport will remove all the configuration information from the server, but not from the data disks.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Rita C Workman
Honored Contributor

Re: How to use the LUN of one HP-UX server to another server

I will presume you are NOT in a failover environment.

First, make sure that the lun is 'masked' over to the new server. This is SAN work. Confirm that every disk is masked to that new server and device files were created.

Next...with the old server up and seeing the disk, run the commands that Pete and others gave you to create mapfiles (vgexport).
On the new node run the commands to mkdir/mknod & vgimport. Stop - don't run vgchange just yet.

Umount all f/s affected on the old server, and then run vgchange -a n /dev/.

Now your data is still there on the disk.

Now go over to the new server. You already ran vgimport command, so now just run vgchange -a y /dev/ and see if you can manually mount the f/s.
Once all is up okay and mounted, remember to add to your /etc/fstab.

When your done with the old server - then from the old server you can do the cleanup if you like:
vgexport /dev/ removes it from /etc/lvmtab
remove entries from /etc/fstab
'unmask' disks from old server

Rgrds
Rita
Rita C Workman
Honored Contributor

Re: How to use the LUN of one HP-UX server to another server

Boy you think you didn't miss a step.

Before you run vgchange -a y on the new server, go to the old server and run vgchange -a n

ok...now I'm done

Rita
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi All,

1)Shall i change the name of VG in destination.

For exampled:

In source = /dev/vg01

In destination = /dev/vg04

Is it possible?

2)Has both major and minor numbers to be same?

Rita C Workman
Honored Contributor

Re: How to use the LUN of one HP-UX server to another server

You can change the minor number and/or the volume group name on the new server.

Rita
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi All,

I have some following questions:

1)Do we need to map all the LUNs to destination server if the VG is having lot of LUNs in source?

2)Can we map one LUN of VG (that VG is having more LUNs in source) to destination and get the LVs of that LUN in destination?

3)What i have to do if i want failover, plesase explain the steps?
Gordon Sjodin
Frequent Advisor

Re: How to use the LUN of one HP-UX server to another server

You may want to consider just doing a backup and restore if you want to be selective of the data set.
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Colud you please answer my questions one by one.
sujit kumar singh
Honored Contributor

Re: How to use the LUN of one HP-UX server to another server

Hi



1)Do we need to map all the LUNs to destination server if the VG is having lot of LUNs in source?

yes you need to do, otherwise there cane be few disks in the new Vg on new node and there shall be problems of VG activation if quorum check fails.

2)Can we map one LUN of VG (that VG is having more LUNs in source) to destination and get the LVs of that LUN in destination?

it depends how that lun is having data on that.
if that LUN is a part holding any spanned or striped logical volume, you will not get the data on that if you try to use that as it shall not find other members of the Stripped/ spanned LV. so you shall corrupt data.

also say the source VG has 4 LUNs and you use only 1 LUN for Impoerting in a new VG, the VG shall fail quorum check on activation.

if you have 2 LUNs and all the LVs on that LUN are non-striped as well as non-spanned and the LVs on one LUN are mirrored to that on the second LUN and assuming this is not a root VG, you can use one LUN to import VG and activate the VG in quorum override mode and may get the data.

so this is all that "depends".


3)What i have to do if i want failover, plesase explain the steps?

can you be more clear for this question, what type of failover?


regards
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi sujit kumar singh,

I am new to failover / cluster environment.

I have some questions:

1)What type of failover available in HP-UX?

2)what type of cluster available in HP-UX?

3)What is purpose of smart (i forget the name come in trailer), i think it is cluster software?
Steven E. Protter
Exalted Contributor

Re: How to use the LUN of one HP-UX server to another server

Shalom again,


1)What type of failover available in HP-UX?
Do it yourself
Service Guard. A fully integrated suite of tools to run applications in high availability mode.
Auto Port Aggretation, network card teaming

Both SG and APA are licensed products that require increased support and codes to unlock the software.


2)what type of cluster available in HP-UX?
From HP Active-Passive.
With Oracle tools and shared storage Active-active clustering is possible, even without SG.


3)What is purpose of smart (i forget the name come in trailer), i think it is cluster software?

Sorry no idea. I'm not smart i guess. Google has access to way more information than my pea brain molecules.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi Steven E. Protter,

Could you please provide detail the docs for

1)Service Guard

2)Auto Port Aggretation

3)network card teaming

I need the docs to above mentioned software for following purpose:

1)How to configur

2)what is the difference

3)Advantages and disadvantages
Torsten.
Acclaimed Contributor

Re: How to use the LUN of one HP-UX server to another server

All on http://docs.hp.com

http://docs.hp.com/en/oshpux11i.html#Serviceguard

http://www.hp.com/products1/serverconnectivity/adapters/apa_prodbrief.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
senthil_kumar_1
Super Advisor

Re: How to use the LUN of one HP-UX server to another server

Hi All,

Can i use same above method in Redhat and Suse linx to use the VG of one server in another server?

So can i use above procedures for this?