[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Hardware Troubleshooting in Linux  |  Other Devices  |  Topic: how to check its local or SAN disk in linux
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: how to check its local or SAN disk in linux  (Read 357 times)
0 Members and 1 Guest are viewing this topic.
gauravbajaj
LST CareTaker
Experienced
*****
Offline Offline

Posts: 595


View Profile
« on: May 07, 2008, 04:59:19 AM »

Hi All,
Sorry loggin'g after a long long time but was very busy in other stuff.

Could anyone please tel how to differnciate between local and SAN disk in linux/solaris?
I checked google and found that /proc/scsi/scsi can tel about this but after checking this also I am not sure how to judge that..........like STK is clear that its a SAN disk
 Really its not so clear how to judge

could anyone please help?

Thanks
Gaurav
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2149


View Profile
« Reply #1 on: May 07, 2008, 04:04:39 PM »

You are always welcome.. but unfortunately I have no idea how to distinguish SAN disc but general idea can be the size of disk, you can get an idea if by seeing size and if its equal to SAN disk then it is the one you looking for.

Btw, what output you get from fdisk -l , what does your /proc/sys/scsi contains while you have SAN and when you do not have one!
Logged
gauravbajaj
LST CareTaker
Experienced
*****
Offline Offline

Posts: 595


View Profile
« Reply #2 on: May 08, 2008, 06:56:15 AM »

I have little idea for SAN disk
If you see the /proc/scsi/scsi file it wi give you information like below

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: HP 36.4G Model: MAN3367MC        Rev: HP05
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: COMPAQ   Model: HSV110 (C)COMPAQ Rev: 2003
  Type:   Unknown                          ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 02
  Vendor: COMPAQ   Model: HSV110 (C)COMPAQ Rev: 2003
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 03
  Vendor: COMPAQ   Model: HSV110 (C)COMPAQ Rev: 2003
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
  Vendor: COMPAQ   Model: HSV110 (C)COMPAQ Rev: 2003
  Type:   Unknown                          ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 02
  Vendor: COMPAQ   Model: HSV110 (C)COMPAQ Rev: 2003
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 03
  Vendor: COMPAQ   Model: HSV110 (C)COMPAQ Rev: 2003

Above indicates that HSV110 is a storage disk  and it also give the LUN numbers with scsi information

Like here it shows scsi2 is a san disk

if you wana know abt the SAN partition  do this

 dmesg | grep -i "attached "
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 2
Attached scsi disk sdc at scsi2, channel 0, id 0, lun 3
Attached scsi disk sdd at scsi2, channel 0, id 1, lun 2

It gives the required partitions on LUN with scsi information, compare it with o/p of /proc/scsi/scsi LUN's , you wil get to know that sdb,sdc and sdd are SAN disks.
Logged
dragoncity99
LST CareTaker
Experienced
*****
Offline Offline

Posts: 494


View Profile
« Reply #3 on: June 13, 2008, 04:37:18 AM »

Hi, gaurav. We can't differentiate SAN disk using /dev/sdX device names as when the LUNs are provisioned. We will still see it as a /dev/sdX. Of course this is excluding the I-SCSI based storage luns. Which is obviously very straightforward to detect.

If you are using SAN storage. You will need to refer to your vendor documentation as it is very vendor specific. Some are even using their own device filenames. For example, an EMC san storage uses:

/dev/emcpowerX as their device file

However these device are accessible via their multipaths which can be /dev/sdX

Hope above explains if I answer u what u r looking for.

Also, if you dont have a vendor based software to detect your SAN disk (LUNs), or instead uses "multipath" tools which is open source utility. Then, u can see the device names via running:

# multipath -l

Alternatively, u can see these LUNs are detect and mapped using device mapper. (/dev/mapper/.... or /dev/disk/by-uuid or /dev/disk/by-name)

As for /proc/scsi/{your hba card type}, this is usable via kernel 2.4 (i.e RHEL3), but for kernel 2.6 (i.e SLES10) it will be in /sys/class/fc_host/{hba cards info here}
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
July 23, 2008, 10:58:55 PM

Login with username, password and session length
Navigation
Recent Discussions
[July 22, 2008, 08:35:57 PM]

[July 20, 2008, 08:44:16 AM]

[July 19, 2008, 12:44:17 AM]

[July 16, 2008, 10:44:36 AM]

[July 16, 2008, 03:20:13 AM]

[July 06, 2008, 01:52:33 PM]

[July 04, 2008, 04:45:34 AM]

[July 03, 2008, 03:53:13 AM]

[June 28, 2008, 02:10:22 AM]

[June 27, 2008, 05:39:59 AM]
Members
Total Members: 5879
Latest: prakash_npt
Stats
Total Posts: 8061
Total Topics: 2171
Online Today: 14
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 8
Total: 8
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc