{"revision": {"id": "f3ccaeb9-2f95-11f1-9aab-e86a64d24d78", "node_id": "f3cb90db-2f95-11f1-91d9-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "How to determine if a device is Local or SAN in Linux\r\n###########################################################\r\n\r\nI'm just going to list a bunch of safe commands you can run to probe the system to determine what you are working with.\r\n\r\n.. contents:: \r\n\r\nlsscsi\r\n=========\r\n\r\nlsscsi\r\n list scsi \r\n\r\n\r\n.. code-block:: bash\r\n\r\n [root@server]# lsscsi\r\n [0:0:0:0]    disk    IBM-ESXS ST973452SS       B623  -\r\n [0:0:1:0]    disk    IBM-ESXS ST973452SS       B623  -\r\n [0:1:3:0]    disk    LSILOGIC Logical Volume   3000  /dev/sda\r\n [3:0:0:0]    disk    3PARdata VV               0000  /dev/sdb\r\n [5:0:0:0]    disk    3PARdata VV               0000  /dev/sdc\r\n\r\n [root@server]# lsscsi -H\r\n [0]    mptsas\r\n [1]    ata_piix\r\n [2]    ata_piix\r\n [3]    <NULL>\r\n [4]    <NULL>\r\n [5]    <NULL>\r\n [6]    <NULL>\r\n\r\n [root@server]# lsscsi -g\r\n [0:0:0:0]    disk    IBM-ESXS ST973452SS       B623  -         /dev/sg0\r\n [0:0:1:0]    disk    IBM-ESXS ST973452SS       B623  -         /dev/sg1\r\n [0:1:3:0]    disk    LSILOGIC Logical Volume   3000  /dev/sda  /dev/sg2\r\n [3:0:0:0]    disk    3PARdata VV               0000  /dev/sdb  /dev/sg3\r\n [5:0:0:0]    disk    3PARdata VV               0000  /dev/sdc  /dev/sg4\r\n\r\n\r\nls /dev/disk\r\n===============\r\n\r\n\r\n\r\n [root@server]# ls -hal /dev/disk/by-path/\r\n total 0\r\n drwxr-xr-x 2 root root 180 Jan 11  2012 .\r\n drwxr-xr-x 6 root root 120 Jan 11  2012 ..\r\n lrwxrwxrwx 1 root root   9 Jan 11  2012 ide-0:0 -> ../../hda\r\n lrwxrwxrwx 1 root root   9 Jan 11  2012 pci-0000:04:00.0-scsi-0:1:3:0 -> ../../sda\r\n lrwxrwxrwx 1 root root  10 Jan 11  2012 pci-0000:04:00.0-scsi-0:1:3:0-part1 -> ../../sda1\r\n lrwxrwxrwx 1 root root  10 Jan 11  2012 pci-0000:04:00.0-scsi-0:1:3:0-part2 -> ../../sda2\r\n lrwxrwxrwx 1 root root  10 Jan 11  2012 pci-0000:04:00.0-scsi-0:1:3:0-part3 -> ../../sda3\r\n lrwxrwxrwx 1 root root   9 Jan 11  2012 pci-0000:06:00.0-fc-0x21110002ac0008b4:0x0000000000000000 -> ../../sdc\r\n lrwxrwxrwx 1 root root   9 Jan 11  2012 pci-0000:2a:00.0-fc-0x20110002ac0008b4:0x0000000000000000 -> ../../sdb\r\n\r\n\r\n[root@server]# ls -hal /dev/disk/by-id/\r\ntotal 0\r\ndrwxr-xr-x 2 root root 140 Jan 11  2012 .\r\ndrwxr-xr-x 6 root root 120 Jan 11  2012 ..\r\nlrwxrwxrwx 1 root root   9 Jan 11  2012 scsi-350002ac0343408b4 -> ../../sdb\r\nlrwxrwxrwx 1 root root   9 Jan 11  2012 scsi-3600508e000000000cbd00903176ab80b -> ../../sda\r\nlrwxrwxrwx 1 root root  10 Jan 11  2012 scsi-3600508e000000000cbd00903176ab80b-part1 -> ../../sda1\r\nlrwxrwxrwx 1 root root  10 Jan 11  2012 scsi-3600508e000000000cbd00903176ab80b-part2 -> ../../sda2\r\nlrwxrwxrwx 1 root root  10 Jan 11  2012 scsi-3600508e000000000cbd00903176ab80b-part3 -> ../../sda3\r\n\r\n\r\nblkid\r\n============\r\n\r\n.. code-block:: bash\r\n\r\n ", "source_format": "rst", "revision_number": 1, "created": 1363867910000}}