btrfs icon indicating copy to clipboard operation
btrfs copied to clipboard

Driver seems to hate external HDDs

Open queenbiscuit311 opened this issue 2 months ago • 9 comments

I have a 1TB external HDD that I use to store miscellaneous files and also for Timeshift backups on my linux installation. Due to timeshift I cannot have this drive formatted with any other filesystem if I want to access it in windows. The issue is that, either immediately after connecting the disk or after attempting any file transfer larger than a few megabytes, the disk has a very high chance immediately stop responding. After this, won't show drive usage in explorer, and any file operations can't be cancelled. In addition, the explorer window can't be closed even through task manager and it rapidly becomes impossible to open any other programs on the computer or do anything at all. Eventually the system will become unusable and trying to restart or shutdown will just cause it to be stuck on the shutdown/restart screen forever.

Part of this is similar to the issues described in #750 and #753, but it seems greatly accelerated when used on an external HDD, and not necessarily an external SSD, which I also have on btrfs and which doesn't exhibit this behavior. Well before the freezing issue was a thing, I'd also have issues where any file transfers or accesses to the external HDD would just occasionally hang, making the drive completely inaccessible for upwards of 2 minutes before continuing.

Something in this driver does not play well with external HDDs and it doesn't seem to be solely due to the locking up issue that other people have already brought up. Most people describe the issue only showing up when transferring large files, but the driver for me can't even tolerate the disk being present on my system without immediate issues. Without this drive plugged in, my PC can last being on indefinitely with no issues. With the drive simply being plugged in and not being directly utilized at all, I'd be lucky to get a day of uptime before the entire system starts locking up. Sometimes I can't even manage an hour, and even if used in windows 10 21h2 ltsc, where I don't experience the locking up issue at all, all access to the drive will still randomly freeze for minutes at a time for no real reason when doing a lot of stuff on it.

queenbiscuit311 avatar Nov 06 '25 22:11 queenbiscuit311

Might be unrelated, but could also be related so I figured I'd mention it. This occurs on internal SSD/HDD's. Even with the #753 patch applied, I noticed that when doing a large number of file transfers, the progress bar that Windows shows would hang at particular points and the transfer speed would drop to 0 MB/s before resuming which is not the typical behavior when transferring files between drives. It dips up and down depending on file size/type, but generally flows at typically the same speed. In every instance in this case, it would slowly drop to 0, before resuming its normal transfer rate. I don't want to open a separate issue just yet, since the code I'm using hasn't been merged, so it's speculation at the moment.

GiggityGoo-85 avatar Nov 08 '25 07:11 GiggityGoo-85

Can confirm, I just got a new PC to replace the laptop I was using and I put the external drive in as an internal drive and it still happens. I even moved all the files off of the drive, recreated the entire filesystem, and moved everything back and I'm currently stuck not being able to do anything on my computer because this drive will near instantly lock up when I turn my computer on.

Image

Here's a screenshot of what it does. Of note is the fact htat not only was the culprit drive (N:) not being actively used, I have two other BTRFS drives on this computer (B: and D:) that do not exhibit this problem whatsoever, but they are NVMe drives.

queenbiscuit311 avatar Nov 09 '25 02:11 queenbiscuit311

Does it exhibit this issue if you use another file system, say NTFS? Just confirming it's not a physical issue with the drive itself.

On Sat, Nov 8, 2025, 9:49 PM queenbiscuit311 < @.***> wrote:

queenbiscuit311 left a comment (maharmstone/btrfs#765) Can confirm, I just got a new PC to replace the laptop I was using and I put the external drive in as an internal drive and it still happens. I e DuckDuckGo removed one tracker. More https://duckduckgo.com/-ChjCrXVYuvpOzqXU4Vcth6E3vZGbopk1T-W8b1kWnYtFWPSFPnAYCGZuTcEhPoJAl-V2N_tE6hfTevMLmJq7Zsv1bXWfsNqI-8bAeHoKLmQcA0EDETisHZtfrvgyGx2hngKgG9wvu20CjcPG1V11AbzKkbfU4lMPxW2-jgvcIk1OcVYRQrC2eZLb8-LoeUrc1olniLt-LxDyvpeByc1CxvP8vNP8m4JYrvwcEFnuP2jaQtH3MQyqzZI2dB35gqkv1FETU-MlaDvRx-BBKqNnnGSEYO7F_RD77w_sUUG64fU03sOOHihiUu7JxHRmGgign-AQNNUgfzK3x2A2w6MPLUkbEYz_PZ5RWlgdOJEmRC8e9q7hRe89q819mZ7ss2FxaU-rM-dp5-2Xl9I7vNiJj5-ONuDYLKknRDC17iuI1ONhLscFgdr5IEt-4_2uhbDhQdUE4YfP7Q-b0C_a_t4u9bBlvteP7Skzv9TTy_vkQ1ilan8 Report Spam https://duckduckgo.com/-ChjCrXVYuvpOzqXU4Vcth6E3vZGbopk1T-W8b1kWnYtFWPSFPnAYCGZuTcEhPoJAl-V2N_tE6hfTevMLmJq7Zsv1bXWfsNqI-8bAeHoKLmQcA0EDETisHZtfrvgyGx2hngKgG9wvu20CjcPG1V11AbzKkbfU4lMPxW2-jgvcIk1OcVYRQrC2eZLb8-LoeUrc1olniLt-LxDyvpeByc1CxvP8vNP8m4JYrvwcEFnuP2jaQtH3MQyqzZI2dB35gqkv1FETU-MlaDvRx-BBKqNnnGSEYO7F_RD77w_sUUG64fU03sOOHihiUu7JxHRmGgign-AQNNUgfzK3x2A2w6MPLUkbEYz_PZ5RWlgdOJEmRC8e9q7hRe89q819mZ7ss2FxaU-rM-dp5-2Xl9I7vNiJj5-ONuDYLKknRDC17iuI1ONhLscFgdr5IEt-4_2uhbDhQdUE4YfP7Q-b0C_a_t4u9bBlvteP7Skzv9TTy_vkQ1ilan8 queenbiscuit311 left a comment (maharmstone/btrfs#765) https://github.com/maharmstone/btrfs/issues/765#issuecomment-3507396956

Can confirm, I just got a new PC to replace the laptop I was using and I put the external drive in as an internal drive and it still happens. I even moved all the files off of the drive, recreated the entire filesystem, and moved everything back and I'm currently stuck not being able to do anything on my computer because this drive will near instantly lock up when I turn my computer on. image.png (view on web) https://github.com/user-attachments/assets/948d1e3b-bfe5-4349-8346-283b3272f4f7

Here's a screenshot of what it does. Of note is the fact htat not only was the culprit drive (N:) not being actively used, I have two other BTRFS drives on this computer (B: and D:) that do not exhibit this problem whatsoever, but they are NVMe drives.

— Reply to this email directly, view it on GitHub https://github.com/maharmstone/btrfs/issues/765#issuecomment-3507396956, or unsubscribe https://github.com/notifications/unsubscribe-auth/BZID64UTXKI3VETQALGLDUD332TUXAVCNFSM6AAAAACLMGDWGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMBXGM4TMOJVGY . You are receiving this because you commented.Message ID: @.***>

GiggityGoo-85 avatar Nov 09 '25 02:11 GiggityGoo-85

I've used this drive on NTFS as well and it's never had any of these issues, it's only btrfs

queenbiscuit311 avatar Nov 09 '25 02:11 queenbiscuit311

I seem to have found a way to consistently get it to break. If I go to an app called modrinth launcher for minecraft and I try to select an icon for one of the profiles, it seems to cause the drive to get stuck almost every time.

queenbiscuit311 avatar Nov 09 '25 02:11 queenbiscuit311

I got the similar, but not sure if exactly the same, issue.

The btrfs partition has been created on a 22T HDD under WSL, and connected it to my PC via USB (ASM1352R-PM). OS build is 26220.7070, with secure boot / VBS / HVCI / KMHESP on.

The Explorer is found to hang when it about to display the drive, even the icon under "This PC", while the drive has been writing. However, accessing it through other programmes is perfectly fine - tested directly attached to WSL, qBittorrent (primarily reads), and cppcryptfs.

However, this issue seems disappear after maybe one or both events:

  • ensuring SYSTEM got the "Full Control" permission, letting all files inhering from parent permission, and setting owner to the user under WSL.
  • unchecking "Allow filles on this drive to have contents indexed in addition to file properties" (for all files)
  • do not exam btrfs properties, i.e. click on the properties tab and let it calculate the size of a folder

So, I guess this should relate to some kinds of IO pending issue - where programs that can handle async IOs are fine, but the Explorer are not.

k3-cat avatar Nov 09 '25 04:11 k3-cat

So, I got tired of this and moved all of the files off the drive, then completely recreated the partition table on the drive, then remade the partition, then put the files back, and now it's fine? It's no more or less stable than any of my other BTRFS filesystems now. Going to mark as closed I guess? There's still definitely some sort of bug here but whatever I did fixed it. If anyone else has this issue recreate your partition table.

queenbiscuit311 avatar Nov 16 '25 09:11 queenbiscuit311

I'm actually re-opening this because although the system can now tolerate the drive existing and i can read from it indefinitely, writing basically anything to the drive over a few hundred megabytes will immediately cause a lockup scenario, compared to my NVMe SSD and SATA SSD, both of which are also on btrfs, where I haven't seen a write lockout in a very long time, even when installing multiple several-dozen gigabyte games to them repeatedly or moving large archives to them. It definitely has a preference for locking up on HDDs. Not to mention the periodic write freezing then continuing thing still happens.

queenbiscuit311 avatar Nov 18 '25 02:11 queenbiscuit311

Also connecting a USB HDD formatted as btrfs will instantly cause deadlock still

queenbiscuit311 avatar Nov 18 '25 03:11 queenbiscuit311