Translate this Page

 

When we used redundant SAN Switch to present the same LUN, Linux will recognize 1 LUN become 2. In the example we can see the size of /dev/sdb as same as /dev/sde (8069.5 GB) and /dev/sdc as same as /dev/sdd (5763.9 GB), actually we only created 2 LUN in the storage:

# fdisk -l

Disk /dev/sdb: 8069.5 GB, 8069496176640 bytes
255 heads, 63 sectors/track, 981060 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 5763.9 GB, 5763927244800 bytes
255 heads, 63 sectors/track, 700757 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 8069.5 GB, 8069496176640 bytes
255 heads, 63 sectors/track, 981060 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 5763.9 GB, 5763927244800 bytes
255 heads, 63 sectors/track, 700757 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000 

To unity the different path, we can used “multipath”‘

1. Install RPM Packages needed

libaio-0.3.107-10.el6.x86_64.rpm
libaio-devel-0.3.107-10.el6.x86_64.rpm
device-mapper-multipath-libs-0.4.9-41.el6.x86_64.rpm
kpartx-0.4.9-41.el6.x86_64.rpm
device-mapper-multipath-0.4.9-41.el6.x86_64.rpm

2. Copy multipath.conf template into /etc/multipath.conf

# more /etc/multipath.conf
# multipath.conf written by anaconda

defaults {
user_friendly_names yes
}
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
devnode "^dcssblk[0-9]*"
device {
vendor "DGC"
product "LUNZ"
}
device {
vendor "IBM"
product "S/390.*"
}
# don't count normal SATA devices as multipaths
device {
vendor "ATA"
}
# don't count 3ware devices as multipaths
device {
vendor "3ware"
}
device {
vendor "AMCC"
}
# nor highpoint devices
device {
vendor "HPT"
}
wwid "3600508b1001cf136c99011383a3bca7b"
device {
vendor hp
product DVD_A_DS8A5LH
}
wwid "*"
}
blacklist_exceptions {
wwid "360060e80164fe80000014fe800000104"
wwid "360060e80164fe80000014fe800000100"
}
multipaths {
multipath {
uid 0
alias mpatha
gid 0
wwid "360060e80164fe80000014fe800000104"
mode 0600
}
multipath {
uid 0
alias mpathb
gid 0
wwid "360060e80164fe80000014fe800000100"
mode 0600
}
}

3. Find WWID of Drive’s

# scsi_id -g -u /dev/sde
360060e80164fe80000014fe800000104
# scsi_id -g -u /dev/sdd
360060e80164fe80000014fe800000100
# scsi_id -g -u /dev/sdc
360060e80164fe80000014fe800000104
# scsi_id -g -u /dev/sdb
360060e80164fe80000014fe800000100

4. Add WWID into multipath.conf

5. modprobe dm-multipath

6. service multipathd start

7. multipath -d (this will perform a dry to make sure you are happy with everything, fix anything that appears as a problem)

8. multipath -v2 (commits the configuration)

9. multipath -ll

10. chkconfig multipathd on (make devices are configured after a reboot)

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2012 LevICORP's webnote Suffusion theme by Sayontan Sinha