Merge branch 'master' of git://git.kernel.org/pub/scm/linux/storage/multipath-tools/
[platform/upstream/multipath-tools.git] / FAQ
1 More at http://christophe.varoqui.free.fr/faq.html
2 See also http://christophe.varoqui.free.fr/usage.html
3
4 1. How to set up System-on-multipath ?
5 ======================================
6
7 prerequisite : udev and multipath-tools installed
8
9 here are the steps on a Debian SID system :
10
11 * add dm-mpath and dm-multipath to /etc/mkinitrd/modules
12 * copy $tools_dir/multipath/0[12]_* to /etc/mkinitrd/scripts
13 * define a friendly alias for your multipathed root disk
14   (in /etc/multipath.conf). Example : "system"
15 * enable busybox in /etc/mkinitrd/mkinitrd.conf and set ROOT
16   to any valid block-device (but not a /dev/dm-* one, due to
17   an mkintrd misbelief that all dm-* are managed by LVM2)
18 * run mkinitrd
19 * in /boot/grub/menu.lst, define the root= kernel parameter
20   Example : root=/dev/system1
21 * modify /etc/fstab to reference /dev/system* partitions
22
23 At reboot, you should see some info like :
24
25 path /dev/sda : multipath system
26 ...
27 gpt: 0 slices
28 dos: 5 slices
29 reduced size of partition #2 to 63
30 Added system1 : 0 70685937 linear /dev/system 63
31 Added system2 : 0 63 linear /dev/system 7068600
32 Added system5 : 0 995967 linear /dev/system 70686063
33 ...
34
35 2. How does it compare to commercial product XXX ?
36 ==================================================
37
38 Here are a few distinctive features :
39
40 * you can mix HBA models, even different vendors, different speed ...
41 * you can mix storage controllers on your SAN, and access them all, applying
42   different path grouping policy
43 * completely event-driven model : no administration burden if you accept the
44   default behaviours
45 * extensible : you can plug your own policies if the available ones don't fill
46   your needs
47 * supports root FS on multipathed SAN
48 * free, open-source software
49
50 3. LVM2 doesn't see my multipathed devices as PV, what's up ?
51 =============================================================
52
53 By default, lvm2 does not consider device-mapper block devices (such as a
54 dm-crypt device) for use as physical volumes.
55
56 In order to use a dm-crypt device as an lvm2 pv, add this line to the
57 devices block in /etc/lvm/lvm.conf:
58
59 types = [ "device-mapper", 16 ]
60
61 If /etc/lvm/lvm.conf does not exist, you can create one based on your 
62 current/default config like so:
63
64 lvm dumpconfig > /etc/lvm/lvm.conf
65
66 (tip from Christophe Saout)
67
68 4. I see a lot of "io_setup failed" message using the directio checker
69 ======================================================================
70
71 The directio path checker makes use of the asynchronous I/O API (aio) provided
72 by modern Linux systems. Asynchronous I/O allows an application to submit I/O
73 requests asynchronously and be notified later of their completion status. To
74 allow this, we must allocate an asynchronous I/O context (an object of type
75 aio_context_t) and this task is handled by the io_setup system call.
76
77 A system wide limit on the number of AIO contexts that may be active
78 simultaneously is imposed via the aio-max-nr sysctl parameter.
79
80 Once this limit has been reached further calls to io_setup will fail with the
81 error number EAGAIN leading to the "io_setup failed" messages seen for e.g. when
82 running "multipath -ll".
83
84 To avoid this problem the number of available aio contexts should be increased
85 by setting the aio-max-nr parameter. This can be set on a one-time basis via the
86 /proc file system, for e.g.:
87
88         # echo 131072 > /proc/sys/fs/aio-max-nr
89
90 Doubles the number of available contexts from the default value of 65536.
91
92 To make this setting persistent a line may be added to /etc/sysctl.conf:
93
94         fs.aio-max-nr = 131072
95
96 Consult appropriate application and operating system tuning recommendations for
97 guidance on appropriate values for this parameter.