0

I have external NTFS disks of 1TB, which I use to keep a backup of my data. This disk is plugged into the PC once a month or so. I noticed that my Ubuntu freezes while copying 300 GB of data from this disk. I checked the disk on Windows 11 for errors and did the disk defragmentation. The disk basically works fine on Windows 11. Below is Ubuntu OS information:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04 LTS
Release:    24.04
Codename:   noble

$ uname -a
Linux asus 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Below is the disk mounted on Ubuntu:

$ sudo fdisk -l
...
...
...
Disk /dev/sdb: 931.51 GiB, 1000204883968 bytes, 1953525164 sectors
Disk model: External USB 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcd281382

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT

I tried scanning the disk on Ubuntu, but NTFS seems unsupported. Please see below:

$ sudo smartctl -a /dev/sdb1
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-31-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               TOSHIBA
Product:              External USB 3.0
Revision:             0101
Compliance:           SPC-4
User Capacity:        1,000,204,883,968 bytes [1.00 TB]
Logical block size:   512 bytes
Device type:          disk
Local Time is:        Tue May 28 20:35:47 2024 JST
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Read defect list: asked for grown list but didn't get it
Error Counter logging not supported

Device does not support Self Test logging

The ntfsfix did not work as shown below:

$ ntfsfix /dev/sdb1
Refusing to operate on read-write mounted device /dev/sdb1.

Please note that the same behavior (freezing Ubuntu) is seen with another NTFS disk of 2 TB capacity. Surprisingly, both disks work smoothly on Windows 11. By the way, this is a dual-boot PC, and Windows fast boot and hibernation are turned off on Windows 11.

Unfortunately, when Ubuntu freezes, I have no choice but to forcefully reboot the PC, which causes data loss. Is there a way to debug the issue further?

7
  • 1
    Are those disks connected via USB3 UASP? Commented May 28 at 14:39
  • @grawity_u1686 Sorry, not sure about USB3 UASP. The USB3 cable is provided with the HDD. A sample cable can be seen here. Next, it is connected to the ports at top side of the Cooler Master Silencio S600 case. I checked with other USB3 ports that are on the back side of the case, but the problem persists. I also tested the same disk on another PC which is running Ubuntu 18 and tried copying 500 GB from this disk (NTFS) to Ubuntu (ext4). Ubuntu did not freeze on this PC.
    – ravi
    Commented May 29 at 1:50
  • @grawity_u1686 Additionally, I have scanned (quick scan) the disk with Toshiba storage diagnostic tool v1.30.8920. (the disk is manufactured by Toshiba.) The scan shows no issues with the disk.
    – ravi
    Commented May 29 at 10:21
  • Did you try a chkdsk /r c: Then tell it to do it check after a reboot.
    – cybernard
    Commented May 30 at 19:33
  • 1
    Also I would use a dmesg to see diagnostic info. Please filter out lines not related to the drive as there will be hundreds of lines of messages. Is very odd the drive doesn't support SMART.
    – cybernard
    Commented Jun 3 at 13:31

2 Answers 2

2

freezes while copying 300 GB of data from this disk. I checked the disk on Windows 11 for errors

from the disk .. And please note that Windows chkdsk is not an extensive test by default and that it mainly concerns itself with file system consistency.

I suggest you use something like 'Victoria for Windows' or HDTune and run a read only surface scan. In absence of SMART it is about the only thing you have to diagnose the drive itself (not the file system).

https://www.majorgeeks.com/files/details/victoria_for_windows.html https://www.majorgeeks.com/files/details/hd_tune.html

1
  • Thanks a lot. There is an update I would like to share. Last night, I formatted the drive as ext4 and then tried I/O to and from the disk. Surprisngly there were no freezing during these experiments.
    – ravi
    Commented Jun 5 at 3:31
1

We need to do a variety of test to diagnose the fault.

In addition to dmesg here:

  1. Plug the drive in and don't mount it or anything. Wait a generous amount of time say 5 hours or whatever would guarantee a fail.
    If the system freezes its a low level issue, and your better off with a SSD as prices have come down.

  2. Next a read test

    dd if=/dev/sdb of=/dev/null bs=2048 status=progress

Again wait an appropriate amount of time and note the failure time and percentage.

  1. Repeat test 2, does it fail? Does it fail after the same amount of time or same percentage?

These 2 test are again low level tests, testing the basic functionality of the hardware without using any special drivers.

  1. Now lets mount the drive.

    dd if=/dev/zero of=/mount/point/testing.txt bs=2048 count=200000 status=progress

This will create a file containing all zeros. If it doesn't fail, keep increasing the count by 1000000.

If it does fail, how long did it take to fail, and at what percentage?

  1. Delete the file, run a 2nd time. Also make note of the time and percentage.

For the reads, if there is a common failure point as far as percentage then there is likely a specific issue like a bad sector. In any case all of this data has its diagnostic value.

The reading test, test the basic hardware and don't use any drivers. The write test has the drive mounted so that will test the drivers.

In addition it is useful to open a second terminal window and periodically run dmesg. The beginning of the results are always a repeat, the newest data is at the end. So monitor the last 10-20 lines for errors while the tests are running.

1
  • Thanks a lot. There is an update I would like to share. Last night, I formatted the drive as ext4 and then tried I/O to and from the disk. Surprisngly there were no freezing during these experiments.
    – ravi
    Commented Jun 5 at 3:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .