[dm-devel] user defined device name and table
Pedro Bandim Faustino
pedro.faustino at fccn.pt
Wed Nov 28 10:32:00 UTC 2007
Hi Ben,
They do change names, the thing is that when the drivers are first
loaded at boot time, /dev/dm-0 gets multipathed and mapped to
/dev/mpath/mpath0 and /dev/mapper/mpath0
Afterwards when there's a context switch to userspace, /dev/dm-2 gets
multipathed and mapped to whatever alias I would have in multipath.conf
(I could have blacklisted dm-2).
[root at m07 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-2 3.8G 1.8G 1.9G 48% /
/dev/dm-1 99M 24M 70M 26% /boot
/dev/sde1 92G 188M 87G 1% /log
tmpfs 1014M 0 1014M 0% /dev/shm
So what I did was first change the table (modifying the init script of
the initrd), and booted.
Then I've issued a dmsetup rename and afterwards a mkinitrd. I've also
edited the multipath.conf in order to blacklist by WWID the local SAS
disk and the boot LUN, and also defined some policies for the FC SAN I'm
using (IBM DS4700), and booted.
This is now what I have:
[root at m07 ~]# multipath -ll
SRV07_BOOT () dm-0 IBM,1814 FAStT
[size=4.0G][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][enabled]
\_ 2:0:0:0 sda 8:0 [active][ready]
\_ 3:0:0:0 sdc 8:32 [active][ready]
\_ round-robin 0 [prio=6][active]
\_ 2:0:1:0 sdb 8:16 [active][ready]
\_ 3:0:1:0 sdd 8:48 [active][ready]
[root at m07 ~]# cat /etc/multipath.conf
defaults {
udev_dir /dev
polling_interval 2
selector "round-robin 0"
path_grouping_policy multibus
getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
prio_callout /bin/true
path_checker readsector0
rr_min_io 100
rr_weight priorities
failback immediate
no_path_retry fail
user_friendly_name yes
}
blacklist {
# Blacklist the local disk
wwid 35000c500057cd8d3
# Blacklist the root disk
wwid 3600a0b8000295d64000009304742b4c8
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
}
devices {
device {
vendor "IBM"
product "1814 FAStT"
path_grouping_policy group_by_serial
path_checker tur
prio_callout "/sbin/mpath_prio_tpc /dev/%n"
no_path_retry queue
}
}
Pedro Bandim Faustino
email/sip: pedro.faustino at fccn.pt
www.fccn.pt
Aviso de Confidencialidade
Esta mensagem é exclusivamente destinada ao seu destinatário, podendo conter informação CONFIDENCIAL, cuja divulgação está expressamente vedada nos termos da lei. Caso tenha recepcionado indevidamente esta mensagem, solicitamos-lhe que nos comunique esse mesmo facto por esta via ou para o telefone +351 218440100 devendo apagar o seu conteúdo de imediato. This message is intended exclusively for its addressee. It may contain CONFIDENTIAL information protected by law. If this message has been received by error, please notify us via e-mail or by telephone +351 218440100 and delete it immediately.
Benjamin Marzinski wrote:
> On Tue, Nov 27, 2007 at 09:31:51AM +0000, Pedro Bandim Faustino wrote:
>
>> Stefan Bader wrote:
>>
>>> You should be able to change the name by creating a multipaths section
>>> like below
>>>
>>> multipaths {
>>> multipath {
>>> wwid "3600a0b8000295d64000009304742b4c8"
>>> alias "SRV07_BOOT"
>>> }
>>> }
>>>
>>> If that does not work as expected, you might have to say "no" to the
>>> user friendly names option.
>>>
>> Hi Stefan,
>> I've tried that, but what happens is that once the multipathd starts
>> I'll have duplicate multipaths, the one at boot time and this one by
>> multipathd, with different names.
>>
>>
>
> If you add aliases to the multipaths section, like Stefan decribed, and
> then rerun multipath, do the devices change names to given aliases? They
> should. Then, you should be able to remake the initrd, and reboot and
> just see the alias. If you try this, and it doesn't work, let me know.
>
> -Ben
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2980 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20071128/94facd9a/attachment.bin>
More information about the dm-devel
mailing list