Linux tips and tricks for faster and easier administration Linux servers and applications! Troubleshooting and solutions!

Wednesday, 9 July 2014

Adding new LUN with multipath on Linux

So you have need to add another LUN to your server. Here is procedure how to do it if you use multipath on your server!

First your storage admin has to assign new LUN to you server. You may see this in you log when LUN is added from storage side

kernel: sd 1:0:0:10: [sdbb] Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatically remap LUN assignments.
After this is done, you can proceed.
List your current multipath status

From multipath -ll you can see that we are using host1 and host2 (this is important in case that you have more than two fc single port card or some dual port card- every fc port will be represented as hostX). In this case we have two single port cards and ports are represented as host1 and host2.

Don't be confused on my server I see 4 paths for every LUN because I have two FC ports connected to two FC switch. From single FC switch to storage, we have two connection because of redundancy. So in total, we have 4 paths from server to storage.