Operating System - Linux
1753792 Members
7105 Online
108799 Solutions
New Discussion юеВ

multipath setup with partitioned disk

 
SOLVED
Go to solution
MikeL_4
Super Advisor

multipath setup with partitioned disk

I am running Red Hat AS4, and have multipath setup and running...

I've partitioned one of the disk into three (3) partitions:

[root ~]# fdisk -l /dev/dm-2
Disk /dev/dm-2 (Sun disk label): 60 heads, 128 sectors, 49606 cylinders
Units = cylinders of 7680 * 512 bytes

Device Flag Start End Blocks Id System
/dev/dm-2p1 1 15626 60000000 83 Linux native
/dev/dm-2p2 15627 31252 60000000 83 Linux native
/dev/dm-2p3 u 31253 46878 60000000 83 Linux native
[root ~]#

The /dev/mapper directory shows the mpath1 which I have partitioned:
[root ~]# ls -al /dev/mapper
total 0
drwxr-xr-x 2 root root 180 Oct 14 09:34 .
drwxr-xr-x 11 root root 7400 Oct 14 09:35 ..
crw------- 1 root root 10, 63 Oct 14 09:34 control
brw-rw---- 1 root disk 253, 2 Oct 14 09:34 mpath1
brw-rw---- 1 root disk 253, 3 Oct 14 09:34 mpath2
brw-rw---- 1 root disk 253, 4 Oct 14 09:34 mpath3
brw-rw---- 1 root disk 253, 5 Oct 14 09:34 mpath4
brw-rw---- 1 root disk 253, 0 Oct 14 09:34 VolGroup00-LogVol00
brw-rw---- 1 root disk 253, 1 Oct 14 09:34 VolGroup00-LogVol01
[root ~]#

[root ~]# fdisk -l /dev/mapper/mpath1

Disk /dev/mapper/mpath1 (Sun disk label): 60 heads, 128 sectors, 49606 cylinders
Units = cylinders of 7680 * 512 bytes

Device Flag Start End Blocks Id System
/dev/mapper/mpath1p1 1 15626 60000000 83 Linux native
/dev/mapper/mpath1p2 15627 31252 60000000 83 Linux native
/dev/mapper/mpath1p3 u 31253 46878 60000000 83 Linux native
[root ~]#

The question I have is where are the device files for each partition ?? or how do I create them, I've tried the kpartx command but it doesn't produce any results...

Thanks
8 REPLIES 8
Hakki Aydin Ucar
Honored Contributor

Re: multipath setup with partitioned disk

Can t you see device files with command:

# fdisk -l

Most left column ?

MikeL_4
Super Advisor

Re: multipath setup with partitioned disk

Yes:

root ~]# fdisk -l /dev/mapper/mpath1

Disk /dev/mapper/mpath1 (Sun disk label): 60 heads, 128 sectors, 49606 cylinders
Units = cylinders of 7680 * 512 bytes

Device Flag Start End Blocks Id System
/dev/mapper/mpath1p1 1 15626 60000000 83 Linux native
/dev/mapper/mpath1p2 15627 31252 60000000 83 Linux native
/dev/mapper/mpath1p3 u 31253 46878 60000000 83 Linux native
[root ~]#
Hakki Aydin Ucar
Honored Contributor

Re: multipath setup with partitioned disk

OK,
Did you try this way: (do not put dev path after the command)

fdisk -l
MikeL_4
Super Advisor

Re: multipath setup with partitioned disk

The disk I partitioned is:

mpath1 (360060480000190101036533030323330)
[size=181 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [active]
\_ 3:0:0:24 sdb 8:16 [active]
\_ 5:0:0:24 sdg 8:96 [active]

[root ~]# clear;fdisk -l

Disk /dev/sda: 292.3 GB, 292326211584 bytes
13 heads, 9 sectors/track, 4879911 cylinders
Units = cylinders of 117 * 512 = 59904 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 8752 511987+ 83 Linux
/dev/sda2 8753 4879911 284962801+ 8e Linux LVM

Disk /dev/sdb (Sun disk label): 60 heads, 128 sectors, 49606 cylinders
Units = cylinders of 7680 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdb1 1 15626 60000000 83 Linux native
/dev/sdb2 15627 31252 60000000 83 Linux native
/dev/sdb3 u 31253 46878 60000000 83 Linux native

Disk /dev/sdc: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf (Sun disk label): 15 heads, 128 sectors, 1 cylinders
Units = cylinders of 1920 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdf3 u 0 1 960 5 Whole disk
/dev/sdf7 0 1 960 4 SunOS usr

Disk /dev/sdf3 (Sun disk label): 15 heads, 128 sectors, 1 cylinders
Units = cylinders of 1920 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdf3p3 u 0 1 960 5 Whole disk
/dev/sdf3p7 0 1 960 4 SunOS usr

Disk /dev/sdf7 (Sun disk label): 15 heads, 128 sectors, 1 cylinders
Units = cylinders of 1920 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdf7p3 u 0 1 960 5 Whole disk
/dev/sdf7p7 0 1 960 4 SunOS usr

Disk /dev/sdg (Sun disk label): 60 heads, 128 sectors, 49606 cylinders
Units = cylinders of 7680 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdg1 1 15626 60000000 83 Linux native
/dev/sdg2 15627 31252 60000000 83 Linux native
/dev/sdg3 u 31253 46878 60000000 83 Linux native

Disk /dev/sdh: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdh doesn't contain a valid partition table

Disk /dev/sdi: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdi doesn't contain a valid partition table

Disk /dev/sdj: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdj doesn't contain a valid partition table

Disk /dev/sdk (Sun disk label): 15 heads, 128 sectors, 1 cylinders
Units = cylinders of 1920 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdk3 u 0 1 960 5 Whole disk
/dev/sdk7 0 1 960 4 SunOS usr

Disk /dev/sdk3 (Sun disk label): 15 heads, 128 sectors, 1 cylinders
Units = cylinders of 1920 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdk3p3 u 0 1 960 5 Whole disk
/dev/sdk3p7 0 1 960 4 SunOS usr

Disk /dev/sdk7 (Sun disk label): 15 heads, 128 sectors, 1 cylinders
Units = cylinders of 1920 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdk7p3 u 0 1 960 5 Whole disk
/dev/sdk7p7 0 1 960 4 SunOS usr

Disk /dev/dm-2 (Sun disk label): 60 heads, 128 sectors, 49606 cylinders
Units = cylinders of 7680 * 512 bytes

Device Flag Start End Blocks Id System
/dev/dm-2p1 1 15626 60000000 83 Linux native
/dev/dm-2p2 15627 31252 60000000 83 Linux native
/dev/dm-2p3 u 31253 46878 60000000 83 Linux native

Disk /dev/dm-3: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-3 doesn't contain a valid partition table

Disk /dev/dm-4: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-4 doesn't contain a valid partition table

Disk /dev/dm-5: 195.0 GB, 195066593280 bytes
255 heads, 63 sectors/track, 23715 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-5 doesn't contain a valid partition table
[root ~]#
Matti_Kurkela
Honored Contributor
Solution

Re: multipath setup with partitioned disk

> Disk /dev/dm-2 (Sun disk label) [...]

You seem to be using a Sun-style disklabel instead of a standard PC DOS-style partition table. The device-mapper-multipath documentation seems to indicate that kpartx understands only DOS-style partitions.

Is it possible that this LUN was used by a Solaris system before it was assigned to your Linux? The Solaris system might have left a Solaris disk label on the LUN, and Linux fdisk has recognized it and kept on using it. If you want to partition this disk so that kpartx can understand it, use the "o" command of fdisk to switch the partition table format to DOS-style.

If this is going to be a data LUN, you might be better served by "pvcreate /dev/mapper/mpath1" and using the entire LUN as a PV for LVM, skipping the partitioning step altogether.

You should remember that absolute maximum LUN size with DOS-style partition table is 2 terabytes (2^32 disk blocks).
Soon the increasing average workstation disk size will force the DOS-style partition table to become obsolete, so prepare to learn new things.

MK
MK
MikeL_4
Super Advisor

Re: multipath setup with partitioned disk

It's possible this LUN was reassigned from a Solaris server, I don't control the SAN, and have to use what is given...

The other LUN's I did do a pvcreate on the entire LUN for LVM, this disk is partitioned up so that it can be used by Oracle for RAW space..., therefore I can'd use pvcreate..
MikeL_4
Super Advisor

Re: multipath setup with partitioned disk

I removed the Solaris label and put on a DOS label, and that resolved the issue...
MikeL_4
Super Advisor

Re: multipath setup with partitioned disk

Thanks