GNOME Bugzilla – Bug 677869
Unhelpful error message when trying to create a disk image from a device that is in use
Last modified: 2012-11-19 22:29:48 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.
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.