local-or-san-device-in-linux
| rev 5 | rev 6 | ||||
|---|---|---|---|---|---|
| 111 | 111 | ||||
| 112 | 112 | ||||
| n | 113 | Check if for multipath software | n | 113 | check for multipath software |
| 114 | ====================================== | 114 | ====================================== | ||
| 115 | 115 | ||||
| t | 116 | * Does /etc/multipath.conf exists? | t | 116 | * Does */etc/multipath.conf* exist? |
| 117 | 117 | ||||
| 118 | * On redhat / fedora / centos run the following command and review any output: | 118 | * On redhat / fedora / centos run the following command and review any output: | ||
| rev 4 | rev 5 | ||||
|---|---|---|---|---|---|
| 106 | \_ 3:0:0:0 sdb 8:16 [active][undef] | 106 | \_ 3:0:0:0 sdb 8:16 [active][undef] | ||
| 107 | \_ 5:0:0:0 sdc 8:32 [active][undef] | 107 | \_ 5:0:0:0 sdc 8:32 [active][undef] | ||
| t | t | 108 | |||
| 109 | # also look at multipath -v3 | ||||
| 110 | |||||
| 111 | |||||
| 112 | |||||
| 113 | Check if for multipath software | ||||
| 114 | ====================================== | ||||
| 115 | |||||
| 116 | * Does /etc/multipath.conf exists? | ||||
| 117 | |||||
| 118 | * On redhat / fedora / centos run the following command and review any output: | ||||
| 119 | |||||
| 120 | .. code-block:: bash | ||||
| 121 | |||||
| 122 | rpm -qa | grep multip | ||||
| 123 | device-mapper-multipath-0.4.7-17.el5 | ||||
| 124 | |||||
| 125 | * On debian / ubuntu run the following command and review any output: | ||||
| 126 | |||||
| 127 | .. code-block:: bash | ||||
| 128 | |||||
| 129 | sudo dpkg --get-selections | grep multip | ||||
| 130 | multipath-tools install | ||||
| 131 | |||||
| 132 | |||||
| rev 3 | rev 4 | ||||
|---|---|---|---|---|---|
| 92 | /dev/md0: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="ext | 92 | /dev/md0: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="ext | ||
| > | 3" | > | 3" | ||
| 93 | /dev/fiob1: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="e | 93 | /dev/fiob1: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="e | ||
| > | xt3" | > | xt3" | ||
| t | t | 94 | |||
| 95 | |||||
| 96 | |||||
| 97 | multipath | ||||
| 98 | ================= | ||||
| 99 | |||||
| 100 | .. code-block:: bash | ||||
| 101 | |||||
| 102 | [root@server]# multipath -l | ||||
| 103 | mpath0 (350002ac0343408b4) dm-6 3PARdata,VV | ||||
| 104 | [size=100G][features=1 queue_if_no_path][hwhandler=0] | ||||
| 105 | \_ round-robin 0 [prio=0][active] | ||||
| 106 | \_ 3:0:0:0 sdb 8:16 [active][undef] | ||||
| 107 | \_ 5:0:0:0 sdc 8:32 [active][undef] | ||||
| rev 2 | rev 3 | ||||
|---|---|---|---|---|---|
| 43 | 43 | ||||
| 44 | 44 | ||||
| n | n | 45 | .. code-block:: bash | ||
| 45 | 46 | ||||
| n | n | 47 | |||
| 46 | [root@server]# ls -hal /dev/disk/by-path/ | 48 | [root@server]# ls -hal /dev/disk/by-path/ | ||
| 47 | total 0 | 49 | total 0 | ||
| 57 | 59 | ||||
| 58 | 60 | ||||
| t | t | 61 | .. code-block:: bash | ||
| 62 | |||||
| 63 | |||||
| 59 | [root@server]# ls -hal /dev/disk/by-id/ | 64 | [root@server]# ls -hal /dev/disk/by-id/ | ||
| 60 | total 0 | 65 | total 0 | ||
| 61 | drwxr-xr-x 2 root root 140 Jan 11 2012 . | 66 | drwxr-xr-x 2 root root 140 Jan 11 2012 . | ||
| 62 | drwxr-xr-x 6 root root 120 Jan 11 2012 .. | 67 | drwxr-xr-x 6 root root 120 Jan 11 2012 .. | ||
| 63 | lrwxrwxrwx 1 root root 9 Jan 11 2012 scsi-350002ac0343408b4 -> ../../sdb | 68 | lrwxrwxrwx 1 root root 9 Jan 11 2012 scsi-350002ac0343408b4 -> ../../sdb | ||
| 64 | lrwxrwxrwx 1 root root 9 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b - | 69 | lrwxrwxrwx 1 root root 9 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b | ||
| > | > ../../sda | > | -> ../../sda | ||
| 65 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b-p | 70 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b- | ||
| > | art1 -> ../../sda1 | > | part1 -> ../../sda1 | ||
| 66 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b-p | 71 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b- | ||
| > | art2 -> ../../sda2 | > | part2 -> ../../sda2 | ||
| 67 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b-p | 72 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b- | ||
| > | art3 -> ../../sda3 | > | part3 -> ../../sda3 | ||
| 68 | 73 | ||||
| 69 | 74 | ||||
| rev 1 | rev 2 | ||||
|---|---|---|---|---|---|
| 73 | .. code-block:: bash | 73 | .. code-block:: bash | ||
| 74 | 74 | ||||
| t | 75 | t | 75 | [root@server]# blkid | |
| 76 | /dev/mapper/vg00-lv02: UUID="520d3a30-a118-4373-a190-7c6cbfc341df" SEC_TYPE="ex | ||||
| > | t2" TYPE="ext3" | ||||
| 77 | /dev/mapper/vg00-lv03: UUID="1de15bdc-e56c-4ae1-98c6-9b4508675225" SEC_TYPE="ex | ||||
| > | t2" TYPE="ext3" | ||||
| 78 | /dev/mapper/vg00-lv04: UUID="0e7d6223-689b-4f0d-b24d-3b89fe07ea63" SEC_TYPE="ex | ||||
| > | t2" TYPE="ext3" | ||||
| 79 | /dev/mapper/vg00-lv06: UUID="b92c1864-a23b-4b5f-ba4b-5672b279c200" SEC_TYPE="ex | ||||
| > | t2" TYPE="ext3" | ||||
| 80 | /dev/mapper/vg00-lv05: UUID="5f8cf0b5-aae1-4aaa-bf4c-fc64b3a0f499" SEC_TYPE="ex | ||||
| > | t2" TYPE="ext3" | ||||
| 81 | /dev/mapper/vg00-lv01: UUID="fd84dcfb-c2b6-4848-b26f-77714313729b" SEC_TYPE="ex | ||||
| > | t2" TYPE="ext3" | ||||
| 82 | /dev/vg00/lv01: UUID="fd84dcfb-c2b6-4848-b26f-77714313729b" SEC_TYPE="ext2" TYP | ||||
| > | E="ext3" | ||||
| 83 | /dev/fioa1: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="e | ||||
| > | xt3" | ||||
| 84 | /dev/mapper/vg01-lvol0: UUID="75aaa9e7-33b8-4037-a919-33ff57662136" SEC_TYPE="e | ||||
| > | xt2" TYPE="ext3" | ||||
| 85 | /dev/sda1: LABEL="/boot" UUID="4a68f1c6-ad6c-40fb-a0b9-083931ae5ec4" SEC_TYPE=" | ||||
| > | ext2" TYPE="ext3" | ||||
| 86 | /dev/sda2: LABEL="SWAP-sda2" TYPE="swap" | ||||
| 87 | /dev/md0: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="ext | ||||
| > | 3" | ||||
| 88 | /dev/fiob1: UUID="afd10bb6-d937-4bf7-bc2c-dcd7ff256fe9" SEC_TYPE="ext2" TYPE="e | ||||
| > | xt3" | ||||
| empty | rev 1 | ||||
|---|---|---|---|---|---|
| t | t | 1 | How to determine if a device is Local or SAN in Linux | ||
| 2 | ########################################################### | ||||
| 3 | |||||
| 4 | I'm just going to list a bunch of safe commands you can run to probe the system | ||||
| > | to determine what you are working with. | ||||
| 5 | |||||
| 6 | .. contents:: | ||||
| 7 | |||||
| 8 | lsscsi | ||||
| 9 | ========= | ||||
| 10 | |||||
| 11 | lsscsi | ||||
| 12 | list scsi | ||||
| 13 | |||||
| 14 | |||||
| 15 | .. code-block:: bash | ||||
| 16 | |||||
| 17 | [root@server]# lsscsi | ||||
| 18 | [0:0:0:0] disk IBM-ESXS ST973452SS B623 - | ||||
| 19 | [0:0:1:0] disk IBM-ESXS ST973452SS B623 - | ||||
| 20 | [0:1:3:0] disk LSILOGIC Logical Volume 3000 /dev/sda | ||||
| 21 | [3:0:0:0] disk 3PARdata VV 0000 /dev/sdb | ||||
| 22 | [5:0:0:0] disk 3PARdata VV 0000 /dev/sdc | ||||
| 23 | |||||
| 24 | [root@server]# lsscsi -H | ||||
| 25 | [0] mptsas | ||||
| 26 | [1] ata_piix | ||||
| 27 | [2] ata_piix | ||||
| 28 | [3] <NULL> | ||||
| 29 | [4] <NULL> | ||||
| 30 | [5] <NULL> | ||||
| 31 | [6] <NULL> | ||||
| 32 | |||||
| 33 | [root@server]# lsscsi -g | ||||
| 34 | [0:0:0:0] disk IBM-ESXS ST973452SS B623 - /dev/sg0 | ||||
| 35 | [0:0:1:0] disk IBM-ESXS ST973452SS B623 - /dev/sg1 | ||||
| 36 | [0:1:3:0] disk LSILOGIC Logical Volume 3000 /dev/sda /dev/sg2 | ||||
| 37 | [3:0:0:0] disk 3PARdata VV 0000 /dev/sdb /dev/sg3 | ||||
| 38 | [5:0:0:0] disk 3PARdata VV 0000 /dev/sdc /dev/sg4 | ||||
| 39 | |||||
| 40 | |||||
| 41 | ls /dev/disk | ||||
| 42 | =============== | ||||
| 43 | |||||
| 44 | |||||
| 45 | |||||
| 46 | [root@server]# ls -hal /dev/disk/by-path/ | ||||
| 47 | total 0 | ||||
| 48 | drwxr-xr-x 2 root root 180 Jan 11 2012 . | ||||
| 49 | drwxr-xr-x 6 root root 120 Jan 11 2012 .. | ||||
| 50 | lrwxrwxrwx 1 root root 9 Jan 11 2012 ide-0:0 -> ../../hda | ||||
| 51 | lrwxrwxrwx 1 root root 9 Jan 11 2012 pci-0000:04:00.0-scsi-0:1:3:0 -> ../../ | ||||
| > | sda | ||||
| 52 | lrwxrwxrwx 1 root root 10 Jan 11 2012 pci-0000:04:00.0-scsi-0:1:3:0-part1 -> | ||||
| > | ../../sda1 | ||||
| 53 | lrwxrwxrwx 1 root root 10 Jan 11 2012 pci-0000:04:00.0-scsi-0:1:3:0-part2 -> | ||||
| > | ../../sda2 | ||||
| 54 | lrwxrwxrwx 1 root root 10 Jan 11 2012 pci-0000:04:00.0-scsi-0:1:3:0-part3 -> | ||||
| > | ../../sda3 | ||||
| 55 | lrwxrwxrwx 1 root root 9 Jan 11 2012 pci-0000:06:00.0-fc-0x21110002ac0008b4: | ||||
| > | 0x0000000000000000 -> ../../sdc | ||||
| 56 | lrwxrwxrwx 1 root root 9 Jan 11 2012 pci-0000:2a:00.0-fc-0x20110002ac0008b4: | ||||
| > | 0x0000000000000000 -> ../../sdb | ||||
| 57 | |||||
| 58 | |||||
| 59 | [root@server]# ls -hal /dev/disk/by-id/ | ||||
| 60 | total 0 | ||||
| 61 | drwxr-xr-x 2 root root 140 Jan 11 2012 . | ||||
| 62 | drwxr-xr-x 6 root root 120 Jan 11 2012 .. | ||||
| 63 | lrwxrwxrwx 1 root root 9 Jan 11 2012 scsi-350002ac0343408b4 -> ../../sdb | ||||
| 64 | lrwxrwxrwx 1 root root 9 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b - | ||||
| > | > ../../sda | ||||
| 65 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b-p | ||||
| > | art1 -> ../../sda1 | ||||
| 66 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b-p | ||||
| > | art2 -> ../../sda2 | ||||
| 67 | lrwxrwxrwx 1 root root 10 Jan 11 2012 scsi-3600508e000000000cbd00903176ab80b-p | ||||
| > | art3 -> ../../sda3 | ||||
| 68 | |||||
| 69 | |||||
| 70 | blkid | ||||
| 71 | ============ | ||||
| 72 | |||||
| 73 | .. code-block:: bash | ||||
| 74 | |||||
| 75 | |||||
Remarkbox