Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write failure: Inappropriate ioctl for device on macOS #189

Open
ilyabreev opened this issue Nov 2, 2022 · 11 comments
Open

Write failure: Inappropriate ioctl for device on macOS #189

ilyabreev opened this issue Nov 2, 2022 · 11 comments

Comments

@ilyabreev
Copy link

Creating file 1.h2w ... Write failure: Inappropriate ioctl for device
Creating file 2.h2w ... 0.00% -- 512.00 Byte/sAssertion failed: (fw->blocks_per_delay > fw->processed_blocks), function get_rem_chunk_size, file libflow.h, line 89.
@AltraMayor
Copy link
Owner

Is this repeatable with the same drive? Is this repeatable with other drivers?

What version of F3 are you using? Which version of your macOS?

From your report, I can only infer that something went wrong at the operating system or hardware level, and F3 was caught off guard for not knowing how to recover from this failure.

@ilyabreev
Copy link
Author

ilyabreev commented Nov 3, 2022

Let me give you the information you requested.

Is this repeatable with the same drive?

Yes

Is this repeatable with other drivers?

Yes

What version of F3 are you using?

8.0
installed from homebrew

Which version of your macOS?

Tried on Ventura 13.0 and Monterey 12.6
Tried both Intel and M1 archs.

f3write utility created file 1.h2w with 512b of data then tried to create 2.h2w and then failure occurs.

@AltraMayor
Copy link
Owner

Does it mean that f3write is not working at all? For example, can't you just run f3write . on a folder on your hard drive? You can stop f3write anytime by pressing CTRL+C.

@laposheureux
Copy link

laposheureux commented Nov 4, 2022

I'm experiencing the same issue also on Ventura 13.0. I just brew installed f3 right now:

(base) aaron@ ~ % f3write /Volumes/Untitled
F3 write 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.

Removing old file 1.h2w ...
Removing old file 2.h2w ...
Free space: 233.11 GB
Creating file 1.h2w ... Write failure: Inappropriate ioctl for device
Creating file 2.h2w ... 0.00% -- 512.00 Byte/sAssertion failed: (fw->blocks_per_delay > fw->processed_blocks), function get_rem_chunk_size, file libflow.h, line 89.
zsh: abort      f3write /Volumes/Untitled

I have this same problem with multiple micro SD cards across multiple readers. One card is a 256GB AmazonBasics card (https://www.amazon.com/dp/B08TJZDJ4D/) and one is a Samsung 64GB EVO select card. One reader is from CableMatters (https://www.amazon.com/Cable-Matters-Reader-Black-Memory/dp/B01KXWIHZY/) and one is the built in one from Apple on a 16" M1 Macbook Pro using an adapter (https://www.amazon.com/gp/product/B0B76FDJ9R/). They all fail the same way.

F3 can write to any random folder just fine:

(base) aaron ~ % f3write ~/Desktop/Test/
F3 write 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.

Free space: 820.28 GB
Creating file 1.h2w ... OK!                   
Creating file 2.h2w ... OK!               
Creating file 3.h2w ... OK!               
Creating file 4.h2w ... OK!                       
Creating file 5.h2w ... OK!                       
Creating file 6.h2w ... OK!                       
Creating file 7.h2w ... OK!                       
Creating file 8.h2w ... OK!                       
Creating file 9.h2w ... 0.98% -- 3.00 GB/s -- 3:37^C

And macOS has no trouble writing to these SD cards.

@laposheureux
Copy link

I've been experimenting with it a bit. If the SD card is formatted as FAT or ExFAT, it fails, but f3write succeeds if it is formatted HFS+.

@nschum
Copy link

nschum commented Nov 4, 2022

I'm seeing the same problem on an external ExFAT SSD with Ventura on an M1 Pro.
Notably, f3write worked two weeks ago on the same disk and file system (before upgrading to Ventura). I don't think I did any other updates since that time.

@ilyabreev
Copy link
Author

It seems like a problem with FAT32 and ExFAT devices.

@zeha
Copy link

zeha commented Nov 28, 2022

Note Ventura uses a new implementation for FAT and ExFAT, apparently completely undocumented.
https://threedots.ovh/blog/2022/06/quick-look-at-user-mode-file-systems-on-macos-ventura/

@rogerioth
Copy link

I'm experiencing the same on macOS Ventura (on both macOS M1 and M2):

F3 write 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.

Removing old file 1.h2w ...
Removing old file 2.h2w ...
Free space: 114.57 GB
Creating file 1.h2w ... Write failure: Inappropriate ioctl for device
Creating file 2.h2w ... 0.00% -- 512.00 Byte/sAssertion failed: (fw->blocks_per_delay > fw->processed_blocks), function get_rem_chunk_size, file libflow.h, line 89.
[1]    27256 abort      f3write /Volumes/NO\ NAME

After formatting the drive to another filesystem, it started working again.

@thelukasssheee
Copy link

I am in the same boat here:

MacOS Ventura 13.0.1 on Macbook Pro M1, fresh install of f3 from brew version 8.0.
Trying to test a USB thumb drive.

With ExFat and FAT f3write errors out in same way as mentioned above.

But HFS+ does not properly work, either. f3write does not throw an error, but write speeds are much slower (50kB/s) than a regular drag & drop file copy on this specific thumb drive (10MB/s).

So Ventura must have definitely changed quite a few things.

@roach31
Copy link

roach31 commented Jun 2, 2024

I'm running Sonoma 14.5 (23F79), with f3 from homebrew. I'm also using a USB to SATA adapter from Anker.

If my 14 TB drive is formatted as ExFAT (using MacOS Disk Utility) f3write thinks there is only 750 GB ("Free space") available on the disk, and only writes that # of files. Finder correctly sees the 14 TB available.

"f3write /Volumes/Untitled/
F3 write 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.

Free space: 750.56 GB
Creating file 1.h2w ... OK! "

etc etc until it hits the 750 GB limit.

If I reformat my drive as APFS, f3write correctly sees "Free space: 12.73 TB" and works fine.

"f3write /Volumes/Untitled/
F3 write 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.

Free space: 12.73 TB
Creating file 1.h2w ... OK! "

etc etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants