GNOME Bugzilla – Bug 772123
GParted is unresponsive while gpart is running
Last modified: 2016-10-19 16:24:03 UTC
Running Device > Attempt Data Rescue... hangs the GParted UI for as long as gpart takes to scan the whole disk device looking for file system signatures.
Created attachment 336454 [details] [review] Prevent UI hang while gpart is running (v1) Hi Curtis, Here's the patch for this. Tested successfully on CentOS 5, CentOS 6 and Fedora 24. Thanks, Mike --8<-- File: gparted-772123-gpart-hangs-ui-v1.patch Desc: Prevent UI hang while gpart is running (v1) Tag: submitted-772123-gpart-hangs-ui-v1
Created attachment 337078 [details] Script to create some test partitions with file systems for gpart to recover Thank you Mike for discovering this issue with unresponsiveness while attempting data recovery with GParted. I've attached a script that I used for testing on kubuntu 16.04. The steps I used to set up a device with some formatted partitions are as follows: 1) Create a scsi ramdisk. $ sudo modprobe scsi_debug dev_size_mb=24 sector_size=512 2) Run dmesg to determine device path created. # For this example I'll use /dev/sdf 3) Initialize partitions and file systems. $ sudo ./init-gpart-partitions.sh /dev/sdf 4) Start GParted and test "Device -> Attempt Data Rescue" $ sudo gparted /dev/sdf 5) When done remove the scsi ramdisk. $ sudo rmmod scsi_debug
Created attachment 337082 [details] Screenshot of GParted attempt data rescue on Ubuntu 14.04 My testing of patch v1 from comment #1 has gone well as can be seen from the attached screen capture. Of note is that not all partitions and file systems were discovered. This is not the fault of GParted, but rather the result of which partitions were discovered by *gpart*. This can be confirmed on the command line with: $ sudo gpart -s 512 /path-to-disk-device Where /path-to-disk-device is something like /dev/sdf
I have successfully tested patch v1 from comment #1 on kubuntu 16.04 and ubuntu 14.04. Patch v1 has been committed to the git repository for inclusion in the next release of GParted. The relevant git commit can be viewed at the following link: Prevent the UI hanging while gpart data rescue is running (#772123) https://git.gnome.org/browse/gparted/commit/?id=aeebee9c12442d104b1ecb0e94ba41ec36c0c4e6
This enhancement was included in the GParted 0.27.0 release on October 19, 2016.