Setting up a multipath device
Hi,
I'm new to device mapper and trying to set a multipath target:
I'm connected to the same LUN over iSCSI in 2 paths:
Here's the output of sg_map:sg_map -i -x/dev/sg0 3 0 0 0 0 /dev/sda DotHill SANnet II FC 411I /dev/sg1 4 0 0 0 0 /dev/sdb DotHill SANnet II FC 411I
I ran the following command:
multipath 2 round-robin 1 0 /dev/sda round-robin 1 0 /dev/sdb
If I understand correctly, the 1st priority group contains /dev/sda. The 2nd priority group contains /dev/sdb. If /dev/sda fails, traffic should automatically move to /dev/sdb. Is that right?
Here's the out put of multipath -l:
3600c0ff00000000007c1d121c397f503
[size=10 GB][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
\_ 3:0:0:0 sda 8:0 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 4:0:0:0 sdb 8:16 [active][undef]
What does 8:0 & 8:16 mean? What is 3600c0ff00000000007c1d121c397f503?
Now, assuming that what I did so far is ok, how do I use the multipath device? Do I use /dev/sda (or /dev/sdb)?
Thanks in advance
Signature · 11 lines
____________________________________________________________ Erez Zilber | 972-9-971-7689 Software Engineer, Storage Team Voltaire – _The Grid Backbone_ __ www.voltaire.com <http://www.voltaire.com/>
Quoted 6 lines · Erez Zilber
Hi,
I'm new to device mapper and trying to set a multipath target:
I'm connected to the same LUN over iSCSI in 2 paths:
Quoted 8 lines
Here's the output of
sg_map:sg_map-i -x/dev/sg03 0 0 0 0/dev/sdaDotHill SANnet II FC 411I/dev/sg14 0 0 0 0/dev/sdbDotHill SANnet II FC 411II ran the following command:
multipath 2 round-robin 1 0/dev/sdaround-robin 1 0/dev/sdb
Just start multipathd
or run multipath without params
Quoted 6 lines
If I understand correctly, the 1st priority group contains
/dev/sda. The 2nd priority group contains/dev/sdb. If/dev/sdafails, traffic should automatically move to/dev/sdb. Is that right?Here's the out put of multipath -l:
Quoted 9 lines
3600c0ff00000000007c1d121c397f503
[size=10 GB][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
\_ 3:0:0:0 sda 8:0 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 4:0:0:0 sdb 8:16 [active][undef]What does 8:0 & 8:16 mean? What is
3600c0ff00000000007c1d121c397f503?
8:0 & 8:16 are paths major:minor numbers 3600c0ff00000000007c1d121c397f503 is the multipath name. consider activating the fancy naming option in the config file.
Quoted 3 lines
Now, assuming that what I did so far is ok, how do I use the multipath device? Do I use
/dev/sda(or/dev/sdb)?
You should use /dev/mapper/3600c0ff00000000007c1d121c397f503
Regards,
cvaroqui
Quoted 51 lines · Christophe Varoqui
Quoted 6 lines · Erez Zilber
Hi,
I'm new to device mapper and trying to set a multipath target:
I'm connected to the same LUN over iSCSI in 2 paths:
Quoted 10 lines
Here's the output of
sg_map:sg_map-i -x/dev/sg03 0 0 0 0/dev/sdaDotHill SANnet II FC 411I/dev/sg14 0 0 0 0/dev/sdbDotHill SANnet II FC 411II ran the following command:
multipath 2 round-robin 1 0/dev/sdaround-robin 1 0/dev/sdbJust start multipathd
or run multipath without paramsQuoted 4 lines
If I understand correctly, the 1st priority group contains
/dev/sda. The 2nd priority group contains/dev/sdb. If/dev/sdafails, traffic should automatically move to/dev/sdb. Is that right?Here's the out put of multipath -l:
Quoted 11 lines
3600c0ff00000000007c1d121c397f503
[size=10 GB][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
\_ 3:0:0:0 sda 8:0 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 4:0:0:0 sdb 8:16 [active][undef]What does 8:0 & 8:16 mean? What is
3600c0ff00000000007c1d121c397f503?8:0 & 8:16 are paths major:minor numbers
3600c0ff00000000007c1d121c397f503is the multipath name. consider activating the fancy naming option in the config file.Quoted 4 lines
Now, assuming that what I did so far is ok, how do I use the multipath device? Do I use
/dev/sda(or/dev/sdb)?You should use
/dev/mapper/3600c0ff00000000007c1d121c397f503
Quoted 9 lines
Regards,
cvaroqui--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Thanks. It seems to work now. Anyway, I have some more questions:
1. Was it wrong to run 'multipath 2 round-robin 1 0 /dev/sda
round-robin 1 0 /dev/sdb'?
2. If I don't supply any parameters, how does the dm know which devices are the same physical device (that /dev/sda & /dev/sdb are the same physical device)?
3. How are the priority groups defined if no parameters are supplied?
4. What is the timeout for a device that has failed? When does the dm move to the next priority group?
Thanks
Signature · 11 lines
____________________________________________________________ Erez Zilber | 972-9-971-7689 Software Engineer, Storage Team Voltaire – _The Grid Backbone_ __ www.voltaire.com <http://www.voltaire.com/>
Quoted 4 lines
1. Was it wrong to run 'multipath 2 round-robin 1 0
/dev/sdaround-robin 1 0 /dev/sdb'?
The multipath command just don't understand these parameters. This is a map as seen by the DM kernel driver. You can feed it to dmsetup(8), not to multipath(8).
Quoted 3 lines
2. If I don't supply any parameters, how does the dm know which devices are the same physical device (that
/dev/sda&/dev/sdbare the same physical device)?
Because it scans the paths for unique LU ids, then coalesce.
Quoted 1 line
3. How are the priority groups defined if no parameters are supplied?
User defines, through config file.
Quoted 3 lines
4. What is the timeout for a device that has failed? When does the dm move to the next priority group?
When secondary PG priority becomes higher than the active PG priority, modulo user-define delay or user-define disabling.
Or when all paths in the active PG have failed.
Regards,
cvaroqui
Some more questions:
1. I couldn't find the config file. Where is it located? Is there any documentation about it?
2. How can I configure fancy naming for devices (instaed of using something like /dev/mapper/3600c0ff00000000007c1d121c397f503) in the config file?
3. How can I config the delay from the time that a device has failed until the dm moves to the next active device? Again, I understand that I should use the config file somehow.
I tried to run the following test: I created a multipath device with 2 physical devices (/dev/sda & /dev/sdb). I started running traffic on the multipath device. All traffic ran through /dev/sda. Then, I disconnected the iSCSI target that was represented by /dev/sda. After some time, the traffic was directed to /dev/sdb. I stopped the traffic, disconnected the iSCSI target that was represented by /dev/sdb and reconnected /dev/sda. Now, if I run multipath -l, I see the following output:
3600c0ff00000000007c1d121c397f503
[size=10 GB][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][enabled]
\_ 0:0:0:0 sda 8:0 [failed][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 1:0:0:0 sdb 8:16 [failed][faulty]
/dev/sdb is dead and I'm ok with it. However, /dev/sda is alive. I was able to run the following command:
dd if=/dev/sda of=/dev/null count=100000
However, if I run the following command:
dd if=/dev/mapper/3600c0ff00000000007c1d121c397f503 of=/dev/null count=100000
This is what I get:
dd: reading `/dev/mapper/3600c0ff00000000007c1d121c397f503': Input/output error 0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00067 seconds, 0.0 kB/s
Can't it recongnize that a device that has failed (/dev/sda) is back to life?
Thanks
Erez
Quoted 4 lines · Erez Zilber
Some more questions:
1. I couldn't find the config file. Where is it located? Is there any documentation about it?
The config file normal location is /etc/multipath.conf
Quoted 3 lines
2. How can I configure fancy naming for devices (instaed of using something like
/dev/mapper/3600c0ff00000000007c1d121c397f503) in the config file?
Have a look at the templates provided with the upstream package.
Quoted 4 lines
3. How can I config the delay from the time that a device has failed until the dm moves to the next active device? Again, I understand that I should use the config file somehow.
Ditto.
Quoted 27 lines
I tried to run the following test: I created a multipath device with 2 physical devices (
/dev/sda&/dev/sdb). I started running traffic on the multipath device. All traffic ran through/dev/sda. Then, I disconnected the iSCSI target that was represented by/dev/sda. After some time, the traffic was directed to/dev/sdb. I stopped the traffic, disconnected the iSCSI target that was represented by/dev/sdband reconnected/dev/sda. Now, if I runmultipath -l, I see the following output:
3600c0ff00000000007c1d121c397f503
[size=10 GB][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][enabled]
\_ 0:0:0:0 sda 8:0 [failed][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 1:0:0:0 sdb 8:16 [failed][faulty]
/dev/sdbis dead and I'm ok with it. However,/dev/sdais alive. I was able to run the following command:dd if=/dev/sda of=/dev/null count=100000
However, if I run the following command:
dd if=/dev/mapper/3600c0ff00000000007c1d121c397f503 of=/dev/null count=100000
This is what I get:
Quoted 9 lines
dd: reading `/dev/mapper/3600c0ff00000000007c1d121c397f503':
Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00067 seconds, 0.0 kB/sCan't it recongnize that a device that has failed (
/dev/sda) is back to life?
Is the daemon (multipathd) running ? The daemon takes care of path revalidation.
Regards,
cvaroqui