After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677869 - Unhelpful error message when trying to create a disk image from a device that is in use
Unhelpful error message when trying to create a disk image from a device that...
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-11 15:41 UTC by Dylan McCall
Modified: 2012-11-19 22:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dylan McCall 2012-06-11 15:41:47 UTC
When I choose "Create Disk Image" for a volume that is mounted (or a disk that is in use), Disks shows its usual "Create Disk Image" dialog. After I click "Start Creating" the progress bar appears, with "Copying data from device /dev/sda" and an error dialog immediately appears as well:

Error opening device
Error opening /dev/sda: Device or resource busy (udisks-error-quark, 0)

Upon closing the error dialog, the operation is cancelled.

Disks should attempt to handle this error in a friendlier way. Ideally it could detect this case in advance, before the user clicks "Start Creating." Otherwise it could at least present a more constructive error message, perhaps instructing the user to unmount the volume that is in use and offering to continue when that has been done.
Comment 1 David Zeuthen (not reading bugmail) 2012-11-19 22:29:48 UTC
Fair enough. I've given it the same treatment as a lot of the other operations (formatting, ejecting etc.) in 3.8, see

http://git.gnome.org/browse/gnome-disk-utility/commit/?id=8574e00fb2f17b67e63e18fb3fd619c7b372d6f9

The general pattern is that we're trying to make sure the device is not in use (e.g. mounted, unlocked) before we start operating on it. So in /dev/sda case it will go ahead and try to e.g. unmount all the partitions on the disk.

Of course this won't make the "Create Disk Image" feature magically work if we can't e.g. unmount all devices so it won't work for the disk holding the OS. But there's nothing we can do about that.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.