FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 11-26-2007, 03:44 PM
"Stefan Bader"
 
Default user defined device name and table

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



--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 11-26-2007, 06:46 PM
 
Default user defined device name and table

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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 11-27-2007, 08:31 AM
Pedro Bandim Faustino
 
Default user defined device name and table

Stefan Bader wrote:



2007/11/26, Pedro Bandim Faustino <pedro.faustino@fccn.pt
<mailtoedro.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


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 11-27-2007, 06:48 PM
Benjamin Marzinski
 
Default user defined device name and table

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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 11-28-2007, 09:32 AM
Pedro Bandim Faustino
 
Default user defined device name and table

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



--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org