On 06/12/2024 21:05, Jörg-Volker Peetz wrote:

As a check if the defective sectors are all mapped out I did read all sectors of the partitions:

   sudo dd if=/dev/sdaX of=/dev/null bs=8M status=progress

I am curious if "nvme device-self-test" might be more effective.

Michael, thank you for the long message. Actually I wonder what is "idle" that allows drive to perform self-maintenance. I expect that the device should not be in some deep power saving state (I am yet to discover available tunables that allows drive to "sleep"). Should it be some period of time (seconds? minutes?) completely without any IO or is it enough if read/write speed is below some threshold and from/to another chip?

As to erase block size, I am aware of it. On the other hand I am surprised that a drive does not allow kernel to optimize writes on a higher level (as uSD does):

grep '' /sys/block/*/queue/discard_granularity
...
/sys/block/mmcblk0/queue/discard_granularity:4194304
/sys/block/nvme0n1/queue/discard_granularity:4096
/sys/block/sda/queue/discard_granularity:4096  # hdd (shingled)

Earlier I heard that firmware of some (USB, SD) flash drives is optimized for FAT. It sounded like a magic. I was afraid that it might have some detrimental effect on LUKS-encrypted ext4 partition. Later I read that it is just some storage region with small erase block size. This region may be small in comparison to total capacity, but it is enough to fit frequently overwritten FAT structures. In this form it is more convincing.

I do not try to dispute that some kind of self-healing may happen, but I do not believe in "not mounted" state. "Idle" is not precise from my point of view. No (or limited) IO is reasonable, but some initialization might be required to ensure power saving settings.

Reply via email to