LVM and VxVM

vgexport vgimport on shared LUN hpux 11.31

 
Mydheen
Occasional Contributor

vgexport vgimport on shared LUN hpux 11.31

Hi,

 

I am facing one issue on vgexport, vgimport regarding. Os is hpux 11.31. I have a mount point /ggate on server 86.11, and this is created using only one lun of 500gb. the mount point was working fine. later we have shared this lun with server 86.12 through storage.

means the LUN ID of this LUN is same on both the servers 86.11 & 86.12, and the disk device file will appear different.

 

i wanted this mount point to be activated on one server at any point of time using the shared lun. incase if i have any maintenace on server A, i need to mount this /ggate on server B. hence i followed the below procedure of vgexport, vgimport.

 

on first server 86.11 :

vgexport -v -p -s -m /tmp/vg_ggate.map vg_ggate

scp -p /tmp/vg_ggate.map <userid>@172.20.86.12:/tmp/

 

strings /etc/lvmtab (in the output of strings /etc/lvmtab, I could see /dev/vg_ggate)

 

then in the second server (86.12):

 

chown root:sys /tmp/vg_ggate.map

chmod 755 /tmp/vg_ggate.map

 

mkdir /dev/vg_ggate

mknod /dev/vg_ggate/group c 64 0x070000  (with same major and minor number as like 86.11 server)

 

vgimport -v -m /tmp/vg_ggate.map /dev/vg_ggate /dev/rdisk/disk6  (here i did not use the -s option as i am mentioning the disk name)

 

bash-4.3# cat /tmp/vg_ggate.map

VGID 794cba5455e98098

1 ggate

 

vgchange -a r /dev/vg_ggate

 

vgcfgbackup /dev/vg_ggate

 

vgchange -a y /dev/vg_ggate

 

mount /dev/vg_ggate/ggate   /ggate

 

bash-4.3# cd /ggate    (here i am checking the data available, but i could not able to see the datas)

bash-4.3# ls -lrt

total 0

drwxr-xr-x   2 root       root            96 Sep  4 14:32 lost+found

bash-4.3#

 

here when I checked, the datas are not present under /ggate

 

I hope that is enough only to use (-p –v –s –m ) option when I export from 86.11 (source server). I have not done # vgexport /dev/vg_ggate from 86.11

 

 

Now, as there is no datas available in the server 86.12 mount point /ggate,  I have unmounted in 86.12, deactivated the VG, and did # vgexport   vg_ggate.map  /dev/vg_ggate

 

Then tried to activate the VG on 86.11, and mounted the /ggate, but there also datas are not appearing. 

kindly seek your expert advice, as i dont have any backup for this mount point. This is a production server too. this mount point was created recently.

 

Regards,

mydheen

 

3 REPLIES 3
Torsten.
Acclaimed Contributor

Re: vgexport vgimport on shared LUN hpux 11.31

Looks like you mounted the LUN in r/w mode on both servers?

 

Unless you have a shareable filesystem you will destroy the data that way.


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!   
Mydheen
Occasional Contributor

Re: vgexport vgimport on shared LUN hpux 11.31

Hi Torsten,

 

I want to share the filesystem b/w both the servers. Active at a time on one server only. the lun is already shared between both the servers.

i believe vgexport, vgimport is the only way to achieve this.

 

please let me know the procedure to do this. and kindly verify whether i have followed the correct procedure or not.

 

note: the file system was created first, then after a month only we have shared the lun to the other server. and we tried doing this vgexport, vgimport.

 

regards,

mydheen

Torsten.
Acclaimed Contributor

Re: vgexport vgimport on shared LUN hpux 11.31

Sharing a LVM LUN and a file system is something complete different.

 

You shared the LVM LUN already (vgexport in preview mode, then vgimport).

 

Usually you activate the LUN (VG) in exclusive mode, one server at a time.

 

But take care, the standard file system inside the LUN is not shareable, this means if both servers have write access at the same time they will sooner or later destroy your data completely!


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!