Sponsored Content
Full Discussion: Reuse a LUN
Homework and Emergencies Emergency UNIX and Linux Support Reuse a LUN Post 302689705 by Peasant on Wednesday 22nd of August 2012 02:47:02 AM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
vgimport(1M)															      vgimport(1M)

NAME
vgimport - import an LVM volume group onto the system SYNOPSIS
mapfile] vg_name pv_path ... mapfile] infile] vg_name mapfile vg_name DESCRIPTION
The command adds the specified volume group to the system. The physical volumes, specified as pv_path ..., are scanned to obtain the vol- ume group information and logical volume information. This command works much like A user may explicitly create the vg_name directory and the file before importing the volume group. If absent, the command will automatically create the directory and the file, assigning the minor number as explained in the command man page (see vgcreate(1M)). The vg_name is added to the or file, and the associated logical volume device files are added to the system. assumes that the volume group information has already been created on the physical volumes. This command is useful in conjunction with the command (see vgexport(1M)), to move volume groups from one system to other systems within a high availability cluster. creates logical volume device files under the vg_name directory using the naming convention given in mapfile or using the default naming convention used by the command (see lvcreate(1M)). The command reconstructs the newly imported volume group entry in the or file. The order of the disks belonging to the newly imported vol- ume group could be different than it was before. When a bootable volume group is imported (volume groups version 1.0 only), the boot information present in the boot disks might be incor- rect due to the change in the order of disks in the file. This is because the boot information on the boot disks assumes a certain order of disks in and requires a resynchronization of this information after the first activation of a newly imported bootable volume group. To resynchronize the information on the boot disk after the first activation of a newly imported bootable volume group, run the command in recovery mode option). does not activate the imported volume group due to the many possible options at volume group activation time. To activate the volume group once it has been successfully imported, use the command (see vgchange(1M)). Options and Arguments recognizes the following options and arguments: pv_path The block device path names of a physical volume. This argument is not used with the and related options. vg_name The path name of the volume group. Specify the name of the file from which logical volume names and numbers are to be read. This option is optional when used as in the first com- mand line format of the If this option is not specified, logical volume names are created using the default naming convention where is the decimal representation of logical volume minor number. When used with the option, the volume group specified in the mapfile can be shared among the exporting system and the importing systems. Configure the volume group by populating persistent device special files in the or file, corresponding to the volume group, vg_name. (See intro(7) for information about device special files.) This option can only be used with option. If is invoked without a option, legacy device special files will be used to populate the or file. This option may become obsolete in future releases. Scan option. Scan each of the disks connected to the system and update the or file with the physical volumes that have matching volume group information, as found in the mapfile. This option should always be used in conjunction with the option. The specified mapfile is the file gener- ated by running the command, also with and options. Preview the actions to be taken but do not update the or file or add the logical volume device files. This option is best used in conjunction with the option. Print verbose messages including names of the logical volumes. Import the set of pv_paths held in the infile into the volume group. This option is used as an alternative to specifying the pv_paths on the command line. Each pv_path must appear on a new line in the infile. This option may not be used together with the option. WARNINGS
The option may become obsolete in future releases. No more than eight paths to any physical volume will be added to the or file. All other paths wll be omitted. The following warnings apply to the option, when importing disks with alternate paths: The command does not preserve the path ordering, when a volume group is exported and then imported. This may cause the primary and alter- nate paths to be different on an importing system, from that of an exported system. Also, additional alternate paths that were not config- ured on the exported system may get discovered and configured on the importing system. If the original primary path of a disk gets configured as an alternate path after the volume group is imported, the order can easily be reverted by using to remove the primary path and then reconfiguring the same path again as an alternate, using If additional alternate paths were added to the newly imported volume group, use to reduce any alternate paths that were added but not required. EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. If is not specified or is null, it defaults to "C" (see lang(5)). If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)). EXAMPLES
Import the volume group that is located on physical disks and Activate the volume group following a successful import: Import the volume group using the mapfile, was previously specified by the command on another system. The volume group, is specified in and will be used by the importing system only: Import the volume group using the mapfile, was previously specified by the command on another system. The volume group, is specified in and will be shared among the exporting system, this system, and other systems importing the volume group as shared: Import the volume group using the infile, was previously specified by the command on another system, and it assumes that pv_paths in the are identical on both systems. SEE ALSO
vgexport(1M), vgscan(1M), intro(7), lvm(7). vgimport(1M)
All times are GMT -4. The time now is 11:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy