Reuse a LUN


 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Reuse a LUN
# 8  
Old 08-22-2012
If you use truecopy or similar storage cloning methods ...

You have situation that source VG and destination VG have the same LVM id (that's why vgimport will fail), and the disks are presented on all nodes of SG.
Because of the same LVM id, HPUX will not import, but will warn you there are same ID's on multiple sets of disk.

That's where vgchgid comes into play, allowing you to have 'same/cloned' volume group on any of the SG cluster member.

So you clone the disks via storage method, then vgexport the cloned volume group, change the LVM ID and import.

If you just want to extend the SG clustered volume group with new luns (your case), you just extend on the node where the package is (as you did), export preview of that volume group ( -p -m -s switches, easy to remember Smilie, then on secondary node you make vgexport of that group (plain and simple no switches),mknod, vgimport using map file from primary node.
Code:
vgimport -m yourmapfile -N -s /dev/yourvolumegroup

No downtime is required for these operations.

If you are adding additional LVOLS you will need to modify the /etc/cmcluster/package/package.sh script (where package is the name of the package you are modifying).

If those luns were used on any of the cluster nodes before the above action (extending on the primary node), you will need to run pvremove on every node for specifed disk(s) (to remove LVM information).

Hope that clears things out.
Regards
Peasant.
# 9  
Old 08-22-2012
Thanks Peasant.

Code:
vgimport -m yourmapfile -N -s /dev/yourvolumegroup

Am getting below error ..saying that -N option is not available ..


Code:
#  vgimport -p  -m /tmp/vg01.2.map -N -s /dev/VGT
Usage: vgimport
        [-p]
        [-v]
        [-s]
        [-m MapFile]
        VolumeGroupName PhysicalVolumePath...
"N": Illegal option.

Code:
# uname -a
HP-UX pbup1s B.11.11 U 9000/800 112434670 unlimited-user license

# swlist -l product | grep -i lvm
  LVM                   B.11.11        LVM
  PHCO_29379            1.0            LVM commands cumulative patch
  PHKL_26743            1.0            LVM Cumulative Patch

# As I read on various forum, have to perform vgchgid but am not sure can we perform vgchgid on all LUN's with on active VG ..as this is production server and I can't take any risk .. Smilie

---------- Post updated at 08:54 AM ---------- Previous update was at 05:39 AM ----------

Have solved the issue .. we can use below command to import map file ..

1# Varify corresponding luns on secondary server .. and pass the data path discovered disk as args to vgimport as below ..

2# ensure pass both primary and alternate disk path without -s option ..

Code:
# vgimport  -v -m  /tmp/vg01.map /dev/vgpsdp1vg01  dev/dsk/c19t1d1 /dev/dsk/c19t1d2 /dev/dsk/c21t1d1 /dev/dsk/c21t1d2 /dev/dsk/c19t1d0 /dev/dsk/c21t1d0



Thanks all for valuable Help !!

Thanks,
Shirish Shukla
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Reuse format strings

I have a collection of format strings for sscanf, such as "%02d%*1s%02d%*1s%02d" to read in certain formatted strings, such as dates, times, etc. I wonder if there is a way to use them in printf without some changes? The example above would not work - at least I can't think of any ways to... (4 Replies)
Discussion started by: migurus
4 Replies

2. Shell Programming and Scripting

How to reuse values in Shell script

Hi I am trying to write a shell script and wanted to re-use the value which I have entered already. Here is the sample code. echo "Enter Value : \c" ; read val echo "Enter number: $val\c" ; read num Now I wanted to change the value as showing in 2nd Line or if I will use enter, it... (15 Replies)
Discussion started by: SushilAnand
15 Replies

3. Shell Programming and Scripting

How to declare variables once and reuse them in other scripts?

Hello everyone. I'm trying to create a conf file with variables that my other scripts will use. I have several scripts that use the same variables, and since I don't know how to read them from an external file, i define them in each script (and then if i want to change one's value i need to... (4 Replies)
Discussion started by: moshe88
4 Replies

4. UNIX for Dummies Questions & Answers

Reuse argument from current command?

I'm currently using zsh. Sometimes I find myself wishing to reuse an argument from earlier in the command. I know that I can, of course, assign an argument to a variable ahead of time, and then easily use that variable more than once. I know about the ability to reuse arguments from previous... (0 Replies)
Discussion started by: marshaul
0 Replies

5. Shell Programming and Scripting

Reuse Variable..

Hi. I have these two variables: My objective here is to reuse that $file_name variable again and again by resetting the $cv value. for example, if i reissue the cv="$(print 'CV01')" command, thus $file_name is now should be "CP99978_CV01.TXT", not "CP99978_CV01.TXT" anymore. How I'm... (7 Replies)
Discussion started by: aimy
7 Replies

6. Solaris

I have LUN ID, how to find disk relate to that LUN ID?

I have a list of LUN ID, my task is to find if disk has been added or not. How do I do that? I have been searching the forum and not able to find answer. thanks (4 Replies)
Discussion started by: uuontario
4 Replies

7. Linux

suggest some ideas for reuse

hi can you all help me to develop anything in unix that could be reused. any module or application could be helpful (0 Replies)
Discussion started by: infyanurag
0 Replies

8. HP-UX

Reuse disk from other HP-UX

Hello, I have 2 hp-ux both running 11.23, I have move one of a harddisk from "UNIX A" to "UNIX B", so how can I read back the data in "UNIX B"? Thanks (5 Replies)
Discussion started by: zetadhell
5 Replies

9. UNIX for Advanced & Expert Users

Password reuse utility

Does anyone know of a password reuse utility for Solaris 7 or 8? Security people are telling me that I need one. Thanks (1 Reply)
Discussion started by: rtoba
1 Replies

10. UNIX for Dummies Questions & Answers

How to reuse same major number

Hi, I am working on device drivers.Once If register a device i'll get one major no. If i unregister and register again i'll get a different major no.What i have to do to get same major no. each time :( (0 Replies)
Discussion started by: Agnello
0 Replies
Login or Register to Ask a Question