- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Setup and Networking
- >
- Use IQN string as device name in Linux with multip...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2014 09:47 PM
01-06-2014 09:47 PM
Use IQN string as device name in Linux with multipathing
Sometimes it's difficult to know which device is which under Linux. Even more difficult when adding in the multipathing layer. This can all be remedied with a custom script and a few modifications to the multipath.conf file. The multipath.conf file has a parameter for creating a custom callout script for naming and grouping devices. The default is to use the SCSI ID of the device. This is how multipathd knows which devices should be grouped together. This custom script will use the unique IQN string of the device which will make identifying the device later through device mapper much easier.
The first step is to create a file /usr/local/sbin/iscsi_id.sh with the following content and set it as executable.
#!/bin/bash
ls -l /dev/disk/by-path/ | egrep iscsi | egrep "$1$" | sed -e 's/.*:\([a-z0-9.:-]*\).*/\1/'
Then modify the /etc/multipath.conf file with the getuid_callout variable on line 32 to point to the new script.
defaults {
path_grouping_policy multibus
rr_min_io 20
}
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z][[0-9]*]"
device {
vendor "*"
product "*"
}
}
blacklist_exceptions {
device {
vendor "Nimble"
product "Server"
}
}
devices {
device {
vendor "Nimble"
product "Server"
path_selector "round-robin 0"
path_grouping_policy group_by_serial
path_checker tur
rr_min_io 20
failback manual
rr_weight priorities
getuid_callout "/usr/local/sbin/iscsi_id.sh %n"
}
}
Once these changes are in place listing /dev/mapper makes the time spent making this modification worth all the effort.
ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 236 Dec 17 08:48 control
lrwxrwxrwx 1 root root 7 Dec 17 13:28 mysql-clone-v16da9ef36265f874.000001dd.74bf6687-lun-0 -> ../dm-2
lrwxrwxrwx 1 root root 7 Dec 17 13:28 mysql-clone-v16da9ef36265f874.000001dd.74bf6687-lun-0-part1 -> ../dm-3