- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to know two device file pointing to same L...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 08:44 AM
05-25-2007 08:44 AM
How to know two device file pointing to same LUN
My query is how to know c4t1d1 & c5t1d1 refer to the same LUN in the first instances priar to create VG from ioscan output.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 08:55 AM
05-25-2007 08:55 AM
Re: How to know two device file pointing to same LUN
~hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 09:18 AM
05-25-2007 09:18 AM
Re: How to know two device file pointing to same LUN
1) Safe in all cases:
compare the diskinfo -v /dev/rdsk/cXtYdZ outputs of the suspected primary and alternate device nodes. If the outputs are identical then the two MIGHT be the same physical device/LUN. If they differ they cannot refer to the same LUN.
2) Still safe in all cases:
We are going to read 10MiB of data and compare the output.
dd if=/dev/rdsk/c4t1d1 of=/var/tmp/f1 bs=1024k count=10
dd if=/dev/rdsk/c5t1d1 of=/var/tmp/f2
bs=1024k count=10
cksum /var/tmp/f1 /var/tmp/f2
If the checksums are identical then the two devices MIGHT refer to the same LUN; if not they cannot.
3) Now it's dangerous and only if 1) and 2) have tested true. Write a small script which will capture a string argument supplied on the command line; it must be unique to this LUN. Loop echoing your string until 1024 characters have been written to a file. Now dd this file like this:
dd if=myfile bs=1k count=1 of=/dev/rdsk/c4t1d1
Now read it back using the alternate link:
dd if=/dev/rdsk/c5t1d1 bs=1k count=1 of=myfile2
cksum myfile1 myfile2
If the checksums are identical, you have found the links.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 09:40 AM
05-25-2007 09:40 AM
Re: How to know two device file pointing to same LUN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 10:54 AM
05-25-2007 10:54 AM
Re: How to know two device file pointing to same LUN
Why should this be so? The only part of the cXtYdZ equation over which the host has any control is the cX part. The SCSI ID (tY) and LUN (dZ) is strictly data that are presented to the host computer; the host computer has no control over those parameters. Most UNIX boxes will accept LUN's from any disk array manufacturer as long as the arrays play by the rules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 11:13 AM
05-25-2007 11:13 AM
Re: How to know two device file pointing to same LUN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 11:50 AM
05-25-2007 11:50 AM
Re: How to know two device file pointing to same LUN
It has the ioscan options to display the WWID numbers of each FC link. By them, you can identify the multiple links to the same LUN.
Thing is, at that point the OS will have already noticed the same thing and automatically set up load-balancing multipathing for it, so you may not need to care :-)
With HP-UX 11.23 or older, on the /dev/dsk/c*t*d* level, there simply *isn't* any "primary" or "alternate" links. All links are the same, and this level just does not know or care that two or more links might point to the same data.
If your array puts some unique identifier to the SCSI Product ID/Vendor ID fields of each LUN so that LUNs can be identified from that, you could run commands like "diskinfo -v /dev/rdsk/c4t1d1" to identify the LUNs without vendor-specific tools.
When you're creating or importing a VG, the LVM layer will notice that some of the PVs have identical PVIDs. At this point, one of the links will be named as "primary" and the rest as "alternates". PVIDs are created and written to the disk when you run "pvcreate" to a LUN.
One way to confirm that two links point to the same LUN would be to run "pvdisplay" for each link before doing "pvcreate" to confirm that there is no LUN with a PV structure yet.
Then, run "pvcreate /dev/rdsk/c4t1d1", and after that, "pvdisplay /dev/dsk/c5t1d1". If the link c5t1d1 got turned into a valid PV when you pvcreate'd the link c4t1d1, you know these two must point to the same LUN.
Another "lazy man's way": create the VG using just one set of links. Then vgexport it _using the -s option_. Recreate the /etc/vg*/group file and reimport the VG using the command "vgimport -s -m mapfile -v vgname". Note that you don't list the PVs in this command at all.
The vgimport command will read the VGID from the map file, and then will search for that VGID from the beginning of every disk that is not associated with an active volume group. It will detect *all* PVs of that VG and *all* links to them automatically. Of course, if you have a huge number of LUNs presented to the host, it may take a while.
The expected result would be that the numerically first devices, i.e. c4t*d* devices in your case would become primary links and c5t*d* as alternate links. If this is not what you want, you must then shuffle them manually.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2007 11:56 AM
05-25-2007 11:56 AM
Re: How to know two device file pointing to same LUN
Note that with 11i v3, the LUN WWID is displayed by the scsimgr command. This will allow I think to verify what LUN WWID a dsf name is associated with and therefore to compare 2 WWIDs for 2 dsf names.
Marie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2007 11:01 PM
05-27-2007 11:01 PM