Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 934
  • Last Modified:

How can I install my root filesystem on a multipathing device? (/dev/mapper/mpath0)

Hi Experts,

I'm installing RHEL 5.4 on a native LPAR of System Z (z10BC) mainframe, which is connected to DS8300 via FCP. Here are my details:

[root@zlnx1 ~]# uname -a
Linux zlnx1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:53:50 EDT 2009 s390x
s390x s390x GNU/Linux

[root@zlnx1 ~]# lsscsi
[0:0:0:1]    disk    IBM      2107900          .116  /dev/sda
[0:0:0:2]    disk    IBM      2107900          .116  /dev/sdb
[1:0:0:1]    disk    IBM      2107900          .116  /dev/sdc

[root@zlnx1 ~]# lszfcp -D
0.0.2200/0x500507630803005e/0x4016400000000000 0:0:0:1
0.0.2200/0x500507630803005e/0x4016400100000000 0:0:0:2
0.0.2300/0x500507630803405e/0x4016400100000000 1:0:0:1

[root@zlnx1 ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb1              6092360   2658584   3119308  47% /
/dev/sda1               194442     15342    169061   9% /boot
tmpfs                  1029532         0   1029532   0% /dev/shm

Basically, /dev/sdb and /dev/sdc points to the same disk. And I would like to setup a multipathed device (e.g. /dev/mapper/mpath0) which points to /dev/sdb /dev/sdc and mount my root file system there.

Here are the steps I have done so far:
- My root is installed originally in /dev/sdb1
- My /boot is installed in /dev/sda1
- I have setup my second path /dev/sdc (same disk/LUN with /dev/sdb)
- I have correctly updated my /etc/multipath.conf
- Then recreate initrd, ===> mkinitrd -v --with=dm-mod --with=dm-multipath --with=dm-round-robin initrd-2.6.18-164.el5.img 2.6.18-164.el5
- Then zipl and reboot, ===> zipl -V

Am I missing something?
How can I start multipathing on Root before mounting my Root filesystem?

I hope you can give me some detailed example. Thank you very much.

3 Solutions
I think You need
- create the mpath device, so current setup is seeing is OK
- create new /etc/fstab, that mounts / on the /dev/mapper/mpath0 device (backup old one)
- change /etc/grub.conf (it's symlink to /boot/grub/grub.conf), so root= refers to /dev/mapper/mpath0
- run mkinitrd and install in proper place (/boot)
  now mkinitrd should spot, that root filesystem is placed on the mpath device and setup it properly
dkaislaAuthor Commented:
I have solved this myself and the ultimate key here is to put the keyword "mpath" in your parm file so that anaconda will take care of the creation of mpath devices. After this, creating root on multipath is just a piece of cake.

Note: the above solution only applies to RHEL5+

Answers of ravenpl and martin_2110 are helpful and valid. Thanks.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now