[HOW TO] find LUN of SAN's logical unit numbers

How to find?

1. Show the disk space
[root@~:~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/mapper/vg--hypprd01--data-lv--hypprd01--data                      335G  326G  8.6G  98% /home/databases/oracle/HYPPRD01/datafiles

2. Show volume group
[root@~:~]# vgs  VG                  #PV #LV #SN Attr   VSize   VFree    vg-hypprd01-data      2   1   0 wz--n- 339.99g      0 

3. Show physical disk 
[root@~:~]# pvs
  PV                  VG                  Fmt  Attr PSize   PFree
  /dev/mapper/mpathao vg-hypprd01-data    lvm2 a--u 180.00g      0
  ...
  /dev/mapper/mpathat vg-hypprd01-data    lvm2 a--u 160.00g      0 


4. Get LUN
In step 3, I already got the physical disk, so next, simple to get LUNs
[root@~:~]# multipath -l /dev/mapper/mpathao mpathao (36000144000000010706b857c63df5303) dm-9 EMC,Invistasize=180G features='1 queue_if_no_path' hwhandler='0' wp=rw`-+- policy='round-robin 0' prio=0 status=active  |- 1:0:0:10 sdl  8:176  active undef unknown  |- 0:0:0:10 sdau 66:224 active undef unknown  |- 1:0:1:10 sdad 65:208 active undef unknown  |- 0:0:1:10 sdcf 69:48  active undef unknown  |- 1:0:2:10 sdbh 67:176 active undef unknown  |- 0:0:2:10 sddd 70:176 active undef unknown  |- 1:0:3:10 sdci 69:96  active undef unknown  `- 0:0:3:10 sddt 71:176 active undef unknown

[root@~:~]# multipath -l /dev/mapper/mpathatmpathat (36000144000000010706b857c63df79e8) dm-10 EMC,Invistasize=160G features='1 queue_if_no_path' hwhandler='0' wp=rw`-+- policy='round-robin 0' prio=0 status=active  |- 1:0:0:15 sdq  65:0   active undef unknown  |- 0:0:0:15 sdbg 67:160 active undef unknown  |- 1:0:1:15 sdan 66:112 active undef unknown  |- 0:0:1:15 sdcs 70:0   active undef unknown  |- 1:0:2:15 sdbq 68:64  active undef unknown  |- 0:0:2:15 sddi 71:0   active undef unknown  |- 1:0:3:15 sdcp 69:208 active undef unknown  `- 0:0:3:15 sddy 128:0  active undef unknown

Now I send them to Storage Admin and wait his feedback on time.

To that end, I have what I need. I would like to provide more information about LUN for you.  

Said Amol Sale.
LUN is a logical disk as created on SAN storage array and is assigned to host in SAN using LUN binding, It appears on the host as local disk.
Storage array usually have large storage capacity, we don't want one  server to use the whole thing, so we divide it into logical units (LUN) is actually Logical Unit Number, so we get storage sliced into usable chunks, and present  it to the server. In a simple example, suppose it shows up as local disk on server just like /dev/sdc.

Volume We carve out volume using one or more LUNs (storage disks from OS's view) We want to be able to add more space or shrink the space. volume makes it possible. We can resize that LUN on the  storage array (or even create another LUN and present that to the  server) and using LVM (Logical Volume Manager), We can grow the volume without rebooting.There are several good features like cloning, mirroring, high availability etc.of volumes.

Said J Michel Metz
It might help to think of the differences in terms of the perspective. That is, if you look at if from the computer's "perspective," versus the storage's "perspective," it can actually make sense.

On one end of a logical computing metaphor, you have the computer (also called a "host," "initiator," or even just "CPU" sometimes. At the other, you have the physical media (also called a "target," "drive," "HDD," or "SSD," etc.).

Hosts need Volumes, so those volumes have to be made up of something that eventually sits on a real, physical drive (whether it be spinning drives or SSDs, etc.).

Look at the simplified diagram below. From the From the "top down," then, a Host sees a Volume. That Volume, in turn, has to be made up of something that, in turn, can be interpreted (eventually by physical media). From the storage's perspective, the physical media is broken down from a physical entity (the actual drive), into a logical entity, and given a number (hence the "Logical Unit Number", or LUN).
In between there is a very important piece of software that makes a translation between that LUN and what the host can see as a Volume, called the Volume Manager.

Why go through all this work?

When storage requirements grow, so does the need to add in methods for protection, scale, performance, and other nifty features. On top of that, there needs to be room for networking capabilities as well. Those capabilities have to go somewhere, and having one big monolithic system doesn’t work quite so well.

Many modern systems that are in use today have a relationship between Volumes and LUNs that look like this:

Looking from the bottom-up, the media is located inside of some sort of storage enclosure, and is often pooled together into a logical format via a system called RAID (RAID, depending on the methods used, can improve performance and resiliency).

That pool, in turn, is carved up into LUNs - the exact same kind of LUN we used in our simple example above. Those LUNs are then provisioned to hosts. Many times there is a 1:1 relationship between LUNs and Volumes, but it does not have to be that way. Volume Managers are capable of taking more than one LUN and logically combining them into a single entity to present up to the host as an individual volume.

So, LUNs and Volumes can be the same thing, and they are related, but (especially in SANs), the usually are not.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success