Am trying to differentiate between the local disks and LUN's presented from SAN onto the server. Have Tried fdisk -l, however I quite cudn't differentiate the local disks from SAN presented LUN's.
Can you pls. let me know the procedure and commands to find this.
OS - RHEL 4
SAN - EMC Clariion CX 600
Thanks, Murali.
The output of ls -l /sys/block/*/device should give you an idea about how each device is connected to the system.
In the example below red is a virtual disk on an internal RAID controller, green is a CD-ROM connected via an IDE controller, and the rest are SAN-connected SCSI disks where "hostN" refers to the instance of the Host Bus Adapter they are connected to.
# ls -l /sys/block/*/device
lrwxrwxrwx 1 root root 0 Sep 19 02:11 /sys/block/cciss!c0d0/device -> ../../devices/pci0000:00/0000:00:04.0/0000:0d:00.0/disk0
lrwxrwxrwx 1 root root 0 Sep 19 02:11 /sys/block/hda/device -> ../../devices/pci0000:00/0000:00:1f.1/ide0/0.0
lrwxrwxrwx 1 root root 0 Sep 18 14:58 /sys/block/sda/device -> ../../devices/pci0000:00/0000:00:02.0/0000:13:00.0/host0/target0:0:0/0:0:0:0
lrwxrwxrwx 1 root root 0 Sep 18 14:58 /sys/block/sdb/device -> ../../devices/pci0000:00/0000:00:02.0/0000:13:00.0/host0/target0:0:0/0:0:0:1
lrwxrwxrwx 1 root root 0 Sep 18 14:58 /sys/block/sdc/device -> ../../devices/pci0000:00/0000:00:02.0/0000:13:00.0/host0/target0:0:0/0:0:0:64
lrwxrwxrwx 1 root root 0 Sep 18 14:58 /sys/block/sdd/device -> ../../devices/pci0000:00/0000:00:02.0/0000:13:00.0/host0/target0:0:0/0:0:0:120
...
Hi,
Thanks for the reply.
ls -l /sys/block/*/device
Does give me the details as how many block devices are connected to the server. But how would I compare or correlate the same with the fdisk -l output, which shows total storage { local & SAN connected} devices with size etc.
Thats what am precisely looking for. Any help on those lines is appreciated.
regards, Murali.
I'm not sure what you're confused about... the device name under /sys/block corresponds with the device names listed by fdisk -l. Are you saying that you want to join the two pieces of information together automatically, i.e. a script, or you just aren't able to figure out which ones belong together by visual inspection?