Operating System - HP-UX
1832087 Members
2919 Online
110037 Solutions
New Discussion

Two device files for the same LUN

 
Hans Hendriks_1
Frequent Advisor

Two device files for the same LUN

On one out of three of our N-class servers connected to one XP512, two device files for the same LUN appear in /dev/dsk and /dev/rdsk. Both entries have the same major/minor number. Also, output from ioscan lists:

disk 165 1/4/0/0.20.16.0.0.9.3 sdisk CLAIMED DEVICE HP OPEN E
/dev/dsk/c12t9d3 /dev/rdsk/c12t9d3
/dev/dsk/c19t9d3 /dev/rdsk/c19t9d3

On the other two servers, only the c19t9d3 appears with the same hardware path.

Will a problem occur if I do a vgexport -m / vgimport in order to create a volume group on one of the other N-class? Or, even better, is there a way to recreate the device files (and remove the unused ones) in order to clean and straighten things up? Of course, I don't want to lose my VG configuration, this is very important because the servers form a MC/SG cluster.

Greetz,

Hans
5 REPLIES 5
Sundar_7
Honored Contributor

Re: Two device files for the same LUN

Hi,

Here the useful vgexport/vgimport option to use is -s.

# vgexport -v -s -m /tmp/mapfile /dev/vg

# vgimport -v -s -m /tmp/mapfile /dev/vg

This way the mapfile will also include the VGID and thus while importing u dont have to specify the list of PVs. LVM will scan for the disks with the VGID that matches that of in the map file and import them.

Thanks,

Sundar.

Learn What to do ,How to do and more importantly When to do ?
Hans Hendriks_1
Frequent Advisor

Re: Two device files for the same LUN

When exporting / importing VGs I already use the -s and -p switches.
But what causes the duplicate entries and how do I get rid of the incorrect ones, if any?

Hans
Jeff Schussele
Honored Contributor

Re: Two device files for the same LUN

Hi Hans,

The command to remove the file would be rmsf - man it for details.
But before you remove it, verify just *which* one is currently in use & be sure NOT to remove that one. I don't think you should have to remove both & recreate. Just remove the unused one. Besides you'd need downtime to do it that way.
I suspect that you're SAN was probably rezoned at one point that caused a new controller instance to come about.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Stuart Abramson_2
Honored Contributor

Re: Two device files for the same LUN

It would help if we could see the entire, unedited ioscan.

The c12 and c19 device files just shouldn't appear under the same line in the ioscan. They must be from two seperate lines.
Hans Hendriks_1
Frequent Advisor

Re: Two device files for the same LUN

See the attached ioscan listing (beware, it is quite long).

I agree that the c12 and c19 device files shouldn't appear under the same line, but they do. Sundars answer sets me a little of the hook, though, because now I am sure that the exported / imported VG's on the different cluster nodes DO use the same LUN. We do a lot of vgexport / vgimport when adding or modifying packages in the cluster.

It may be a good idea however to remove the unused special files, to prevent me and my colleagues from using the wrong one. In order to find out which one is the used one, can anyone provide me with algorithm to calculate the special file (cXtYdZ) that goes with a given hardware path?

Hans