Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to configure iscsi fault tolerance in ubuntu 12.04? iSCSI SANs usually have multiple controllers that make failover transparent to the clients.. what i am doing is the following. i made an ubuntu pc as target which means a pc to work as storage where i map its hdd as LUN also there is another pc which works as initiator so there is no ready solutions such as SAN im doing from scratch so i need to learn how to configure that.

share|improve this question
add comment

2 Answers

Could you please be more specific? iSCSI SANs usually have multiple controllers that make failover transparent to the clients, the SAN IP is simply attached to the remaining controller. Multipath is multipath, it's an OS independent concept, Linux multipath readily supports many iSCSI SANs.

https://help.ubuntu.com/12.04/serverguide/device-mapper-multipathing.html

Update 8/17/2012 So depending on how you defined the network you might have the capacity to create path redundancy, but the storage host itself is one big single point of failure. As long as you understand that you can create a custom solution. There are some roadblocks however.

Multipath operates on the concept of interrogating the paths, identifying all the ones that respond with the same WWID, which is the result of running scsi_id, and then using that to group the correct paths under a single map, and enforce the grouping policy defined. Since these iscsi initiators are essentially virtual devices, they usually don't go so far as to define unique attributes for them. For example.

root@ubuntu02:/persistent/home/intel# sg_vpd -p di /dev/sda
Device Identification VPD page:
  Addressed logical unit:
    designator type: EUI-64 based,  code set: Binary
      0x22f7000155affff4
    designator type: vendor specific [0x0],  code set: ASCII
      vendor specific: 0xC001IntelVD VMBOOT1
  Target port:
    designator type: Relative target port,  code set: Binary
      Relative target port: 0x2
    designator type: Target port group,  code set: Binary
      Target port group: 0x0

Is probably going to return nothing. If you notice in the multipath.conf there's a line called "getuid_callout", usually pointing to a tool called *scsi_id*

/lib/udev/scsi_id --whitelisted /dev/sda
222f7000155affff4

getuid_callout can be substituted with anything you want, in your case you'll need to define some deterministic mapping, so the paths you've exposed over the network really do point to the same device. Otherwise you're just going to scribble garbage everywhere. Once you have that you can create a basic multibus group with constant priority.

    device {
        vendor "FOO"
        product "BAR"
        path_grouping_policy multibus
        getuid_callout "your-custom-uid-script"
        path_selector round-robin 0
        path_checker directio
        checker directio
        prio constant
        failback immediate
    }

If you want a more sophisticated policy you're going to need to define a prio handler that can rank your paths, after that you could group by priority etc.

I'm making a lot of assumptions here, I don't normally deal with iSCSI, I'm assuming that it will allow you to create multiple paths to the same backing store on the same host, I further assume that each path is exported over an isolated network where you client has access to both.

You could also create a basic multipath map by hand, all multipath-tools is doing is creating a neat interface to streamline DMDEVICE, provide a path checker, and manage paths as they come and go. You could create a map directly using dmsetup, it would even failover, just not very efficient and you would have to manage the path membership yourself.

http://christophe.varoqui.free.fr/refbook.html

See "example of a multipath target".

Alternatively you could go with a network bonding solution, at least you'll have higher availability than you do now, but at the expense of performance.

share|improve this answer
    
@ppetraki... i know that iSCSI SANs usually have multiple controllers that make failover transparent to the clients.. what i am doing is the following. i made an ubuntu pc as target which means a pc to work as storage where i map its hdd as LUN also thereis another pc which works as initiator so there is no ready solutions such as SAN im doing from scratch so i need to learn how to configure that. –  user61928 Aug 17 '12 at 8:02
add comment
up vote 0 down vote accepted

You can use a pre-configured tool called glusterfs. This tutorial is so easy and very useful , hoping it will help you...click this link

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.