All of lore.kernel.org
 help / color / mirror / Atom feed
* user defined device name and table
@ 2007-11-26 14:53 Pedro Bandim Faustino
  2007-11-26 16:44 ` Stefan Bader
  2007-11-26 19:46 ` malahal
  0 siblings, 2 replies; 7+ messages in thread
From: Pedro Bandim Faustino @ 2007-11-26 14:53 UTC (permalink / raw)
  To: dm-devel


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

Hi All,

I have a working multipath on root, but some questions still unanswered.
I'm hoping you can help me out ;)

My setup details:
Machine: IBM Blade Server HS21 with two Qlogic HBAs each connected to a 
FC switch with two active ports
Storage IBM DS4700 with two controllers
OS: Fedora 7
DM packages:
    - device-mapper-1.02.17-7.fc7
    - device-mapper-libs-1.02.17-7.fc7
    - device-mapper-multipath-0.4.7-11.fc7
uname -r: 2.6.23.1-21.fc7

At the moment this is what I have:

Output of multipath -ll:
mpath0 () dm-0 IBM,1814      FAStT
[size=4.0G][features=0][hwhandler=0]
\_ round-robin 0 [prio=4][active]
 \_ 2:0:0:0 sda 8:0   [active][ready]
 \_ 2:0:1:0 sdb 8:16  [active][ready]
 \_ 3:0:0:0 sdc 8:32  [active][ready]
 \_ 3:0:1:0 sdd 8:48  [active][ready]

Output of df -k:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/dm-2              3960348   1772124   1983800  48% /
/dev/dm-1               101086     17593     78274  19% /boot
tmpfs                  1037416         0   1037416   0% /dev/shm

Contents of /dev/mapper/:
crw-------  1 root root  10, 63 2007-11-26 13:58 control
brw-rw----  1 root disk 253,  0 2007-11-26 13:58 mpath0
brw-rw----  1 root disk 253,  1 2007-11-26 13:58 mpath0p1
brw-rw----  1 root disk 253,  2 2007-11-26 13:58 mpath0p2

But this is what I really would like to have:

Output of multipath -ll:
SRV07_BOOT (3600a0b8000295d64000009304742b4c8) dm-0 IBM,1814      FAStT
[size=4.0G][features=1 queue_if_no_path][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]


I can modify the table by modifying the init script in the initrd image 
and then booting with the modified initrd image but I don't know how to 
change the name from mpath0 to SRV07_BOOT.

Any help will be very appreciated!!

Thank you,
Pedro Faustino

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

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user defined device name and table
  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-26 19:46 ` malahal
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Bader @ 2007-11-26 16:44 UTC (permalink / raw)
  To: pedro.faustino, device-mapper development


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

2007/11/26, Pedro Bandim Faustino <pedro.faustino@fccn.pt>:
>
> Hi All,
>
> I have a working multipath on root, but some questions still unanswered.
> I'm hoping you can help me out ;)
>
> My setup details:
> Machine: IBM Blade Server HS21 with two Qlogic HBAs each connected to a
> FC switch with two active ports
> Storage IBM DS4700 with two controllers
> OS: Fedora 7
> DM packages:
>     - device-mapper-1.02.17-7.fc7
>     - device-mapper-libs-1.02.17-7.fc7
>     - device-mapper-multipath-0.4.7-11.fc7
> uname -r: 2.6.23.1-21.fc7
>
> At the moment this is what I have:
>
> Output of multipath -ll:
> mpath0 () dm-0 IBM,1814      FAStT
> [size=4.0G][features=0][hwhandler=0]
> \_ round-robin 0 [prio=4][active]
> \_ 2:0:0:0 sda 8:0   [active][ready]
> \_ 2:0:1:0 sdb 8:16  [active][ready]
> \_ 3:0:0:0 sdc 8:32  [active][ready]
> \_ 3:0:1:0 sdd 8:48  [active][ready]
>
> Output of df -k:
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/dm-2              3960348   1772124   1983800  48% /
> /dev/dm-1               101086     17593     78274  19% /boot
> tmpfs                  1037416         0   1037416   0% /dev/shm
>
> Contents of /dev/mapper/:
> crw-------  1 root root  10, 63 2007-11-26 13:58 control
> brw-rw----  1 root disk 253,  0 2007-11-26 13:58 mpath0
> brw-rw----  1 root disk 253,  1 2007-11-26 13:58 mpath0p1
> brw-rw----  1 root disk 253,  2 2007-11-26 13:58 mpath0p2
>
> But this is what I really would like to have:
>
> Output of multipath -ll:
> SRV07_BOOT (3600a0b8000295d64000009304742b4c8) dm-0 IBM,1814      FAStT
> [size=4.0G][features=1 queue_if_no_path][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]
>
>
> I can modify the table by modifying the init script in the initrd image
> and then booting with the modified initrd image but I don't know how to
> change the name from mpath0 to SRV07_BOOT.


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.

Any help will be very appreciated!!
>
> Thank you,
> Pedro Faustino
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
>

[-- Attachment #1.2: Type: text/html, Size: 4030 bytes --]

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user defined device name and table
  2007-11-26 14:53 user defined device name and table Pedro Bandim Faustino
  2007-11-26 16:44 ` Stefan Bader
@ 2007-11-26 19:46 ` malahal
  2007-11-27 10:00   ` user defined device name and table - SOLVED Pedro Bandim Faustino
  1 sibling, 1 reply; 7+ messages in thread
From: malahal @ 2007-11-26 19:46 UTC (permalink / raw)
  To: pedro.faustino, device-mapper development

Pedro Bandim Faustino [pedro.faustino@fccn.pt] wrote:
> Hi All,
>
> I have a working multipath on root, but some questions still unanswered.
> I'm hoping you can help me out ;)
>
> But this is what I really would like to have:
>
> Output of multipath -ll:
> SRV07_BOOT (3600a0b8000295d64000009304742b4c8) dm-0 IBM,1814      FAStT
> [size=4.0G][features=1 queue_if_no_path][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]
>
>
> I can modify the table by modifying the init script in the initrd image and 
> then booting with the modified initrd image but I don't know how to change 
> the name from mpath0 to SRV07_BOOT.

I don't know how Fedora Core 7 handles this in the initrd. Old RHEL
systems (prior to RHEL5.1) have nash commands to construct hard coded
multipath devices. You probably supply the name as part those commands.
If Fedora Core 7 uses something similar to RHEL5.2, then you could
probably use aliases in the multipath.conf file and rebuild initrd???

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user defined device name and table
  2007-11-26 16:44 ` Stefan Bader
@ 2007-11-27  9:31   ` Pedro Bandim Faustino
  2007-11-27 19:48     ` Benjamin Marzinski
  0 siblings, 1 reply; 7+ messages in thread
From: Pedro Bandim Faustino @ 2007-11-27  9:31 UTC (permalink / raw)
  To: Stefan Bader; +Cc: device-mapper development


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


Stefan Bader wrote:
>
>
> 2007/11/26, Pedro Bandim Faustino <pedro.faustino@fccn.pt 
> <mailto:pedro.faustino@fccn.pt>>:
>
>     Hi All,
>
>     I have a working multipath on root, but some questions still
>     unanswered.
>     I'm hoping you can help me out ;)
>
>     My setup details:
>     Machine: IBM Blade Server HS21 with two Qlogic HBAs each connected
>     to a
>     FC switch with two active ports
>     Storage IBM DS4700 with two controllers
>     OS: Fedora 7
>     DM packages:
>         - device-mapper-1.02.17-7.fc7
>         - device-mapper-libs-1.02.17-7.fc7
>         - device-mapper-multipath-0.4.7-11.fc7
>     uname -r: 2.6.23.1-21.fc7
>
>     At the moment this is what I have:
>
>     Output of multipath -ll:
>     mpath0 () dm-0 IBM,1814      FAStT
>     [size=4.0G][features=0][hwhandler=0]
>     \_ round-robin 0 [prio=4][active]
>     \_ 2:0:0:0 sda 8:0   [active][ready]
>     \_ 2:0:1:0 sdb 8:16  [active][ready]
>     \_ 3:0:0:0 sdc 8:32  [active][ready]
>     \_ 3:0:1:0 sdd 8:48  [active][ready]
>
>     Output of df -k:
>     Filesystem           1K-blocks      Used Available Use% Mounted on
>     /dev/dm-2              3960348   1772124   1983800  48% /
>     /dev/dm-1               101086     17593     78274  19% /boot
>     tmpfs                  1037416         0   1037416   0% /dev/shm
>
>     Contents of /dev/mapper/:
>     crw-------  1 root root  10, 63 2007-11-26 13:58 control
>     brw-rw----  1 root disk 253,  0 2007-11-26 13:58 mpath0
>     brw-rw----  1 root disk 253,  1 2007-11-26 13:58 mpath0p1
>     brw-rw----  1 root disk 253,  2 2007-11-26 13:58 mpath0p2
>
>     But this is what I really would like to have:
>
>     Output of multipath -ll:
>     SRV07_BOOT (3600a0b8000295d64000009304742b4c8) dm-0
>     IBM,1814      FAStT
>     [size=4.0G][features=1 queue_if_no_path][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]
>
>
>     I can modify the table by modifying the init script in the initrd
>     image
>     and then booting with the modified initrd image but I don't know
>     how to
>     change the name from mpath0 to SRV07_BOOT.
>
>
> 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.

>
>     Any help will be very appreciated!!
>
>     Thank you,
>     Pedro Faustino
>
>     --
>     dm-devel mailing list
>     dm-devel@redhat.com <mailto:dm-devel@redhat.com>
>     https://www.redhat.com/mailman/listinfo/dm-devel
>
>

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

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user defined device name and table - SOLVED
  2007-11-26 19:46 ` malahal
@ 2007-11-27 10:00   ` Pedro Bandim Faustino
  0 siblings, 0 replies; 7+ messages in thread
From: Pedro Bandim Faustino @ 2007-11-27 10:00 UTC (permalink / raw)
  To: malahal, device-mapper development


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

malahal@us.ibm.com wrote:
> Pedro Bandim Faustino [pedro.faustino@fccn.pt] wrote:
>   
>> Hi All,
>>
>> I have a working multipath on root, but some questions still unanswered.
>> I'm hoping you can help me out ;)
>>
>> But this is what I really would like to have:
>>
>> Output of multipath -ll:
>> SRV07_BOOT (3600a0b8000295d64000009304742b4c8) dm-0 IBM,1814      FAStT
>> [size=4.0G][features=1 queue_if_no_path][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]
>>
>>
>> I can modify the table by modifying the init script in the initrd image and 
>> then booting with the modified initrd image but I don't know how to change 
>> the name from mpath0 to SRV07_BOOT.
>>     
>
> I don't know how Fedora Core 7 handles this in the initrd. Old RHEL
> systems (prior to RHEL5.1) have nash commands to construct hard coded
> multipath devices. You probably supply the name as part those commands.
> If Fedora Core 7 uses something similar to RHEL5.2, then you could
> probably use aliases in the multipath.conf file and rebuild initrd???
>   
Fedora does use nash commands in its mkinitrd script. From what I 
understood Fedora 7 mkinitrd doesn't fetch multipath settings from the 
conf file, instead it checks the current, in use, settings.

So, what I've done was change the table (at boot time, modifying the 
init script of the initrd image) and rebooted with this new image.
Then, I've changed the friendly name (using dmsetup rename command), 
issued a mkinitrd and rebooted with this new image.
(You can do the above by modifying the init script just once)

So I finally got the what I wanted and also the desired names at 
/dev/mapper and /dev/mpath.
What I'm going to do now is configure the multipathd and multipath.conf 
to finish my setup.

Cheers and thanks for your help,
Pedro Bandim Faustino

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

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user defined device name and table
  2007-11-27  9:31   ` Pedro Bandim Faustino
@ 2007-11-27 19:48     ` Benjamin Marzinski
  2007-11-28 10:32       ` Pedro Bandim Faustino
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2007-11-27 19:48 UTC (permalink / raw)
  To: pedro.faustino, device-mapper development

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user defined device name and table
  2007-11-27 19:48     ` Benjamin Marzinski
@ 2007-11-28 10:32       ` Pedro Bandim Faustino
  0 siblings, 0 replies; 7+ messages in thread
From: Pedro Bandim Faustino @ 2007-11-28 10:32 UTC (permalink / raw)
  To: Benjamin Marzinski; +Cc: device-mapper development


[-- 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 --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-28 10:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-11-26 19:46 ` malahal
2007-11-27 10:00   ` user defined device name and table - SOLVED Pedro Bandim Faustino

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.