I mean use badblocks either directly or through the -c option of mkfs and similar commands.
My understanding is that , if a sector of a drive seems to go bad , the drive software automatically "remaps" it (or whatever the appropriate verb is) to
a different sector so does running badblocks actually buy you anything ?
Is badblocks only intended for hard drives or is it also potentially useful for solid state drives ?
If you use badblocks , do you do a read-write test or just read ? Some months
ago I did with a new 128 gigabytes SSD
mkfs.ext3 -c -c -j /dev/sdc1
and it was taking forever. After several days during which progress seemed to be slowing down (based on the progress percentages printed by the programme) I stopped it and did a read only test which worked fine.
Some months
ago I did with a new 128 gigabytes SSD
mkfs.ext3 -c -c -j /dev/sdc1
and it was taking forever. After several days during which progress
seemed to
be slowing down (based on the progress percentages printed by the
programme)
I stopped it and did a read only test which worked fine.
I should think that all that any write tests would achieve is using up
the write-cycles of the SSD 🙁
My understanding is that , if a sector of a drive seems to go bad ,
the drive software automatically "remaps" it (or whatever the
appropriate verb is) to a different sector so does running badblocks
actually buy you anything ?
If you use badblocks , do you do a read-write test or just read ? Some months
ago I did with a new 128 gigabytes SSD
mkfs.ext3 -c -c -j /dev/sdc1
and it was taking forever. After several days during which progress seemed to be slowing down (based on the progress percentages printed by the programme) I stopped it and did a read only test which worked fine.
What is the difference with hard disks ? Is it for example that a new SSD is guaranteed to initially write everything correctly so running badblocks is a waste whereas even a new hard disk may have blocks where writing won't
work ?
On Sat, 2 Dec 2023 14:51:37 +0100
Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
Am 02.12.2023 um 12:44:46 Uhr schrieb Spiros Bousbouras:
My understanding is that , if a sector of a drive seems to go bad ,
the drive software automatically "remaps" it (or whatever the
appropriate verb is) to a different sector so does running badblocks
actually buy you anything ?
That applies to HDDs, but mostly not to floppies, USB thumb drives nor
tapes.
The amount of reserve sectors is also limited, so if too many are bad,
they can't be remapped and badblocks will find them.
And how is that useful ? badblocks itself simply prints the list of bad blocks to stdout. Is this useful?
If you invoke badblocks indirectly by using one of the mkfs*
utilities then I assume what happens is that the list of bad blocks
will be written at an appropriate location on the filesystem so that
the operating system can avoid writing on those blocks. Do I have
this right ?
I was also wondering , would it be possible for the operating system
to write some data and then immediately read it back to make sure
that it was written correctly?
The advantage relative to using badblocks is that with badblocks some
blocks may become bad after you have run badblocks whereas with the
method I'm proposing the checks would be ongoing.
Obviously what I'm suggesting would negatively affect performance but
it could be tunable ; like you could have an option for mounting a
filesystem with such a functionality enabled or not. Does such a functionality exist all on Linux (with some types of filesystems) ?
I mean use badblocks either directly or through the -c option of mkfs and similar commands.
My understanding is that , if a sector of a drive seems to go bad , the drive software automatically "remaps" it (or whatever the appropriate verb is) to
a different sector so does running badblocks actually buy you anything ?
I mean use badblocks either directly or through the -c option of
mkfs and similar commands.
My understanding is that, if a sector of a drive seems to go bad, the
drive software automatically "remaps" it (or whatever the appropriate
verb is) to a different sector
so does running badblocks actually buy you anything ?
Is badblocks only intended for hard drives or is it also
potentially useful for solid state drives ?
If you use badblocks , do you do a read-write test or just read ?
Some months ago I did with a new 128 gigabytes SSD
mkfs.ext3 -c -c -j /dev/sdc1
and it was taking forever. After several days during which progress
seemed to be slowing down (based on the progress percentages printed
by the programme) I stopped it and did a read only test which worked
fine.
I mean use badblocks either directly or through the -c option of mkfs and similar commands.
My understanding is that , if a sector of a drive seems to go bad , the drive software automatically "remaps" it (or whatever the appropriate verb is) to
a different sector so does running badblocks actually buy you anything ?
Is badblocks only intended for hard drives or is it also potentially useful for solid state drives ?
If you use badblocks , do you do a read-write test or just read ? Some months
ago I did with a new 128 gigabytes SSD
mkfs.ext3 -c -c -j /dev/sdc1
and it was taking forever. After several days during which progress seemed to be slowing down (based on the progress percentages printed by the programme) I stopped it and did a read only test which worked fine.
Spiros Bousbouras <spibou@gmail.com> wrote:
On Sat, 2 Dec 2023 14:51:37 +0100
Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
Am 02.12.2023 um 12:44:46 Uhr schrieb Spiros Bousbouras:
I was also wondering , would it be possible for the operating system
to write some data and then immediately read it back to make sure
that it was written correctly?
Possible in general: yes. In fact, the ancient Atari DOS for the very
old Atari 810 5.25 floppy disk, if set to do so, would do exactly this.
Write a sector, then immediately read it back and compare. Of course
doing so slowed down disk writes by a considerable amount (and they
were not anywhere near fast by today's standards to begin with).
Can Linux be configured to do so, not unless one of the more esoteric filesystems has a "read after write" configuration option.
The advantage relative to using badblocks is that with badblocks some
blocks may become bad after you have run badblocks whereas with the
method I'm proposing the checks would be ongoing.
And your write speed would slow down to one disk block per disk platter rotation (or set of blocks, depending upon how it was implemented).
For most users, the overall reliability is already sufficiently high
enough that slowing down writes by 50x or 100x is not worth the
fractional percentage gain in overall reliability.
Obviously what I'm suggesting would negatively affect performance but
it could be tunable ; like you could have an option for mounting a
filesystem with such a functionality enabled or not. Does such a
functionality exist all on Linux (with some types of filesystems) ?
It might. I do not know of any that have it, but I also do not know
the details of all the possible filesystems that are bundled with (or
can be added to) a Linux kernel.
On 2023-12-02 21:32, Rich wrote:
Spiros Bousbouras <spibou@gmail.com> wrote:
On Sat, 2 Dec 2023 14:51:37 +0100
Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
Am 02.12.2023 um 12:44:46 Uhr schrieb Spiros Bousbouras:
...
I was also wondering , would it be possible for the operating system
to write some data and then immediately read it back to make sure
that it was written correctly?
Possible in general: yes. In fact, the ancient Atari DOS for the very
old Atari 810 5.25 floppy disk, if set to do so, would do exactly this.
Write a sector, then immediately read it back and compare. Of course
doing so slowed down disk writes by a considerable amount (and they
were not anywhere near fast by today's standards to begin with).
Can Linux be configured to do so, not unless one of the more esoteric
filesystems has a "read after write" configuration option.
Better software verified a track after writing it, not a sector.
Minimize movements.
The advantage relative to using badblocks is that with badblocks some
blocks may become bad after you have run badblocks whereas with the
method I'm proposing the checks would be ongoing.
And your write speed would slow down to one disk block per disk platter
rotation (or set of blocks, depending upon how it was implemented).
For most users, the overall reliability is already sufficiently high
enough that slowing down writes by 50x or 100x is not worth the
fractional percentage gain in overall reliability.
MsDOS could do exactly this. The setting was "VERIFY=ON".
On 2023-12-02 21:32, Rich wrote:
Spiros Bousbouras <spibou@gmail.com> wrote:
On Sat, 2 Dec 2023 14:51:37 +0100
Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
Am 02.12.2023 um 12:44:46 Uhr schrieb Spiros Bousbouras:
...
I was also wondering , would it be possible for the operating system
to write some data and then immediately read it back to make sure
that it was written correctly?
Possible in general: yes. In fact, the ancient Atari DOS for the
very old Atari 810 5.25 floppy disk, if set to do so, would do
exactly this. Write a sector, then immediately read it back and
compare. Of course doing so slowed down disk writes by a
considerable amount (and they were not anywhere near fast by today's
standards to begin with).
Can Linux be configured to do so, not unless one of the more
esoteric filesystems has a "read after write" configuration option.
Better software verified a track after writing it, not a sector.
Minimize movements.
Don't use badblocks on ssd drives.
I mean use badblocks either directly or through the -c option of mkfs
and similar commands.
My understanding is that , if a sector of a drive seems to go bad ,
the drive software automatically "remaps" it (or whatever the
appropriate verb is) to a different sector
so does running badblocks actually buy you anything ?
Is badblocks only intended for hard drives or is it also potentially useful for solid state drives ?
On 2023-12-02, Carlos E. R. <robin_listas@es.invalid> wrote:
On 2023-12-02 21:32, Rich wrote:
Spiros Bousbouras <spibou@gmail.com> wrote:
On Sat, 2 Dec 2023 14:51:37 +0100
Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
Am 02.12.2023 um 12:44:46 Uhr schrieb Spiros Bousbouras:
...
The advantage relative to using badblocks is that with badblocks some
blocks may become bad after you have run badblocks whereas with the
method I'm proposing the checks would be ongoing.
And your write speed would slow down to one disk block per disk platter
rotation (or set of blocks, depending upon how it was implemented).
For most users, the overall reliability is already sufficiently high
enough that slowing down writes by 50x or 100x is not worth the
fractional percentage gain in overall reliability.
MsDOS could do exactly this. The setting was "VERIFY=ON".
About 40 years ago, I saw that functionality described in some
VMS documentation. However, I don't remember now whether it was
on a per-file basis, per-open-for-write basis, or other.
Carlos E. R. <robin_listas@es.invalid> wrote:
On 2023-12-02 21:32, Rich wrote:
Spiros Bousbouras <spibou@gmail.com> wrote:
On Sat, 2 Dec 2023 14:51:37 +0100
Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
Am 02.12.2023 um 12:44:46 Uhr schrieb Spiros Bousbouras:
...
I was also wondering , would it be possible for the operating system
to write some data and then immediately read it back to make sure
that it was written correctly?
Possible in general: yes. In fact, the ancient Atari DOS for the
very old Atari 810 5.25 floppy disk, if set to do so, would do
exactly this. Write a sector, then immediately read it back and
compare. Of course doing so slowed down disk writes by a
considerable amount (and they were not anywhere near fast by today's
standards to begin with).
Can Linux be configured to do so, not unless one of the more
esoteric filesystems has a "read after write" configuration option.
Better software verified a track after writing it, not a sector.
Minimize movements.
This was on an 8-bit, 6502 computer, with single density, single sided
5.25 floppy disks that held 90KB each. A computer that, in its
smallest configuration, came with either 8k or 16k of RAM (I forget
which was the minimal config now). I doubt the authors of Atari DOS
were thinking that buffering a track worth of data in that environment
was worthwhile.
As well, re-reading the same sector that was just written requires no
head movement. But it does force the disk to wait for the sector to
rotate around to the head again. So one gets to write at a maximum
speed of one disk sector every two disk rotations.
On 02/12/2023 17:24, David W. Hodgins wrote:
Don't use badblocks on ssd drives.
Indeed. Moist of these low level storage control tools are
now replicated inside the SSD controller itself (e.g.
badblocks), or are rendered unnecessary by the actual
storage architecture( defragmentation)
If there is a bad ram block, the SSD controller itself will
have flagged that already.
With read/write seek times being essentially zero, there is
no point in defragmenting at the computer level. The wear
levelling will already be rearranging where everything is
stored anyway.
The only thing the SSD needs is a trim command now and then.
On 03/12/23 10:32, The Natural Philosopher wrote:
On 02/12/2023 17:24, David W. Hodgins wrote:
Don't use badblocks on ssd drives.
Indeed. Moist of these low level storage control tools are
now replicated inside the SSD controller itself (e.g.
badblocks), or are rendered unnecessary by the actual
storage architecture( defragmentation)
If there is a bad ram block, the SSD controller itself will
have flagged that already.
With read/write seek times being essentially zero, there is
no point in defragmenting at the computer level. The wear
levelling will already be rearranging where everything is
stored anyway.
The only thing the SSD needs is a trim command now and then.
who and when issues such a command ? I am asking since I cannot
remember of having typed it anytime :(
On 03/12/23 10:32, The Natural Philosopher wrote:
On 02/12/2023 17:24, David W. Hodgins wrote:
Don't use badblocks on ssd drives.
Indeed. Moist of these low level storage control tools are now
replicated inside the SSD controller itself (e.g. badblocks), or are
rendered unnecessary by the actual storage architecture( defragmentation)
If there is a bad ram block, the SSD controller itself will have
flagged that already.
With read/write seek times being essentially zero, there is no point
in defragmenting at the computer level. The wear levelling will
already be rearranging where everything is stored anyway.
The only thing the SSD needs is a trim command now and then.
who and when issues such a command ? I am asking since I cannot remember
of having typed it anytime :(
On 03/12/23 10:32, The Natural Philosopher wrote:
On 02/12/2023 17:24, David W. Hodgins wrote:
Don't use badblocks on ssd drives.
Indeed. Moist of these low level storage control tools are now
replicated inside the SSD controller itself (e.g. badblocks), or are
rendered unnecessary by the actual storage architecture( defragmentation)
If there is a bad ram block, the SSD controller itself will have
flagged that already.
With read/write seek times being essentially zero, there is no point
in defragmenting at the computer level. The wear levelling will
already be rearranging where everything is stored anyway.
The only thing the SSD needs is a trim command now and then.
who and when issues such a command ? I am asking since I cannot remember
of having typed it anytime :(
On Sat, 2 Dec 2023 15:40:12 -0500
John-Paul Stewart <jpstewart@personalprojects.net> wrote:
On 2023-12-02 07:44, Spiros Bousbouras wrote:
I mean use badblocks either directly or through the -c option of mkfs >>> and similar commands.Badblocks is a leftover from a bygone era.
My understanding is that , if a sector of a drive seems to go bad , the drive
software automatically "remaps" it (or whatever the appropriate verb is) to >>> a different sector so does running badblocks actually buy you anything ? >>
For the last 30 years or so hard drives have had spare sectors and
remapped bad ones to good ones, transparently to the end-user. Just
like you said.
Does "spare sectors" mean on top of the advertised capacity of the drive ?
If
yes , could a drive which is not full find more spare sectors by reducing its advertised capacity (and informing the operating system) ?
Before that time (1980s and earlier, really) that wasn't the case. As
another poster alluded to, hard drives of that era would come with a
piece of paper listing the known bad blocks from manufacturing defects,
with space for you to write in additional entries as you found them.
That list could then be used when creating a filesystem (e.g., see the
-l option to mke2fs) so that the filesystem would not use those known
bad blocks.
So one had to copy by hand the list to a file ?
Interesting. How long such
lists tended to be ?
On Sat, 2 Dec 2023 20:23:10 -0000 (UTC)
Rich <rich@example.invalid> wrote:
Spiros Bousbouras <spibou@gmail.com> wrote:
[...]
Note here by "devices" I'm including USB
thumb drives (which vary wildly in quality and reliability).
SanDisk and Sony have worked well for me.
so does running badblocks actually buy you anything ?
That depends upon /why/ you want to run it, and what you are running
it upon.
Is badblocks only intended for hard drives or is it also
potentially useful for solid state drives ?
The 'badblocks' command is used to scan Linux block devices, so the
'intended' use is to scan "block devices". Whether it is useful
against whatever hardware is backing the Linux block device is a
different question.
Surely the intended use is for situations where it's useful.
If you use badblocks, do you do a read-write test or just read ?
I've done both in the past. Although I've used read-only scans far
more often than read-write scans.
[...]
Here are the scenarios where I've used badblocks:
[...]
These are very useful, thank you.
Note, in any case, having a proper system of backups is necessary,
even if you use badblocks to look for and catch possible failures
early before they become outright failures.
Of course. It is still possible for a drive to fail suddenly and
completely, isn't it ?
On Sat, 2 Dec 2023 15:40:12 -0500
John-Paul Stewart <jpstewart@personalprojects.net> wrote:
On 2023-12-02 07:44, Spiros Bousbouras wrote:
I mean use badblocks either directly or through the -c option
of mkfs and similar commands.
My understanding is that, if a sector of a drive seems to go bad,
the drive software automatically "remaps" it (or whatever the
appropriate verb is) to a different sector so does running
badblocks actually buy you anything ?
Badblocks is a leftover from a bygone era.
For the last 30 years or so hard drives have had spare sectors and
remapped bad ones to good ones, transparently to the end-user. Just
like you said.
Does "spare sectors" mean on top of the advertised capacity of the
drive?
If yes, could a drive which is not full find more spare sectors by
reducing its advertised capacity (and informing the operating
system)?
Before that time (1980s and earlier, really) that wasn't the case.
As another poster alluded to, hard drives of that era would come
with a piece of paper listing the known bad blocks from
manufacturing defects, with space for you to write in additional
entries as you found them. That list could then be used when
creating a filesystem (e.g., see the -l option to mke2fs) so that
the filesystem would not use those known bad blocks.
So one had to copy by hand the list to a file?
Interesting. How long such lists tended to be?
On Sat, 2 Dec 2023 15:40:12 -0500
John-Paul Stewart <jpstewart@personalprojects.net> wrote:
On 2023-12-02 07:44, Spiros Bousbouras wrote:
I mean use badblocks either directly or through the -c option of mkfs >>> and similar commands.Badblocks is a leftover from a bygone era.
My understanding is that , if a sector of a drive seems to go bad , the drive
software automatically "remaps" it (or whatever the appropriate verb is) to >>> a different sector so does running badblocks actually buy you anything ? >>
For the last 30 years or so hard drives have had spare sectors and
remapped bad ones to good ones, transparently to the end-user. Just
like you said.
Does "spare sectors" mean on top of the advertised capacity of the drive ? If yes , could a drive which is not full find more spare sectors by reducing its advertised capacity (and informing the operating system) ?
Before that time (1980s and earlier, really) that wasn't the case. As
another poster alluded to, hard drives of that era would come with a
piece of paper listing the known bad blocks from manufacturing defects,
with space for you to write in additional entries as you found them.
That list could then be used when creating a filesystem (e.g., see the
-l option to mke2fs) so that the filesystem would not use those known
bad blocks.
So one had to copy by hand the list to a file ? Interesting. How long such lists tended to be ?
It is still possible for a drive to fail suddenly andYes, and from some of the reports, SSD's seem to often fail in this
completely, isn't it ?
way, little to no warning, and poof, the drive no longer works.
On Sat, 2 Dec 2023 20:23:10 -0000 (UTC)
Rich <rich@example.invalid> wrote:
Spiros Bousbouras <spibou@gmail.com> wrote:
[...]
Note here by "devices" I'm including USB
thumb drives (which vary wildly in quality and reliability).
SanDisk and Sony have worked well for me.
so does running badblocks actually buy you anything ?
That depends upon /why/ you want to run it, and what you are running it
upon.
Is badblocks only intended for hard drives or is it also
potentially useful for solid state drives ?
The 'badblocks' command is used to scan Linux block devices, so the
'intended' use is to scan "block devices". Whether it is useful
against whatever hardware is backing the Linux block device is a
different question.
Surely the intended use is for situations where it's useful.
If you use badblocks , do you do a read-write test or just read ?
I've done both in the past. Although I've used read-only scans far
more often than read-write scans.
[...]
Here are the scenarios where I've used badblocks:
[...]
These are very useful , thank you.
Note, in any case, having a proper system of backups is necessary, even
if you use badblocks to look for and catch possible failures early
before they become outright failures.
Of course. It is still possible for a drive to fail suddenly and completely , isn't it ?
On 05/12/2023 22:45, Spiros Bousbouras wrote:
On Sat, 2 Dec 2023 15:40:12 -0500It may inform the operating system, but never the purchaser. The
John-Paul Stewart <jpstewart@personalprojects.net> wrote:
On 2023-12-02 07:44, Spiros Bousbouras wrote:
I mean use badblocks either directly or through the -c option
of mkfs
and similar commands.
My understanding is that , if a sector of a drive seems to go bad ,
the drive
software automatically "remaps" it (or whatever the appropriate verb
is) to
a different sector so does running badblocks actually buy you
anything ?
Badblocks is a leftover from a bygone era.
For the last 30 years or so hard drives have had spare sectors and
remapped bad ones to good ones, transparently to the end-user. Just
like you said.
Does "spare sectors" mean on top of the advertised capacity of the
drive ? If
yes , could a drive which is not full find more spare sectors by
reducing its
advertised capacity (and informing the operating system) ?
internet is full of drives that magically never have the capacity they
were sold as.
On 2023-12-06 12:45, The Natural Philosopher wrote:
On 05/12/2023 22:45, Spiros Bousbouras wrote:
On Sat, 2 Dec 2023 15:40:12 -0500It may inform the operating system, but never the purchaser. The
John-Paul Stewart <jpstewart@personalprojects.net> wrote:
On 2023-12-02 07:44, Spiros Bousbouras wrote:
I mean use badblocks either directly or through the -c option >>>>> of mkfs
and similar commands.
My understanding is that , if a sector of a drive seems to go bad ,
the drive
software automatically "remaps" it (or whatever the appropriate
verb is) to
a different sector so does running badblocks actually buy you
anything ?
Badblocks is a leftover from a bygone era.
For the last 30 years or so hard drives have had spare sectors and
remapped bad ones to good ones, transparently to the end-user. Just
like you said.
Does "spare sectors" mean on top of the advertised capacity of the
drive ? If
yes , could a drive which is not full find more spare sectors by
reducing its
advertised capacity (and informing the operating system) ?
internet is full of drives that magically never have the capacity they
were sold as.
Not to my knowledge.
It is full of people that do not realize that disk vendors, since 1985
at least, use decimal measuring units of bytes (such ad MB), while the
rest of computer industry used binary measuring units of bytes (such as
MiB), but named them MB.
The industry was late in recognizing that both system of units should
have different names, so the confusion lasted long.
On 06/12/2023 21:06, Carlos E. R. wrote:
On 2023-12-06 12:45, The Natural Philosopher wrote:
On 05/12/2023 22:45, Spiros Bousbouras wrote:
On Sat, 2 Dec 2023 15:40:12 -0500It may inform the operating system, but never the purchaser. The
John-Paul Stewart <jpstewart@personalprojects.net> wrote:
On 2023-12-02 07:44, Spiros Bousbouras wrote:
...
...
Does "spare sectors" mean on top of the advertised capacity of
the drive ? If
yes , could a drive which is not full find more spare sectors by
reducing its
advertised capacity (and informing the operating system) ?
internet is full of drives that magically never have the capacity
they were sold as.
Not to my knowledge.
...That is another issue. I am talking about '64GB memory sticks' that
have <4GB capacity.
On Thu, 7 Dec 2023 10:22:35 +0000
The Natural Philosopher <tnp@invalid.invalid> wrote:
That is another issue. I am talking about '64GB memory sticks' that
have <4GB capacity.
You can easily buy them on AliExpress, just search for 2 TB pendrives
at the cost of $5. What's funny, everybody is happy with them, rating
is usually pretty high, i.e. over 4.5. When I bought one, I had no
heart to inform people they were scammed.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 299 |
Nodes: | 16 (2 / 14) |
Uptime: | 63:43:49 |
Calls: | 6,690 |
Files: | 12,226 |
Messages: | 5,345,649 |