journalctl : erroneous duplicates on /sys/devices?

Hello,

since the last kernel 3.19.3

uname -a
Linux hpprol2 3.19.3-1-xen #1 SMP Thu Mar 26 17:34:34 UTC 2015 (f10e7fc) x86_64 x86_64 x86_64 GNU/Linux

I receive a lot of these warning/errors in journalctl and these warning/errors occur each 5 minutes

Apr 06 11:02:28 hpprol2 systemd[3098]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0\x2dpart2.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb2 and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda/sda2
Apr 06 11:02:28 hpprol2 systemd[1]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb
Apr 06 11:02:28 hpprol2 systemd[3098]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:2/block/sdc and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb
Apr 06 11:02:28 hpprol2 systemd[1]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0\x2dpart2.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb2
Apr 06 11:02:28 hpprol2 systemd[1]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0\x2dpart4.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda/sda4 and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb4                                                                                                       
Apr 06 11:02:28 hpprol2 systemd[1]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0\x2dpart3.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb3                                                                                                       
Apr 06 11:02:28 hpprol2 systemd[1]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0\x2dpart1.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb1                                                                                                       
Apr 06 11:02:28 hpprol2 systemd[1]: Device dev-disk-by\x2did-scsi\x2dSHP_LOGICAL_VOLUME_0014380280B60D0.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:0/block/sda and /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:2/block/sdc 

My system is a HP proliant ML350 with a hardware raid unit ( 6 disks) divided in 3 logical disks (sda, sdb, sdc). Each logical disk contain different partitions, all are mounted except those on disk sdc
fstab is

/dev/disk/by-id/scsi-3600508b1001c99233458581ffb65cc88-part2    /       ext4    acl,user_xattr 1 1 
LABEL=usr       /usr    ext4    acl,user_xattr 1 2 
LABEL=home      /home   ext4    acl,user_xattr 1 2 
LABEL=srv       /srv    ext4    acl,user_xattr 1 2 
LABEL=var       /var    ext4    acl,user_xattr 1 2 
LABEL=local     /local  ext4    acl,user_xattr 1 2 
LABEL=opt       /opt    ext4    acl,user_xattr 1 2 
/dev/disk/by-id/scsi-3600508b1001c99233458581ffb65cc88-part1    swap    swap    defaults 0 0 

The mount command shows

# mount -l
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=5946636k,nr_inodes=1486659,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,size=6128008k,nr_inodes=1532002)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=6128008k,nr_inodes=1532002,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=6128008k,nr_inodes=1532002,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
/dev/sda2 on / type ext4 (rw,relatime,stripe=192,data=ordered) [OpenSuse]
/dev/sda3 on /usr type ext4 (rw,relatime,stripe=192,data=ordered) [usr]
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
/dev/sdb3 on /local type ext4 (rw,relatime,stripe=192,data=ordered) [local]
/dev/sda4 on /home type ext4 (rw,relatime,stripe=192,data=ordered) [home]
/dev/sdb1 on /srv type ext4 (rw,relatime,stripe=192,data=ordered) [srv]
/dev/sdb4 on /opt type ext4 (rw,relatime,stripe=192,data=ordered) [opt]
/dev/sdb2 on /var type ext4 (rw,relatime,stripe=192,data=ordered) [var]
xenstore on /var/lib/xenstored type tmpfs (rw,relatime,mode=755)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,size=6128008k,nr_inodes=1532002,mode=755)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,size=6128008k,nr_inodes=1532002,mode=755)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
none on /var/lib/ntp/proc type proc (ro,nosuid,nodev,relatime)
proc on /var/lib/dhcp/proc type proc (ro,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1214696k,mode=700,uid=1000,gid=100)
tmpfs on /var/run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1214696k,mode=700,uid=1000,gid=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
gvfsd-fuse on /var/run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

the duplicate libraries exist:

ls -l /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb3 /sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:2/block/sdc/sdc3
/sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:1/block/sdb/sdb3:
total 0
-r–r–r-- 1 root root 4096 Apr 5 23:20 alignment_offset
-r–r–r-- 1 root root 4096 Apr 4 16:48 dev
-r–r–r-- 1 root root 4096 Apr 5 23:20 discard_alignment
drwxr-xr-x 2 root root 0 Apr 4 16:49 holders
-r–r–r-- 1 root root 4096 Apr 5 23:20 inflight
-r–r–r-- 1 root root 4096 Apr 4 16:48 partition
drwxr-xr-x 2 root root 0 Apr 4 16:49 power
-r–r–r-- 1 root root 4096 Apr 4 17:34 ro
-r–r–r-- 1 root root 4096 Apr 4 16:48 size
-r–r–r-- 1 root root 4096 Apr 4 16:48 start
-r–r–r-- 1 root root 4096 Apr 5 23:20 stat
lrwxrwxrwx 1 root root 0 Apr 4 16:48 subsystem → …/…/…/…/…/…/…/…/…/…/class/block
drwxr-xr-x 2 root root 0 Apr 4 16:49 trace
-rw-r–r-- 1 root root 4096 Apr 6 11:12 uevent

/sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:0:0/0:0:0:2/block/sdc/sdc3:
total 0
-r–r–r-- 1 root root 4096 Apr 6 11:15 alignment_offset
-r–r–r-- 1 root root 4096 Apr 6 11:15 dev
-r–r–r-- 1 root root 4096 Apr 6 11:15 discard_alignment
drwxr-xr-x 2 root root 0 Apr 6 11:15 holders
-r–r–r-- 1 root root 4096 Apr 6 11:15 inflight
-r–r–r-- 1 root root 4096 Apr 6 11:15 partition
drwxr-xr-x 2 root root 0 Apr 6 11:15 power
-r–r–r-- 1 root root 4096 Apr 6 11:15 ro
-r–r–r-- 1 root root 4096 Apr 6 11:15 size
-r–r–r-- 1 root root 4096 Apr 6 11:15 start
-r–r–r-- 1 root root 4096 Apr 6 11:15 stat
lrwxrwxrwx 1 root root 0 Apr 6 11:15 subsystem → …/…/…/…/…/…/…/…/…/…/class/block
drwxr-xr-x 2 root root 0 Apr 6 11:15 trace
-rw-r–r-- 1 root root 4096 Apr 6 11:15 uevent

Why are two different partition on two different disks refererred as duplicate?
fdisk gives

# fdisk -l
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 786432 bytes
Disklabel type: dos
Disk identifier: 0x000aab75

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1            1536  25173503  25171968   12G 82 Linux swap / Solaris
/dev/sda2  *     25173504  67120127  41946624   20G 83 Linux
/dev/sda3        67120128 276831743 209711616  100G 83 Linux
/dev/sda4       276831744 629145599 352313856  168G 83 Linux

Disk /dev/sdb: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 786432 bytes
Disklabel type: dos
Disk identifier: 0x0005f844

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1            1536 209713151 209711616  100G 83 Linux
/dev/sdb2       209713152 419424767 209711616  100G 83 Linux
/dev/sdb3       419424768 524281343 104856576   50G 83 Linux
/dev/sdb4       524281344 629145599 104864256   50G 83 Linux

Disk /dev/sdc: 238.1 GiB, 255651102720 bytes, 499318560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 786432 bytes
Disklabel type: dos
Disk identifier: 0x0001a1e7

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sdc1           1536  41945087  41943552    20G 83 Linux
/dev/sdc2       41945088  50331647   8386560     4G 82 Linux swap / Solaris
/dev/sdc3       50331648  92276735  41945088    20G 83 Linux
/dev/sdc4       92276736 499318271 407041536 194.1G 83 Linux

Any ideas how I can solve this problem or what can be bad defined?

Regards
Philippe

Your controller apparently returns the same serial number for each LUN. As long as you do not attempt to use /dev/disk/by-id/scsi-* device paths it is just cosmetic. You may consider opening bug report so this controller can be blacklisted for generating such names.

Thanks,

I checked the system with hwinfo and I see that the /dev/disk/by-id/scsi- are the same for partitions id 90 and 95

hwinfo --partition
90: None 00.0: 11300 Partition                                  
  [Created at block.414]
  Unique ID: bdUI.SE1wIdpsiiC
  Parent ID: R7kM.067DVheHAD3
  SysFS ID: /class/block/sda/sda1
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sda1
  Device Files: /dev/sda1, /dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_00000000-part1, /dev/disk/by-id/scsi-3600508b1001c99233458581ffb65cc88-part1, **/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_0014380280B60D0-part1**, /dev/disk/by-id/wwn-0x600508b1001c99233458581ffb65cc88-part1, /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part1, /dev/disk/by-uuid/ab7656ab-41e6-41e8-aa16-bbb4ca3c643e
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #89 (Disk)
.
.
95: None 00.0: 11300 Partition
  [Created at block.414]
  Unique ID: h4pj.SE1wIdpsiiC
  Parent ID: uI_Q.067DVheHAD3
  SysFS ID: /class/block/sdb/sdb1
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sdb1
  Device Files: /dev/sdb1, /dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_01000000-part1, /dev/disk/by-id/scsi-3600508b1001cd3e7527deb3b931a6639-part1, **/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_0014380280B60D0-part1, **/dev/disk/by-id/wwn-0x600508b1001cd3e7527deb3b931a6639-part1, /dev/disk/by-label/srv, /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:1-part1, /dev/disk/by-uuid/bf2e6374-cee0-4c18-96b5-851f821ac807
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #94 (Disk)

I’ll open a bug report for the hardware raid unit (HP P420i)
This warning occurring each 5 minutes, a process must be used it.(sensor?).

Thanks again
Pḧilippe