Comment 5 for bug 1460602

Revision history for this message
In , intrigeri (intrigeri) wrote :

Hi,

I'm using GNOME Disks 3.12.1-1+b1 on current Debian unstable, with udisks2 (2.1.3-5), gvfs (1.22.1-1) and libatasmart4 0.19-3.

Steps to reproduce:

1. Blank a USB drive (dd if=/dev/zero)

2. Format that USB drive with GNOME Disks (default options: quick and MBR)

3. Attempt to create a new partition+filesystem on that USB drive using the "+" icon in GNOME Disks (default options, again: don't overwrite, FAT, no label)

* I always get this error in a dialog:

  Error creating partition
  Error wiping newly created partition /dev/sdb1: Command-line `wipefs -a "/dev/sdb1"' exited with non-zero exit status 1:
  wipefs: error: /dev/sdb1: probing initialization failed: No such file or directory
  (udisks-error-quark, 0)

* The sdb1 partition is always created.

* Sometimes the FAT filesystem is created on this partition, sometimes not.

* In any case, I can then reliably "Format" the newly created partition with GNOME Disks and get a filesystem created as expected.

Seems like udisks is trying to act on a device before the device node appears. The affected code seems to live in src/udiskslinuxpartitiontable.c, that pretends to "sit and wait for the partition to show up" before wiping the newly created partition, but apparently doesn't reliably wait for the device node to appear in /dev.