[Bug 1611945] Re: /dev/disk/by-path not properly populated for (e)SATA port multiplier disks

WinEunuchs2Unix RickLee518 at gmail.com
Thu Dec 14 01:55:24 UTC 2017


Just to confirm this year old bug is still around. Ubuntu 16.04.3,
Kernel 4.14.4, NVMe Gen 3.0 x 4 M.2 SSD + Legacy 1 TB spinner, 3 NTFS-3G
mounts: /mnt/c/, /mnt/d, /mnt/e defined in /etc/fstab.

3 Errors, with 2 info lines in between, reported by `journalctl -b`:
====================================================================

Dec 13 05:52:20 alien systemd[1]: dev-disk-by\x2dpartlabel-
Microsoft\x5cx20reserved\x5cx20partition.device: Dev dev-disk-by
\x2dpartlabel-Microsoft\x5cx20reserved\x5cx20partition.device appeared
twice with different sysfs paths
/sys/devices/pci0000:00/0000:00:1d.0/0000:3e:00.0/nvme/nvme0/nvme0n1/nvme0n1p3
and
/sys/devices/pci0000:00/0000:00:17.0/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda2

Dec 13 05:52:20 alien systemd[1]: dev-disk-by\x2dpartlabel-
Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-
Basic\x5cx20data\x5cx20partition.device appeared twice with different
sysfs paths
/sys/devices/pci0000:00/0000:00:1d.0/0000:3e:00.0/nvme/nvme0/nvme0n1/nvme0n1p4
and
/sys/devices/pci0000:00/0000:00:17.0/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda3

Dec 13 05:52:20 alien systemd[1]: Found device HGST_HTS721010A9E630
HGST_Win10.

Dec 13 05:52:20 alien systemd[1]: Mounting /mnt/d...

Dec 13 05:52:20 alien systemd[1]: dev-disk-by\x2dpartlabel-
EFI\x5cx20system\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-
EFI\x5cx20system\x5cx20partition.device appeared twice with different
sysfs paths
/sys/devices/pci0000:00/0000:00:1d.0/0000:3e:00.0/nvme/nvme0/nvme0n1/nvme0n1p2
and
/sys/devices/pci0000:00/0000:00:17.0/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda1


Parition Information from `lsblk`
=================================
NAME        FSTYPE LABEL            MOUNTPOINT   SIZE MODEL
sda                                            931.5G HGST HTS721010A9
├─sda4      ntfs   WINRETOOLS                    450M 
├─sda2                                           128M 
├─sda5      ntfs   Image                        11.4G 
├─sda3      ntfs   HGST_Win10       /mnt/d       919G 
└─sda1      vfat   ESP                           500M 
nvme0n1                                          477G Samsung SSD 960 PRO 512GB 
├─nvme0n1p5 ext4   NVMe_Ubuntu_16.0 /           44.6G 
├─nvme0n1p3                                       16M 
├─nvme0n1p1 ntfs                                 450M 
├─nvme0n1p6 swap   Linux Swap       [SWAP]       7.9G 
├─nvme0n1p4 ntfs   NVMe_Win10       /mnt/c     414.9G 
├─nvme0n1p2 vfat                    /boot/efi     99M 
└─nvme0n1p7 ntfs   Shared_WSL+Linux /mnt/e         9G

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1611945

Title:
  /dev/disk/by-path not properly populated for (e)SATA port multiplier
  disks

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  We have a just-installed Ubuntu 16.04 LTS machine with a number of
  disks behind port-multiplier eSATA ports, all of them driven by a SiI
  3124 controller (sata_sil24 kernel driver). Our machine sees all disks
  on all channels, however under 16.04 only one disk from each channel
  shows up in /dev/disk/by-path/ (all disks show up in /dev/disk/by-id
  and /dev/disk/by-uuid). For our usage this is a severe defect because
  we rotate disks in and out of the external enclosure and rely on
  mounting specific slots in the external enclosure through /dev/disk
  /by-path.

  This did not happen in Ubuntu 12.04 LTS, the release that this machine
  was previously running.

  According to 'udevadm info --export-db' and 'udevadm test-builtin
  path_id' and so on, systemd's udev stuff is assigning all drives
  behind the same port the same disk/by-path data (ID_PATH et al). In
  'udevadm info /sys/block/sdX', the 'P:' and 'E: DEVPATH=' values show
  a difference in the target portion of PCI path, eg:

    P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
    P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/ata1/host0/target0:1:0/0:1:0:0/block/sdb

  However the 'S: disk/by-path', 'E: DEVLINKS=', and 'E: ID_PATH'
  portions do not. For both devices above, we see:

    S: disk/by-path/pci-0000:02:00.0-ata-1
    E: ID_PATH=pci-0000:02:00.0-ata-1

  Naturally only one device can have a /dev/disk/by-
  path/pci-0000:02:00.0-ata-1 symlink, so instead of four disks per
  channel in /dev/disk/by-path we see one.

  Ubuntu release: 16.04

  Package versions from 'apt-cache policy udev systemd':
  udev:
    Installed: 229-4ubuntu7
  systemd:
    Installed: 229-4ubuntu7

  'journalctl -b' reports that during boot systemd does report some
  'appeared twice with different sysfs paths' notes, eg:

  Aug 10 13:34:21 verdandi systemd[1]: dev-disk-by\x2dpath-
  pci\x2d0000:02:00.0\x2data\x2d1\x2dpart1.device: Dev dev-disk-by
  \x2dpath-pci\x2d0000:02:00.0\x2data\x2d1\x2dpart1.device appeared
  twice with different sysfs paths
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/ata1/host0/target0:3:0/0:3:0:0/block/sdd/sdd1
  and
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1

  However it doesn't seem to be reporting this for all port-multiplier
  drives and their partitions.

  If it would be useful I can attach full 'udevadm info --export-db'
  output or the like.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1611945/+subscriptions



More information about the foundations-bugs mailing list