- 论坛徽章:
- 0
|
Setup Multipath
Setup Multipath
To that Linux can have access to the data storage, you must configure the multipath. The package responsible for communicating with the Linux is the storage-device-mapper multipath.
After presenting the disks of storage for Linux (not discussed here as it is that) we should see if the Linux is viewing the disk's storage.
Edit /etc/multipath.conf and comment below the block so that the devices are not blocked, leave and below, and also make sure user_friendly_names is setada to yes, if not, do so.
#blacklist {
# devnode "*"
#}
After this, make sure that the module is loaded dm_multipath
[root@node1 /]# lsmod | grep dm_multipath
dm_multipath 52433 2 dm_round_robin
dm_mod 96017 7 dm_mirror,dm_multipath
Inicialize o serviço multipathd [root@node1 /]# multipath -l
mpath0 (3600508b40010870a0001e000000d0000) dm-0 HP,HSV200
[size=10G][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=0][active]
\_ 0:0:1:1 sdb 8:16 [active][undef]
\_ 1:0:0:1 sdc 8:32 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 0:0:0:1 sda 8:0 [active][undef]
\_ 1:0:1:1 sdd 8:48 [active][undef]
You can also see in /dev/mpath / something like below
lrwxrwxrwx 1 root root 7 Mar 7 09:49 3600508b40010870a0001e000000d0000 -> ../dm-0
And as we leave the option user_friendly_names setada to yes, we can use a friendly name you locate the device created, it can be seen on / dev / mapper /
[root@node1 ~]# ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 100 Mar 7 09:49 .
drwxr-xr-x 14 root root 4280 Mar 7 09:49 ..
crw------- 1 root root 10, 63 Mar 7 09:49 control
brw-rw---- 1 root disk 253, 0 Mar 7 09:49 mpath0
All right so far, you have to do is create a partition on this disk mpath0 and create the file system for her.
Create a partition with the command fdisk / dev/mapper/mpath0.
Then
[root@node1 ~]# partprobe
then, create the file system on the partition created.
[root@node1 ~]# mkfs.ext3 /dev/mapper/mpath0p1
Okay, we can test the partition mounting somewhere
[root@node1 ~]# mount /dev/mapper/mpath0p1 /mnt
And you can see the disc mounted
[root@node1 ~]# df -h | grep mpath0p1
/dev/mapper/mpath0p1 9.9G 999M 8.4G 11% /mnt
The file / var / lib / multipath / bindings is created automatically from the multipathd daemon, and has the friendly name for the multipath, an example of its content is below.
mpath0 3600508b40010870a0001e000000d0000
obs.: It is very important that this file is equal for both us, because otherwise we will have problems with the assembly of the partition. If this occurs, check the documentation and see how to create aliases to the wwid, may be the solution.
[ 本帖最后由 gl00ad 于 2008-10-30 09:40 编辑 ] |
|