1 (edited by joeykrim 2012-06-11 01:07:00)

Topic: GParted hangs on "Searching /dev/sda partitions"

When opening GParted version 0.12.1-5 with a stock Dell hard drive attached GParted shows the status as "Searching /dev/sda partitions" and the animated loading bar to the right continues to move, but the application never finishes searching partitions and most of the application is greyed out (disabled) with the searching partitions status message indefinitely (longest I've waited is 45 minutes).

If I unplug the hard drive, GParted starts up and works fine on all the other drives I have attached (2 HDD and 3 SSD). I have tested this on two computers using the GParted Live USB drive, Ultimate Boot CD, and Ubuntu as the host systems to open GParted. GParted hangs on all of these systems and both computers while this stock Dell hard drive is attached. I've also switched SATA ports and cables being used to connect to the hard drive.

The Dell hard drive is for an Inspiron Mini 10 netbook and has Windows 7 Starter loaded. I don't receive any type of error message in the terminal when starting GParted from the terminal. I'm unsure of how to prompt GParted for an error log or how to put GParted into some type of debug mode to provide more verbose details other than the "Searching /dev/sda partitions" status mesage.

I am able to boot the Windows 7 OS loaded on the hard drive without any issues and also able to resize partitions using the Windows 7 standard Disk Management application. The drive passes all of Windows disk checks. The SMART log My original goal was to copy these partitions from the stock 250GB hard drive to a 60GB SSD. I first needed to downsize the last partition to around roughly 40 GB to allow all 3 partitions to fit on the 60 GB SSD. I was hoping to use GParted to downsize the 3rd partition but have been unable to use GParted on the disk due to the indefinite searching partitions message.

I have searched this forum and Google for this issue but am unable to find this issue or any similar type of issue being mentioned. I am a bit surprised I haven't been able to find an answer as it seems more people should have ran into this issue.

The only interesting information which I wasn't aware of is the custom Dell MBR information outlined with technical details here: http://www.goodells.net/dellrestore/

I've pasted the fdisk /dev/sda information print out below along with smartctl -a /dev/sda output.

Appreciate any assistance or guidance. Thanks!

fdisk /dev/sda information print out:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x464fe09d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048      206847      102400   de  Dell Utility
/dev/sda2          206848    20686847    10240000    7  HPFS/NTFS/exFAT
/dev/sda3   *    20686848   103699574    41506363+   7  HPFS/NTFS/exFAT

smartctl -a /dev/sda:
smartctl 5.43 2012-05-01 r3539 [i686-linux-3.2.0-2-486] (local build)
Copyright (C) 2002-12 by Bruce Allen

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA
Device Model:     WDC WD2500BEVT-75A23T0
Serial Number:    WD-WX11XXXXXXXX
Firmware Version: 01.01A01
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Sun Jun 10 19:01:51 2012 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)    Offline data collection activity was never started. Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)    The previous self-test routine completed without error or no self-test has ever been run.
Total time to complete Offline data collection:         ( 6780) seconds.
Offline data collection capabilities:              (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new    command.
                    Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering power-saving mode. Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.    General Purpose Logging supported.
Short self-test routine recommended polling time:      (   2) minutes.
Extended self-test routine recommended polling time:      (  82) minutes.
Conveyance self-test routine recommended polling time:      (   5) minutes.
SCT capabilities:            (0x7037)    SCT Status supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   153   149   021    Pre-fail  Always       -       1308
  4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       2484
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       1084
10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       2434
191 G-Sense_Error_Rate      0x0032   001   001   000    Old_age   Always       -       502
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       27
193 Load_Cycle_Count        0x0032   149   149   000    Old_age   Always       -       153656
194 Temperature_Celsius     0x0022   100   086   000    Old_age   Always       -       43
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0
240 Head_Flying_Hours       0x0032   099   099   000    Old_age   Always       -       958
241 Total_LBAs_Written      0x0032   200   200   000    Old_age   Always       -       2151231854
242 Total_LBAs_Read         0x0032   200   200   000    Old_age   Always       -       2532528321
254 Free_Fall_Sensor        0x0032   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%         0         -
# 2  Short offline       Aborted by host               90%         0         -
# 3  Extended offline    Aborted by host               70%         0         -

SMART Selective self-test log data structure revision number 1
SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

http://www.joeykrim.com

2

Re: GParted hangs on "Searching /dev/sda partitions"

Thank you for the detailed information on this problem.

The inordinate amount of time spent scanning is most likely due to one of the three partitions.

In the Dell utility link, it says that the Dell partition contains a FAT16 file system.  The other two partitions appear to contain NTFS file systems.

There are two known bugs with respect to long scanning times, that come about when GParted tries to determine the amount of free and unused space.

Bug 569921 - dosfsck -n delays device scan
Bug 121943 - Gparted scan for device infinitely because of filesystem check (dosfsck)

Both of these problems are generally avoided when the file system has been defragmented.

You can determine which of these partitions is causing the problem by opening a terminal window and running the following command while GParted is scanning:

ps -ef | egrep "dosfsck|ntfs"

There are two things that you can do to try to significantly reduce the scan time.

  • Defragment the file system in each partition

  • Properly shut down the operating system so that the file systems are left in a consistent state.

Hopefully that will help you work around this problem.

3 (edited by joeykrim 2012-06-11 02:38:09)

Re: GParted hangs on "Searching /dev/sda partitions"

gedakc wrote:

Thank you for the detailed information on this problem.

The inordinate amount of time spent scanning is most likely due to one of the three partitions.

In the Dell utility link, it says that the Dell partition contains a FAT16 file system.  The other two partitions appear to contain NTFS file systems.

There are two known bugs with respect to long scanning times, that come about when GParted tries to determine the amount of free and unused space.

Bug 569921 - dosfsck -n delays device scan
Bug 121943 - Gparted scan for device infinitely because of filesystem check (dosfsck)

Both of these problems are generally avoided when the file system has been defragmented.

You can determine which of these partitions is causing the problem by opening a terminal window and running the following command while GParted is scanning:

ps -ef | egrep "dosfsck|ntfs"

There are two things that you can do to try to significantly reduce the scan time.

  • Defragment the file system in each partition

  • Properly shut down the operating system so that the file systems are left in a consistent state.

Hopefully that will help you work around this problem.

Appreciate the quick feedback!

Regarding the two suggestions which should reduce the scan time:
1) Defrag: Windows 7 claims the C drive, partition 3 in the fdisk output previously posted, is 1% fragmented. This 3rd partition, the C drive, is only 40 GB.
2) Shut down properly: The operating system has been shut down properly and the Windows 7 disk check has been ran. Both of these things have been done properly multiple times over the last few days of testing.

Doesn't seem either suggestion has resolved the issue of Gparted indefinitely scanning the partitions.

The output from running ps -ef | egrep "dosfsck|ntfs" while GParted is scanning:
user@debian:~$ ps -ef | egrep "dosfsck|ntfs"
root      2298  2250  0 20:06 tty1     00:00:00 sh -c dosfsck -n -v /dev/sda1
root      2299  2298 92 20:06 tty1     00:00:56 dosfsck -n -v /dev/sda1
user      2313  2302  0 20:07 pts/0    00:00:00 egrep dosfsck|ntfs

Appears the first partition, /dev/sda1, which I'm not 100% sure what Dell stores here, is causing the indefinite delay in GParted scanning. The partition is labeled as Dell Utility and I seem to recall the partition being roughly 110MB.

To further confirm the issue being confined to the 1st partition, as suggested in the first bug link you posted, I was able to kill the PID 2298 and 2299 (as shown in the above output) and GParted went on to the 2nd and 3rd partitions and then loaded! In the GParted GUI all partitions appear and a yellow triangle with an exclamation mark in the center appears next to the /dev/sda1 partition label. Under the last column, Flags, the word "diag" appears for the /dev/sda1 partition.

Regarding the two suggestions previously given and applying those specifically to the 1st partition:
1)  Given this 1st partition is hidden from Windows, I'm not able to defragment the partition. According to the first bug report linked in the quoted post, perhaps Dell provides a utility partition which is very fragmented? Seems unlikey?
2) Properly shutting down the system shouldn't impact this 1st partition since the partition is hidden from the operating system?

Still experiencing delays of over 45 minutes (haven't waited any longer than 45 minutes) for GParted to scan the roughly 110MB partition.

Seems the bug around FAT 16/32 partitions with dosfsck is the reason GParted hangs on this partition? Any further commands to gain more detail on what about this partition causes GParted to hang? Is the best work around for now to kill the dosfsck process on the offending partition? Any other suggestions? In addition to any other suggestions, would my posting of this information in either or both of those two bug reports be helpful?

Once again, appreciate the quick feedback!

http://www.joeykrim.com

4

Re: GParted hangs on "Searching /dev/sda partitions"

Good work in isolating the problem to the /dev/sda1 Dell Utility partition.

If the partition is hidden, then you might try unsetting the "hidden" flag, defragmenting the file system, and then setting the "hidden flag" again.

If your goal is simply to resize one of the NTFS partitions, then you could also just kill the dosfsck process each time a scan starts up.

The core of the problem is that to determine the space usage in a FAT16 file system, one must follow all the links through the various meta data structures.  When these are fragmented, it can take lots of disk scanning to follow these links all over the disk.

For this problem to be resolved, a better way of determining this information is needed.  At the moment I do not know how this might be done.

5 (edited by joeykrim 2012-06-11 04:01:22)

Re: GParted hangs on "Searching /dev/sda partitions"

gedakc wrote:

Good work in isolating the problem to the /dev/sda1 Dell Utility partition.

If the partition is hidden, then you might try unsetting the "hidden" flag, defragmenting the file system, and then setting the "hidden flag" again.

If your goal is simply to resize one of the NTFS partitions, then you could also just kill the dosfsck process each time a scan starts up.

The core of the problem is that to determine the space usage in a FAT16 file system, one must follow all the links through the various meta data structures.  When these are fragmented, it can take lots of disk scanning to follow these links all over the disk.

For this problem to be resolved, a better way of determining this information is needed.  At the moment I do not know how this might be done.

Great suggestion. I had wondered about defragmenting a stock manufacturer partition.

Opening up the hard drive in the Windows 7 Disk Management program, I am unable to assign a drive letter to the OEM - Dell Utility partition. Without a drive letter, I'm unable to run the defragmentation program.
Although, I am able to assign a drive letter to the 2nd partition, the recovery partition, and the 3rd partition is already assigned as the C drive.

I am unable to access any type of information on the 1st partition. Disk Management presents no options, very surprising and frustrating.
Without Disk Management allowing the 1st partition to be assigned a drive letter, I'm unaware of any other method to assign a drive letter and then defragment the drive.

On a side note, the screenshot shows Disk Management provides very little information about the first two partitions. Seems as if Windows 7 Disk Management program knows not to gather free or used space for the first two partitions.
Screenshot of the Windows 7 Disk Management program:
http://www.joeykrim.com/evo/files/diskmanagement-3partitions.jpg

http://www.joeykrim.com

6

Re: GParted hangs on "Searching /dev/sda partitions"

Most likely Windows does not see the "hidden" partition because the partition ID is set to "de".

Normally for a FAT16 file system this would be set to "6".

See List of partition identifiers for PCs

You might use the fdisk (Linux) command line tool to change this to "6", boot into windows to defragment the file system, and then use fdisk again to reset the partition ID back to "de".

7

Re: GParted hangs on "Searching /dev/sda partitions"

Hello, sorry to update this old topic.
But I encounter the same issue.

But with some differences :
With GParted version 0.12.1-5 all is working for me
With GParted version 0.13.1-2 it was not working but once, I updated my dell utility with the lastest http://www.dell.com/support/home/us/en/ … egoryId=DI and then it worked (tested on a E6410 and E4300)
But since 0.13.1-2 no new version are working...

Have I to destroy my dell utility partition or is there a feature which may be added to Gparted, to bypass this issue ?

Thks for any help

8

Re: GParted hangs on "Searching /dev/sda partitions"

At this time all we have are work-arounds.  The dell partition appears to be severely fragmented and this causes the dosfsck command to take an extraordinary amount of time to complete.  We use dosfsck to determine the amount of used and free space within the FAT file system.  Without this information, the FAT file system cannot be resized.

How large is your dell partition?

Since we currently are only able to resize FAT partitions 256 MiB or larger, we could consider not gathering the usage statistics for FAT16/32 partitions smaller than this size.  That would mean we would not run dosfsck these smaller partitions and avoid the time delay.

See:  Bug 649324 - failure to move / resize fat32 partitions less than 256 MB in size