All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pedro Bandim Faustino <pedro.faustino@fccn.pt>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: user defined device name and table
Date: Wed, 28 Nov 2007 10:32:00 +0000	[thread overview]
Message-ID: <474D43A0.8010602@fccn.pt> (raw)
In-Reply-To: <20071127194820.GA25939@ether.msp.redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 4367 bytes --]

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@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@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@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@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
>   


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2980 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2007-11-28 10:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26 14:53 user defined device name and table Pedro Bandim Faustino
2007-11-26 16:44 ` Stefan Bader
2007-11-27  9:31   ` Pedro Bandim Faustino
2007-11-27 19:48     ` Benjamin Marzinski
2007-11-28 10:32       ` Pedro Bandim Faustino [this message]
2007-11-26 19:46 ` malahal
2007-11-27 10:00   ` user defined device name and table - SOLVED Pedro Bandim Faustino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=474D43A0.8010602@fccn.pt \
    --to=pedro.faustino@fccn.pt \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.