0

Anyone knows why I am seeing multiple device for the same LUN?I checked with storage team they only exposed 360000970000196801239533036304532 for this server but why I am seeing these many partition(p1..p7)

lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532 -> ../dm-39
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p1 -> ../dm-64
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p2 -> ../dm-65
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p3 -> ../dm-66
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p4 -> ../dm-67
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p5 -> ../dm-69
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p6 -> ../dm-70
lrwxrwxrwx 1 root root      8 Jan 20 16:30 360000970000196801239533036304532p7 -> ../dm-71

AFAIK I understand devices in dev mapper are created early in the boot process and /dev/dm-n are for internal use only

Even in the output of fdisk I see those 2 devices

Disk /dev/mapper/360000970000196801239533036304532: 515.4 GB, 515396075520 bytes


Device Boot      Start         End      Blocks   Id  System

/dev/mapper/360000970000196801239533036304532p1 1 62661 503316479+ ee GPT

Disk /dev/mapper/360000970000196801239533036304536: 515.4 GB, 515396075520 bytes

When I am trying to create Physical Volume on original LUN it fails due to this error

pvcreate /dev/mapper/360000970000196801239533036304532
Device /dev/mapper/360000970000196801239533036304532 not found (or ignored by filtering).

I already checked lvm.conf there is nothing defined in filtering

System info

cat /etc/redhat-release 
CentOS release 6.8 (Final)

device-mapper-multipath-0.4.9-93.el6.x86_64
device-mapper-persistent-data-0.6.2-0.1.rc7.el6.x86_64
device-mapper-multipath-libs-0.4.9-93.el6.x86_64
device-mapper-libs-1.02.117-7.el6_8.1.x86_64
device-mapper-event-libs-1.02.117-7.el6_8.1.x86_64
device-mapper-event-1.02.117-7.el6_8.1.x86_64
lvm2-2.02.143-7.el6_8.1.x86_64
device-mapper-1.02.117-7.el6_8.1.x86_64
lvm2-libs-2.02.143-7.el6_8.1.x86_64
Prashant Lakhera
  • 683
  • 1
  • 9
  • 25

1 Answers1

1

When device is connected, kpartx creates DM devices for found partitions. I see fdisk found at least one partition, but it may be incorrect about remaining. As fdisk man page on RHEL7 says: fdisk does not understand GUID partition tables (GPTs) and it is not designed for large partitions. In these cases, use the more advanced GNU parted(8), I guess it is the same on CentOS6. Use either gdisk or parted as suggested to see if there are multiple partitions.

If you are sure you want to get rid of all partitions you could first try wipefs -a on the device.

Also make sure multipath_component_detection in lvm.conf is set to 1.

Martian
  • 1,060
  • 8
  • 8