[Bug 1193705] Re: [udev] /dev/disk/by-path missing

Martin Pitt martin.pitt at ubuntu.com
Tue Jun 25 06:06:38 UTC 2013


While we can technically put /dev/disks/by-path back for ATA devices in
Ubuntu, that still won't help upstream ceph on other distros, and I
believe this approach is buggy anyway. is_partition() currently looks a
bit underdefined/buggy to me, as it's not uncommon to have file systems
on unpartitioned block devices (i. e. mounting /dev/sdb directly); this
will also completely miss devmapper or other "virtual" devices. To mimic
the current behaviou,  one could do something like

  return not os.path.exists('/sys/block/%s' % os.path.basename(dev))

as devices will be there (like /sys/block/sdb), and partitions under
that (like /sys/block/sdb/sdb2). But again, that's not really what you
want there: Judging by how is_partition() is being used in
verify_not_in_use(), it should probably be called is_filesystem() and
query udev (CLI example: udevadm info --name=/dev/sda2 | grep ID_FS) or
blkid.

There are a couple of options how to rewrite these functions, including
reading /sys/block/, /proc/partitions, asking blkid, querying udevadm,
or querying udisks.

If you want a list of block devices with mountable file systems which
are present, and don't want to use any extra libraries, then perhaps the
simplest thing is

  udevadm trigger --dry-run --verbose --property-
match=ID_FS_USAGE=filesystem

(this doesn't need any root privileges). If you want all block devices,
then

  udevadm trigger --dry-run --verbose --subsystem-match=block

will give a list, including device-mapper (and also loopback, etc.).

-- 
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/1193705

Title:
  [udev] /dev/disk/by-path missing

Status in “ceph” package in Ubuntu:
  New
Status in “systemd” package in Ubuntu:
  Incomplete

Bug description:
  Latest cloud image for Ubuntu Saucy; /dev/disk/by-path is missing:

  ubuntu at juju-saucy-instance-0:~$ find /dev/disk
  /dev/disk
  /dev/disk/by-uuid
  /dev/disk/by-uuid/80aed723-838e-44b9-90a9-f1b2c04f7c87
  /dev/disk/by-label
  /dev/disk/by-label/cloudimg-rootfs
  /dev/disk/by-label/config-2
  ubuntu at juju-saucy-instance-0:~$ 

  I've not seen this in < Saucy and can repeat this reliably using the
  saucy daily images.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: udev 204-0ubuntu4
  ProcVersionSignature: User Name 3.9.0-6.14-generic 3.9.6
  Uname: Linux 3.9.0-6-generic x86_64
  ApportVersion: 2.10.2-0ubuntu2
  Architecture: amd64
  CurrentDmesg: [    6.952094] init: plymouth-stop pre-start process (1125) terminated with status 1
  Date: Sat Jun 22 21:32:23 2013
  Ec2AMI: ami-0000002a
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.tiny
  Ec2Kernel: aki-00000002
  Ec2Ramdisk: ari-00000002
  Lsusb:
   Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: OpenStack Foundation OpenStack Nova
  MarkForUpload: True
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.9.0-6-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0
  SourcePackage: systemd
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 01/01/2011
  dmi.bios.vendor: Bochs
  dmi.bios.version: Bochs
  dmi.chassis.type: 1
  dmi.chassis.vendor: Bochs
  dmi.modalias: dmi:bvnBochs:bvrBochs:bd01/01/2011:svnOpenStackFoundation:pnOpenStackNova:pvr2013.1.1:cvnBochs:ct1:cvr:
  dmi.product.name: OpenStack Nova
  dmi.product.version: 2013.1.1
  dmi.sys.vendor: OpenStack Foundation

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




More information about the foundations-bugs mailing list