Go Back   The UNIX and Linux Forums > Homework and Emergencies > Emergency UNIX and Linux Support !! Help Me!!


Emergency UNIX and Linux Support !! Help Me!! Post your urgent questions here for highest visibility. Posting a new thread to this forum requires Bits. We monitor this forum to help people with emergencies, but we do not guarantee response time or answers. This forum is "best effort" only. Members who reply to posts here receive a bonus of 1000 Bits per reply.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-17-2012
Registered User
 
Join Date: Feb 2012
Location: India
Posts: 110
Thanks: 9
Thanked 2 Times in 2 Posts
Reuse a LUN

I have a LUN (From HP-Storage VA7110) that is claimed on 2 servers, but is in used in one of the VG on Server-1 .
Now I want to shut Server-1 and re-use that LUN on server-2 .


Code:
Server-1
Path-1 : /dev/rdsk/c4t0d1 
Path-2: /dev/rdsk/c6t0d1

Server-2
Path-1: /dev/rdsk/c5t0d1  
Path-2: /dev/rdsk/c4t0d1

Am new on HP-UX, confused with right steps .

1. Do I need to format LUN: /dev/rdsk/c4t0d1 before reuse with new VG on server-2
2. If need to format, what command I can use safely
3. Also I want alternate path to be available with new VG as well, so is below syntax is right .

On Server-2

Code:
# pvcreate -f /dev/rdsk/c5t0d1
# mkdir /dev/vg05
# mknod /dev/vg05/group c 64 0x050000 
# vgcreate -l 255 -p 32 -s 8 /dev/vg05   /dev/rdsk/c5t0d1   /dev/dsk/c4t0d1
# vgdisplay -v vg05

--Shirish Shukla

Last edited by Shirishlnx; 08-17-2012 at 07:58 AM..
Sponsored Links
    #2  
Old 08-17-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Location: Switzerland - GE
Posts: 4,633
Thanks: 118
Thanked 256 Times in 245 Posts
I suggest you do a
Code:
 pvdisplay -v /dev/dsk/c4t0d1 | more

and see what is on it before going further... Why is the disk seen on both servers, is this a cluster ( or was...)?
Sponsored Links
    #3  
Old 08-17-2012
Registered User
 
Join Date: Feb 2012
Location: India
Posts: 110
Thanks: 9
Thanked 2 Times in 2 Posts
No server is not in cluster, have clean exported the VG and de-provisioned that server-1 .

Now I want to use same LUN on Server-2 as fresh to extend an existing volume group .

Last edited by Shirishlnx; 08-17-2012 at 01:17 PM..
    #4  
Old 08-19-2012
Peasant's Avatar
Registered User
 
Join Date: Mar 2011
Posts: 510
Thanks: 14
Thanked 104 Times in 102 Posts
You will need to run on server-1 (on which you want to remove the LUN from)

1. vgdisplay -v the group, and write down the LUN's/disks that are used in it.
2. vgexport on that volume group.
3. pvremove on disks that are inside that volume group.
4. Depresent the disks from storage side.
5. Run ioscan -fnC disk , and check for NO_HW
6. Run rmsf -H on NO_HW devices

You have now removed the Lun(s) from server1.

Present the lun's to server 2, run ioscan -fnC disk .
If you are running v2, you will need to run insf -e to create devices, on v3 they will be created after ioscan.
Verify the results with xpinfo , or similar tool.
Run pvcreate on those rdsks created (you don't need -f if you ran pvremove on server1), only per one path is enough of course.
Use the LUN in new or existing volume group.

Notice, if you are running v2 and you are using multipath, you will need to add both paths in your volume group via vgextend (existing) or vgcreate (new).

Hope that helps.
Regards
Peasant.
Sponsored Links
    #5  
Old 08-21-2012
Registered User
 
Join Date: Feb 2012
Location: India
Posts: 110
Thanks: 9
Thanked 2 Times in 2 Posts
Thanks Peasant .

Now am getting below error while importing same on cluster node .


Code:
# vgimport -p -v -s -m /tmp/vg01.map /dev/vg01
Beginning the import process on Volume Group "/dev/vg01".
Verification of unique LVM disk id on each disk in the volume group
/dev/vg01 failed.
Following are the sets of disks having identical LVM disk id
/dev/dsk/c5t0d2 /dev/dsk/c4t1d1 /dev/dsk/c5t1d1
/dev/dsk/c5t0d3 /dev/dsk/c4t1d2 /dev/dsk/c5t1d2


# vgimport -p -v -s -m /tmp/vg01.map /dev/vg01 /dev/dsk/c5t0d2 /dev/dsk/c5t0d3 /dev/dsk/c4t0d2 /dev/dsk/c4t0d3 /dev/dsk/c5t0d1 /dev/dsk/c4t0d1
Beginning the import process on Volume Group "/dev/vg01".
Verification of unique LVM disk id on each disk in the volume group
/dev/vg01 failed.
Following are the sets of disks having identical LVM disk id
/dev/dsk/c5t0d2 /dev/dsk/c4t1d1 /dev/dsk/c5t1d1
/dev/dsk/c5t0d3 /dev/dsk/c4t1d2 /dev/dsk/c5t1d2

Do you have any clue why am getting so ... and how to resolve this ..
Sponsored Links
    #6  
Old 08-21-2012
Peasant's Avatar
Registered User
 
Join Date: Mar 2011
Posts: 510
Thanks: 14
Thanked 104 Times in 102 Posts
This is because the new disks that you are adding have the same LVM id as existing ones on machine

Are you sure this is not a serviceguard cluster or some storage based cloning like truecopy or business copy ?

If you are sure those are the disks you want to use...


Code:
vgexport /dev/vg01
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x050000
vgchgid  /dev/rdsk/c5t0d2 /dev/rdsk/c5t0d3 /dev/rdsk/c4t0d2 /dev/rdsk/c4t0d3 /dev/rdsk/c5t0d1 /dev/rdsk/c4t0d1
vgimport /dev/vg01 /dev/dsk/c5t0d2 /dev/dsk/c5t0d3 /dev/dsk/c4t0d2 /dev/dsk/c4t0d3 /dev/dsk/c5t0d1 /dev/dsk/c4t0d1

Notice rdsk when using vgchgid and dsk in vgimport.

You will not use -m or -s in this case.

Just please, be sure about your operations and what are you trying to achive, since this looks like some volume group migration from one host to another, rather then reusing of existing luns.

Regards
Peasant.
Sponsored Links
    #7  
Old 08-21-2012
Registered User
 
Join Date: Feb 2012
Location: India
Posts: 110
Thanks: 9
Thanked 2 Times in 2 Posts
Yes.. there's serviceguard cluster and each LUN (from HP Storage VA7110) having true copy and business copy ..

- Have check business copy is taken but is of 0MB size .. (AM not sure why..)

- Have added a LUN on Primary cluster server and are able to see the extended space in VG and both path ..

< ON Server-1 >

Code:
# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c5t0d2
/dev/dsk/c5t0d3
/dev/dsk/c4t0d2
/dev/dsk/c4t0d3
/dev/dsk/c5t0d1
/dev/dsk/c4t0d1



# vgdisplay -v vg01
..
..
      --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d2
   PV Name                     /dev/dsk/c4t0d2  Alternate Link
   PV Status                   available
   Total PE                    5631
   Free PE                     0
   Autoswitch                  On

   PV Name                     /dev/dsk/c5t0d3
   PV Name                     /dev/dsk/c4t0d3  Alternate Link
   PV Status                   available
   Total PE                    5631
   Free PE                     1
   Autoswitch                  On

   PV Name                     /dev/dsk/c5t0d1
   PV Name                     /dev/dsk/c4t0d1  Alternate Link
   PV Status                   available
   Total PE                    5119
   Free PE                     1279
   Autoswitch                  On

Now I want same to be updated on secondary node vg01 .

?? Do vgchgid requires any downtime .. on primary cluster

Last edited by Shirishlnx; 08-21-2012 at 08:51 AM..
Sponsored Links
Closed Thread

Tags
hp-ux, lvm, reuse a lun

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reuse Variable.. aimy Shell Programming and Scripting 7 03-09-2010 08:31 PM
suggest some ideas for reuse infyanurag Linux 0 01-25-2008 04:39 AM
Reuse disk from other HP-UX zetadhell HP-UX 5 09-10-2007 12:01 AM
Password reuse utility rtoba UNIX for Advanced & Expert Users 1 06-22-2006 10:06 AM
How to reuse same major number Agnello UNIX for Dummies Questions & Answers 0 01-09-2006 04:31 AM



All times are GMT -4. The time now is 01:27 AM.