[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Force device node link creation



Hello,

On 2020-02-06 19:47, David Wright wrote:
On Thu 06 Feb 2020 at 17:56:00 (+0100), Christoph Pleger wrote:

I am using a program for automatic creation of a harddisk partitioning
from a configuration file. That file contains device names like
/dev/sda1 etc. for naming the partitions. After the partitioning has
been completed, I want to create an appropriate fstab from the
configuration file and during that step, want to convert partition
device name entries to entries in the form UUID=... For that, I am
using

udevadm info --query=symlink --name="$device"

where $device is the respective partition. Unfortunaly, the problem
occurs that often - though partitioning was completed and filesystems
created -  links in /dev/disk/by-uuid/ are not yet available when
udevadm is run, so that udevadm returns nothing. So, my question is:
Is it possible to force the device node links to have been created
before calling udevadm? Without long sleeps or sleep loops?

I've only used events after I've done something, like plugging in a
stick. Might   udevadm trigger …   help? I would try it out with,
say,   udevadm monitor -u -p -s block   running.

I have already tried udevadm trigger together with udevadm settle, but it did not help. Though it seemed to be the solution till Debian 9 inclusively.

Regards
  Christoph


Reply to: