Re: [DNG] Can this drive be saved?

2020-09-09 Thread Brad Campbell via Dng

On 10/9/20 2:04 pm, Simon Walter wrote:

On 2020-09-09 15:53, Brad Campbell via Dng wrote:


It really doesn't. It'll mark a sector as "pending" (as in, I can't read
from it so I'll mark it for later).


What does the OS get at this point? Is that a short read error?


Yep. I have some old drives here I keep around for testing :

current smart excerpt :


196 Reallocated_Event_Count 0x0032   200   200   000Old_age   Always   
-   0
197 Current_Pending_Sector  0x0032   200   001   000Old_age   Always   
-   1
198 Offline_Uncorrectable   0x0030   200   200   000Old_age   Offline  
-   0



SMART Self-test log structure revision number 1
Num  Test_DescriptionStatus  Remaining  LifeTime(hours)  
LBA_of_first_error
# 1  Short offline   Completed: read failure   80% 59372 
1099436031

root@test:~/smartdir# dd if=/dev/sdm bs=512 count=1 skip=1099436031
dd: error reading ‘/dev/sdm’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5.56285 s, 0.0 kB/s

root@test:~/smartdir# dmesg | tail -n11
[  122.928898] sd 1:0:7:0: [sdm] tag#30 UNKNOWN(0x2003) Result: hostbyte=0x00 
driverbyte=0x08 cmd_age=2s
[  122.928974] sd 1:0:7:0: [sdm] tag#30 Sense Key : 0x3 [current]
[  122.929035] sd 1:0:7:0: [sdm] tag#30 ASC=0x11 ASCQ=0x0
[  122.929094] sd 1:0:7:0: [sdm] tag#30 CDB: opcode=0x28 28 00 41 88 0f f8 00 
00 08 00
[  122.929159] blk_update_request: critical medium error, dev sdm, sector 
1099436024 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[  125.712897] sd 1:0:7:0: [sdm] tag#8 UNKNOWN(0x2003) Result: hostbyte=0x00 
driverbyte=0x08 cmd_age=2s
[  125.712975] sd 1:0:7:0: [sdm] tag#8 Sense Key : 0x3 [current]
[  125.713034] sd 1:0:7:0: [sdm] tag#8 ASC=0x11 ASCQ=0x0
[  125.713092] sd 1:0:7:0: [sdm] tag#8 CDB: opcode=0x28 28 00 41 88 0f f8 00 00 
08 00
[  125.713156] blk_update_request: critical medium error, dev sdm, sector 
1099436024 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[  125.713229] Buffer I/O error on dev sdm, logical block 137429503, async page 
read

This drive just grows defects. I can zap that sector and in a couple of days 
it'll come up with another one.

Oddly enough, it's either unreliable electronics or flat out lying as I've 
zapped plenty of pending sectors on this disk :

  5 Reallocated_Sector_Ct   0x0033   200   200   140Pre-fail  Always   
-   0



I hope I didn't make it sound like that. SMART does not include
prediction. It's just data, and it needs be interpreted. I should have
probably said that I have never had a drive fail without being warned by
my monitoring system (which includes logging SMART data).


Right. Sorry, it sounded like you were relying on the SMART (Good/Bad) 
prediction which is notoriously terrible.
I've had drives that were practically in their death throes which SMART was quite happy 
to report as "Good".

On 9/9/20 11:00 pm, Hendrik Boom wrote:


Let me wonder how the drive knows a sector is bad when it writes to it.
Does it read it back as a check?



All I know is the drive will push a media error up the stack when there is a 
problem writing. I've never really thought about *how* it knows it's a bum 
write. I suppose a read-back is the only way I can think of achieving it.

Regards,
Brad
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-09 Thread Simon Walter
On 2020-09-09 15:53, Brad Campbell via Dng wrote:
> On 5/9/20 10:38 pm, Simon Walter wrote:
>> On 9/5/20 12:50 PM, Gregory Nowak wrote:
>>> On Sat, Sep 05, 2020 at 12:26:21PM +0900, Simon Walter wrote:
 Reallocation, to my knowledge, should happen in the background. It's
 *possible* that the reallocation event and the FS corruption are
 unrelated.
>>>
>>> My understanding is that the drive won't attempt to reallocate a
>>> sector until that sector is written to. So, if the e2fsck -f did try
>>> to write to that sector, the drive did reallocate it in the
>>> background. I do stand to be corrected as always.
>>>
>>
>> Interesting. I think reallocation also happens as part of SMART self
>> checks and reads.
> 
> It really doesn't. It'll mark a sector as "pending" (as in, I can't read
> from it so I'll mark it for later).

What does the OS get at this point? Is that a short read error?

...
> 
> I have drives that have > 70,000h on them with one or two reallocated
> sectors. I've also had drives grow them at a rapid rate. SMART isn't all
> that good at actually predicting pending failure.

I hope I didn't make it sound like that. SMART does not include
prediction. It's just data, and it needs be interpreted. I should have
probably said that I have never had a drive fail without being warned by
my monitoring system (which includes logging SMART data).

Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-09 Thread Brad Campbell via Dng

On 5/9/20 10:38 pm, Simon Walter wrote:

On 9/5/20 12:50 PM, Gregory Nowak wrote:

On Sat, Sep 05, 2020 at 12:26:21PM +0900, Simon Walter wrote:

Reallocation, to my knowledge, should happen in the background. It's
*possible* that the reallocation event and the FS corruption are unrelated.


My understanding is that the drive won't attempt to reallocate a
sector until that sector is written to. So, if the e2fsck -f did try
to write to that sector, the drive did reallocate it in the
background. I do stand to be corrected as always.



Interesting. I think reallocation also happens as part of SMART self checks and 
reads.


It really doesn't. It'll mark a sector as "pending" (as in, I can't read from 
it so I'll mark it for later).

You can try reading from the sector repeatedly and if you get a good read, 
write it back. Spinrite does that and it has about an even-odds success rate. 
It's old, clunky, slow and it's capabilities are very over-sold however. It's 
really a one trick pony.

A drive will absolutely not re-allocate a sector until it is written to. Then 
it will first try and re-write the sector in case the error is due to something 
like a power loss or other transient. Failing a good write it'll then 
reallocate and write the data to another (transparent) location.

The issue with a SMART long test (or any SMART media test in fact) is it'll abort on the 
first bad sector. If you really want to read every sector and mark *all* the duds as 
pending then you need something like dd conv=noerror with a blocksize of whatever the 
smallest sector the disk supports (4k for most SATA spinners). That'll chew through the 
sectors and the drive will flag every bad read as "pending".

I have drives that have > 70,000h on them with one or two reallocated sectors. 
I've also had drives grow them at a rapid rate. SMART isn't all that good at 
actually predicting pending failure. Analysis of the raw data on a large 
population of the same disk is better, but the best is to avoid the worry with 
up-to-date backups.

Regards,
Brad
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-09 Thread Hendrik Boom
On Wed, Sep 09, 2020 at 04:53:49PM +1000, Brad Campbell via Dng wrote:

> 
> A drive will absolutely not re-allocate a sector until it is written to. 
> Then it will first try and re-write the sector in case the error is due to 
> something like a power loss or other transient. Failing a good write it'll 
> then reallocate and write the data to another (transparent) location.

Let me wonder how the drive knows a sector is bad when it writes to it.
Does it read it back as a check?

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-09 Thread Brad Campbell via Dng

On 30/8/20 8:19 pm, Hendrik Boom wrote:

There's also the badblocks program, which can be set up either to do a
nondestructive read-only test for bad blocks, or a more throrough
destructive test, where it writes every block and later checks tht it
can read it correctly again, using a variety of bit patterns.

That might make the hard drive reassign the bad blocks on its own.

If the hard drive doesn't do that, 


 then it's ready for the bin.

If the drive can't reallocate sectors it's due to a catastrophic failure and 
means it's out of spare sectors.
Drives come from the factory with "lots" of spare sectors, so if it's out then 
the drive has both feet, 8 fingers and a thumb in the grave.

Regards,
Brad
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-09 Thread Brad Campbell via Dng

On 5/9/20 10:38 pm, Simon Walter wrote:

On 9/5/20 12:50 PM, Gregory Nowak wrote:

On Sat, Sep 05, 2020 at 12:26:21PM +0900, Simon Walter wrote:

Reallocation, to my knowledge, should happen in the background. It's
*possible* that the reallocation event and the FS corruption are unrelated.


My understanding is that the drive won't attempt to reallocate a
sector until that sector is written to. So, if the e2fsck -f did try
to write to that sector, the drive did reallocate it in the
background. I do stand to be corrected as always.



Interesting. I think reallocation also happens as part of SMART self checks and 
reads.


It really doesn't. It'll mark a sector as "pending" (as in, I can't read from 
it so I'll mark it for later).

You can try reading from the sector repeatedly and if you get a good read, 
write it back. Spinrite does that and it has about an even-odds success rate. 
It's old, clunky, slow and it's capabilities are very over-sold however. It's 
really a one trick pony.

A drive will absolutely not re-allocate a sector until it is written to. Then 
it will first try and re-write the sector in case the error is due to something 
like a power loss or other transient. Failing a good write it'll then 
reallocate and write the data to another (transparent) location.

The issue with a SMART long test (or any SMART media test in fact) is it'll abort on the 
first bad sector. If you really want to read every sector and mark *all* the duds as 
pending then you need something like dd conv=noerror with a blocksize of whatever the 
smallest sector the disk supports (4k for most SATA spinners). That'll chew through the 
sectors and the drive will flag every bad read as "pending".

I have drives that have > 70,000h on them with one or two reallocated sectors. 
I've also had drives grow them at a rapid rate. SMART isn't all that good at 
actually predicting pending failure. Analysis of the raw data on a large 
population of the same disk is better, but the best is to avoid the worry with 
up-to-date backups.

Regards,
Brad
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-07 Thread Hendrik Boom
On Sun, Sep 06, 2020 at 06:08:51PM -0400, Mason Loring Bliss wrote:
> On Sat, Sep 05, 2020 at 01:41:46PM -0400, Hendrik Boom wrote:
> 
> > Nowadays the hardware replaces individual bad blocks without bothering 
> > the file system.
> 
> Where it can, yeah. That said, I've seen some of the corruption that we're
> supposed to never see - the bitflips in files that people use to
> demonstrate self-healing filesystems - prior to my become a ZFS zealot.
> 
> The awfully nice thing about ZFS is that if you have a mirror or better,
> each drive stores both data and a checksum of that data, so you have an
> awfully good chance of finding one bit of recorded data that matches one
> checksum, and if you have that, ZFS can rewrite all the bad data. Even with
> a single disk, you can specify multiple copies to achieve the same thing,
> although catastrophic failure of the disk is always a possibility, making a
> proper mirror *and* back-ups preferable.
> 
> As a random note, the upstream ZFS custom package instructions work out of
> the box on Devuan, and they still ship sysvinit files when built that way.
> 
> 
> https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html
> 
> At some point there will be other filesystems that do the same. BtrFS isn't
> far behind, and hopefully some increased attention will get it the rest of
> the way. Red Hat's Stratis and DragonflyBSD's Hammer2 will both have self-
> healing working before long, using different approaches.

There are also the md RAID machanisms, which do the duplication but not 
the checksumming.  So if the hardware can't read a block, there's 
another copy on the mirror.

But the lack of checksumming makes it have to rely on the hardware for 
error detection.

It's an alternative if for some reason btrfs and xfs aren't suitable.

(in my case, they weren't available in the dark ages when I first 
created my file systems)

And I believe btrfs and zfs rely on the hardware implementing write 
blocks correctly.  I've heard of hard disks that fail to do that 
properly.  Those drives treat data as having been permanently recorded 
once they are in cache, instead of waiting until the data are actually 
on the hard disk surface itself.  This causes trouble on unexpected 
power-down.

I don't know if any such hard drives are still manufactured.  I hope 
not. 

And are those file systems good enough for media where blocks degenerate 
slightly each time they are written to?  The journals get a lot of write 
activity.

The copy-on-write mechanisms are the reason those file systems have 
their legendary stability.  But it also makes them vulnerable to errors  
in RAM.  When stuff is read, part of it is modified, and then written 
back (via the journal) it has a sojourn on RAM, where there 
is the potential for corruption.

-- hendrik

> 
> -- 
> Mason Loring Bliss  ((   If I have not seen as far as others, it is because
>  ma...@blisses.org   ))   giants were standing on my shoulders. - Hal Abelson


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-07 Thread golinux

On 2020-09-05 01:34, goli...@devuan.org wrote:


I'll try to get the content on the drive archived over the weekend and
ready for long-term storage.



A bit of a followup . . . first I deleted all the files in lost+found 
and the drive didn't explode.  Then deleted some files in the remaining 
directories and finally copied many GB of new data. It took quite a long 
time and required babysitting so a bit of a pain. Finally, I ran the 
SMART short test and no errors were reported.  I compared the current 
SMART data with the one taken after the fsck and only the poweron and 
hours running etc. had changed. So it looks like the drive is working 
normally again.


Keeping track of all this is taking way to much brainspace . . .

Again, thanks to all.

golinux





___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-06 Thread Mason Loring Bliss
On Sat, Sep 05, 2020 at 01:41:46PM -0400, Hendrik Boom wrote:

> Nowadays the hardware replaces individual bad blocks without bothering 
> the file system.

Where it can, yeah. That said, I've seen some of the corruption that we're
supposed to never see - the bitflips in files that people use to
demonstrate self-healing filesystems - prior to my become a ZFS zealot.

The awfully nice thing about ZFS is that if you have a mirror or better,
each drive stores both data and a checksum of that data, so you have an
awfully good chance of finding one bit of recorded data that matches one
checksum, and if you have that, ZFS can rewrite all the bad data. Even with
a single disk, you can specify multiple copies to achieve the same thing,
although catastrophic failure of the disk is always a possibility, making a
proper mirror *and* back-ups preferable.

As a random note, the upstream ZFS custom package instructions work out of
the box on Devuan, and they still ship sysvinit files when built that way.


https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html

At some point there will be other filesystems that do the same. BtrFS isn't
far behind, and hopefully some increased attention will get it the rest of
the way. Red Hat's Stratis and DragonflyBSD's Hammer2 will both have self-
healing working before long, using different approaches.

-- 
Mason Loring Bliss  ((   If I have not seen as far as others, it is because
 ma...@blisses.org   ))   giants were standing on my shoulders. - Hal Abelson


signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Ian Zimmerman
On 2020-09-05 13:41, Hendrik Boom wrote:

> This seems to say we now have two independent levels of bad block
> checking.
> 
> When the low-level one fails, the other takes over.  I't expect the
> file system to be unlikely to see bad blocks until the drive is hosed.

That is true if the drive is SMART capable _and_ you use SMART tools to
check it. In this thread we saw that SMART over USB is not that
reliable, and in fact I had very mixed results with it even over SATA. I
admit that was in the early years of SATA. So now I rely completely on a
regular 'e2fsck -c -c' to check my drives. Each has a handful of bad
blocks but the count remains stable and the drives usable.

Back when I was trying SMART, it would uselessly spam me in this
situation, while it completely missed an approaching catastrophic
failure.

-- 
Ian
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Hendrik Boom
On Sat, Sep 05, 2020 at 09:07:10PM +0900, Simon Walter wrote:
> On 9/5/20 3:34 PM, goli...@devuan.org wrote:
> ...
> > Yes we do! I checked a log I had saved from before I did the e2fsck and
> > those values are identical to the post-e2fsck log.
> 
> If they are identical, then it would seem that the fsck did not trigger the
> reallocation. However, what caused the corruption and what caused the
> reallocation *may* be something different. They may be two separate
> unrelated events. The runtime of the disk is low. So it is likely that it is
> the same event. The way to know would be to idenitfy that is if the sectors
> that were reallocated to are the same area where fsck found the corruption.
> 
> That's just a bit too much to get into. I would only worry about it if the
> reallocated sector count keeps rising.
> 
> For always connected disks, smartd is your friend.

In the old days, bad blocks were a matter for the file system to find 
out about and avoid, by simply putting files elsewhere.

Nowadays the hardware replaces individual bad blocks without bothering 
the file system.

This seems to say we now have two independent levels of bad block 
checking.

When the low-level one fails, the other takes over.  I't expect  the 
file system to be unlikely to see bad blocks until the drive is hosed.

-- hendrik
k
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Antony Stone
On Saturday 05 September 2020 at 19:28:24, Hendrik Boom wrote:

> On Fri, Sep 04, 2020 at 08:50:32PM -0700, Gregory Nowak wrote:
>
> > If you delete lost+found by accident, you can recreate it with
> > mklost+found(8).
> 
> So lost+found isn't identified by its file name but by something else
> within the file system? I's as unique aas the root directory?

It's not unique in that sense, but mklost+found pre-allocates space in the 
directory so that files can be put there without having to ask the file system 
to allocate space for them when needed (which might interfere with the fsck 
you're doing at the time, or with other files in the allocation table).

man mklost+found :)


Antony.

-- 
In the Beginning there was nothing, which exploded.

 - Terry Pratchett

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Hendrik Boom
On Fri, Sep 04, 2020 at 08:50:32PM -0700, Gregory Nowak wrote:
> On Fri, Sep 04, 2020 at 11:25:21PM -0400, Hendrik Boom wrote:
> > Delete the contents all you want, but keep the lost and found directory.
> 
> If you delete lost+found by accident, you can recreate it with
> mklost+found(8).

So lost+found isn't identified by its file name but by something else 
within the file system? I's as unique aas the root directory?

I never realized.

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Simon Walter

On 9/5/20 12:50 PM, Gregory Nowak wrote:

On Sat, Sep 05, 2020 at 12:26:21PM +0900, Simon Walter wrote:

Reallocation, to my knowledge, should happen in the background. It's
*possible* that the reallocation event and the FS corruption are unrelated.


My understanding is that the drive won't attempt to reallocate a
sector until that sector is written to. So, if the e2fsck -f did try
to write to that sector, the drive did reallocate it in the
background. I do stand to be corrected as always.



Interesting. I think reallocation also happens as part of SMART self 
checks and reads.


I am not sure where I read this. A disk will try to read a sector and if 
it detects that the magnetism is weaker than it ought to be or any other 
oddities, it reallocates the data. Though in golinux situation, maybe 
the disk was not turned on for a long time. So the disk controller never 
could detect the failing sector(s).


https://serverfault.com/questions/531553/how-to-find-files-affected-by-reallocated-sectors

I've read similar explantions since... since we "lost" the ability to 
low level format disks.


I am really interested in what does "short read" mean. I guess it means 
that not all data could be read, but is it a SATA error or an FS error?


I have had this error from a disk while it was plugged in via USB. 
Plugging it in via SATA caused the disk to complete the fsck without 
short reads and then I put it back into the USB case, and it continued 
to function. I have had USB controllers behave like this so many times, 
that I don't try and inspect disks in USB cases anymore.


Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Simon Walter

On 9/5/20 3:21 PM, goli...@devuan.org wrote:


My board doesn't have an eSATA port. Neither does the new dock but at 
least it is USB 3.0.  Current enclosures are 2.0 . . .



...

If you are a data hoarder and like disks, I'd suggest getting your
hands on some hardware that has a SATA controller. It doesn't need to
be fancy or new. Pretty much any working desktop is fine.



You're suggesting the disks get tested in the case itself, right? Like 
any hardwarephobe, that's something I really, REALLY don't like to do.




Yes, sorry to suggest a screwdriver.

I thought since you were using a USB case, that you had a laptop. It 
sounds like you have a desktop. Is that right? Plug in the disk there 
via a SATA cable.


Is the "dock" you were talking about something that fits into a desktop 
drive bay that you can slide a SATA disk into? That's a nice bit of 
hardware to have. I have three 3.5 and two 2.5. I'm always helping 
friends and customers rescue data. It means I don't have to fiddle with 
cables and screws as much.


Example:
https://ae01.alicdn.com/kf/HTB1BcRoPXalXFXXq6xXF/Uneatop-2-5-3-5-dual-bay-aluminum-case-SATA-hard-drive-caddy-hot-swap-hdd.jpg

Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread Simon Walter

On 9/5/20 3:34 PM, goli...@devuan.org wrote:
...
Yes we do! I checked a log I had saved from before I did the e2fsck and 
those values are identical to the post-e2fsck log.


If they are identical, then it would seem that the fsck did not trigger 
the reallocation. However, what caused the corruption and what caused 
the reallocation *may* be something different. They may be two separate 
unrelated events. The runtime of the disk is low. So it is likely that 
it is the same event. The way to know would be to idenitfy that is if 
the sectors that were reallocated to are the same area where fsck found 
the corruption.


That's just a bit too much to get into. I would only worry about it if 
the reallocated sector count keeps rising.


For always connected disks, smartd is your friend.

Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread spiralofhope
On Fri, 04 Sep 2020 20:22:56 -0500
goli...@devuan.org wrote:

> On 2020-09-04 19:24, spiralofhope wrote:
> > On Fri, 04 Sep 2020 15:03:55 -0500
> > goli...@devuan.org wrote:
> >   
> >> ...2 new 500 GB WD Black drives...  
> 
> Not sure if they still have the 5 yr. warranty though . . .

They do, but be sure to make a login on their website to be certain.
You can register the serial number and check their records for it.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread golinux

On 2020-09-04 22:33, Gregory Nowak wrote:

On Fri, Sep 04, 2020 at 09:19:42PM -0500, goli...@devuan.org wrote:

=== START OF READ SMART DATA SECTION ===
SMART Status command failed: scsi error medium or hardware error 
(serious)

SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.


You said this is a USB attached drive. That probably showed up
because the USB bridge doesn't support passing a given SMART
command(s) to the drive.



Thanks for the explanation.


SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  
UPDATED  WHEN_FAILED RAW_VALUE


--- snip ---

  5 Reallocated_Sector_Ct   0x0033   199   199   140Pre-fail  
Always   -   1


So we know that one sector was reallocated. Whether that happened when
e2fsck attempted to write to it, or earlier, we don't know.



Yes we do! I checked a log I had saved from before I did the e2fsck and 
those values are identical to the post-e2fsck log.



196 Reallocated_Event_Count 0x0032   199   199   000Old_age   
Always   -   1
197 Current_Pending_Sector  0x0032   200   200   000Old_age   
Always   -   0
198 Offline_Uncorrectable   0x0030   200   200   000Old_age   
Offline  -   0


Other than that one sector, the rest of the drive looks to be useable
so far.



I'll try to get the content on the drive archived over the weekend and 
ready for long-term storage.



SMART Self-test log structure revision number 1
Num  Test_DescriptionStatus  Remaining  
LifeTime(hours)  LBA_of_first_error
# 1  Extended offlineCompleted without error   00%55   
  -


Again, that confirms to me the drive reallocated one bad sector, and
the rest of it seems to be OK so far.



YEA!


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
100  Not_testing
200  Not_testing
300  Not_testing
400  Not_testing
500  Not_testing
Selective self-test flags (0x0):


You asked about this in an earlier message. The selective test portion
is used to report the status of the automatic testing the drive does
by itself if that's enabled, and your smartctl output shows that
automatic self tests are enabled on your drive. All the above says is
that the drive isn't running automatic self tests right now, so nothing 
to

worry about here.



Got it. Your comments have been helpful.  Thanks.

golinux


Greg

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-05 Thread golinux

On 2020-09-04 22:26, Simon Walter wrote:

On 9/5/20 11:19 AM, goli...@devuan.org wrote:

On 2020-09-04 20:46, Simon Walter wrote:

On 9/5/20 1:34 AM, Andreas Messer wrote:

Hi golinux,

On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:

On 2020-09-01 00:07, goli...@devuan.org wrote:
[...]
I have no idea how reliable the repaired drive is after this 
radical

surgery. Can it be written to or files deleted? Should I even try?
[...]


I wouldn't use a drive anymore which has started reallocating
sectors, well which has reallocated sectors all.


It's on it's way out for sure.

However, I am interested in how you are able to know that sectors on
golinux's disk have been relocated - from the information provided to
this mailing list. I know it's possible to see that in the SMART 
data,

but I didn't see that posted. Are short reads always surface errors?

Best regards,

Simon



Simon . . . SMART data attached. I hadn't noticed this before . . . 
sounds ominous . . .


SMART Status command failed: scsi error medium or hardware error 
(serious)


Note that I ran this from GSmartControl not a terminal.



I think it's because you are connected via USB. From my experience,
the best way, possibly the only thorough way, to diagnose a SATA disk
drive is connected to a SATA controller directly, which is why I
really like notebooks that have eSATA ports.



My board doesn't have an eSATA port. Neither does the new dock but at 
least it is USB 3.0.  Current enclosures are 2.0 . . .




I have gotten this error over USB before. When connecting the same
disk to a known working SATA controller, I was able to use it fine and
no errors occurred. USB -> SATA controllers/cases in my experience are
of poor quality and fail before the disk does. I am not one to hang on
to a failing disk, but you sound thorough. So I'd suggest using a SATA
controller to read the SMART data and run other diagnostics.



Exploring an eSATA controller is an adventure for another day . . .


If you are a data hoarder and like disks, I'd suggest getting your
hands on some hardware that has a SATA controller. It doesn't need to
be fancy or new. Pretty much any working desktop is fine.



You're suggesting the disks get tested in the case itself, right? Like 
any hardwarephobe, that's something I really, REALLY don't like to do.



In your SMART data:
Reallocated_Sector_Ct = 1
However:
SMART overall-health self-assessment test result: PASSED

Reallocation, to my knowledge, should happen in the background. It's
*possible* that the reallocation event and the FS corruption are
unrelated.



I'll keep an eye on that though I won't be accessing this disk often 
once it gets trimmed down and some additional files written to it. You 
probably noticed from the log that it doesn't even have 100 hours or run 
time on it.



If that count keeps going up, don't use the disk. Eventually the
surface will not be able to store data/be magnetised.



Understood.

golinux






___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread golinux

On 2020-09-04 22:25, Hendrik Boom wrote:

On Fri, Sep 04, 2020 at 02:47:38PM -0500, goli...@devuan.org wrote:


A few posts after yours Hendrik suggested checking the lost and found
directory and in it I found 57 folders and 15798 other items totaling 
16.6
GB. They are mostly edits from audacity (.au) and avidemux (in C). 
Also some
wav and mp3 and graphics stuff too. I couldn't find the associated 
mpgs or

isos and there seems to be some other things missing here and there.

Everything in the lost and found can be deleted. Maybe if I do it in 
small

chunks, it won't explode.  LOL!


Delete the contents all you want, but keep the lost and found 
directory.


-- hendrik



Understood.  I realize that directory is necessary and would only delete 
the contents. But a reminder is always good and might be useful to 
someone else. :)


golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Gregory Nowak
On Fri, Sep 04, 2020 at 11:25:21PM -0400, Hendrik Boom wrote:
> Delete the contents all you want, but keep the lost and found directory.

If you delete lost+found by accident, you can recreate it with
mklost+found(8).

On Sat, Sep 05, 2020 at 12:26:21PM +0900, Simon Walter wrote:
> Reallocation, to my knowledge, should happen in the background. It's
> *possible* that the reallocation event and the FS corruption are unrelated.

My understanding is that the drive won't attempt to reallocate a
sector until that sector is written to. So, if the e2fsck -f did try
to write to that sector, the drive did reallocate it in the
background. I do stand to be corrected as always.

Greg

-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Gregory Nowak
On Fri, Sep 04, 2020 at 09:19:42PM -0500, goli...@devuan.org wrote:
> === START OF READ SMART DATA SECTION ===
> SMART Status command failed: scsi error medium or hardware error (serious)
> SMART overall-health self-assessment test result: PASSED
> Warning: This result is based on an Attribute check.

You said this is a USB attached drive. That probably showed up
because the USB bridge doesn't support passing a given SMART
command(s) to the drive.

> SMART Attributes Data Structure revision number: 16
> Vendor Specific SMART Attributes with Thresholds:
> ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  UPDATED  
> WHEN_FAILED RAW_VALUE

--- snip ---

>   5 Reallocated_Sector_Ct   0x0033   199   199   140Pre-fail  Always  
>  -   1

So we know that one sector was reallocated. Whether that happened when
e2fsck attempted to write to it, or earlier, we don't know.

> 196 Reallocated_Event_Count 0x0032   199   199   000Old_age   Always  
>  -   1
> 197 Current_Pending_Sector  0x0032   200   200   000Old_age   Always  
>  -   0
> 198 Offline_Uncorrectable   0x0030   200   200   000Old_age   Offline 
>  -   0

Other than that one sector, the rest of the drive looks to be useable
so far.

> SMART Self-test log structure revision number 1
> Num  Test_DescriptionStatus  Remaining  LifeTime(hours)  
> LBA_of_first_error
> # 1  Extended offlineCompleted without error   00%55 -

Again, that confirms to me the drive reallocated one bad sector, and
the rest of it seems to be OK so far.

> SMART Selective self-test log data structure revision number 1
>  SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
> 100  Not_testing
> 200  Not_testing
> 300  Not_testing
> 400  Not_testing
> 500  Not_testing
> Selective self-test flags (0x0):

You asked about this in an earlier message. The selective test portion
is used to report the status of the automatic testing the drive does
by itself if that's enabled, and your smartctl output shows that
automatic self tests are enabled on your drive. All the above says is
that the drive isn't running automatic self tests right now, so nothing to
worry about here.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Hendrik Boom
On Fri, Sep 04, 2020 at 02:00:13PM -0700, Gregory Nowak wrote:
> On Fri, Sep 04, 2020 at 03:03:55PM -0500, goli...@devuan.org wrote:
> > This particular drive has no data that is not backed up elsewhere so I am
> > comfortable experimenting with it a bit as a learning experience.  OTOH,
> > trashing the remaining life it has for no reason wouldn't make sense.
> 
> You're not alone in that line of reasoning. I also use drives with
> reallocated sectors. I however do make sure I take frequent backups of
> those drives as I've stated in this thread before. I also verify the
> new backups before deleting the old to make sure I haven't backed up
> bad data. While some of the drives I've had died almost right away
> after starting to reallocate sectors, others are still doing fine so
> far years later.
> 
> If drives grew on trees I might not be taking this approach. Since
> they don't grow on trees, and since I like to squeeze the last drop
> out of things I own before recycling them (including cell phones and 
> computers),
> this is the approach I personally take. Others have disagreed with
> this approach, and others will likely continue to disagree. I would
> also add my voice to those who suggested doing a long SMART test.  Good luck.

I always do a through write/read test on every new drive to check all of 
it can be written and read back correctly. 

I've sent some of them back under warranty and gotten a replacement.

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Hendrik Boom
On Fri, Sep 04, 2020 at 02:47:38PM -0500, goli...@devuan.org wrote:
> 
> A few posts after yours Hendrik suggested checking the lost and found
> directory and in it I found 57 folders and 15798 other items totaling 16.6
> GB. They are mostly edits from audacity (.au) and avidemux (in C). Also some
> wav and mp3 and graphics stuff too. I couldn't find the associated mpgs or
> isos and there seems to be some other things missing here and there.
> 
> Everything in the lost and found can be deleted. Maybe if I do it in small
> chunks, it won't explode.  LOL!

Delete the contents all you want, but keep the lost and found directory.

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Simon Walter

On 9/5/20 11:19 AM, goli...@devuan.org wrote:

On 2020-09-04 20:46, Simon Walter wrote:

On 9/5/20 1:34 AM, Andreas Messer wrote:

Hi golinux,

On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:

On 2020-09-01 00:07, goli...@devuan.org wrote:
[...]
I have no idea how reliable the repaired drive is after this radical
surgery. Can it be written to or files deleted? Should I even try?
[...]


I wouldn't use a drive anymore which has started reallocating
sectors, well which has reallocated sectors all.


It's on it's way out for sure.

However, I am interested in how you are able to know that sectors on
golinux's disk have been relocated - from the information provided to
this mailing list. I know it's possible to see that in the SMART data,
but I didn't see that posted. Are short reads always surface errors?

Best regards,

Simon



Simon . . . SMART data attached. I hadn't noticed this before . . . 
sounds ominous . . .


SMART Status command failed: scsi error medium or hardware error (serious)

Note that I ran this from GSmartControl not a terminal.



I think it's because you are connected via USB. From my experience, the 
best way, possibly the only thorough way, to diagnose a SATA disk drive 
is connected to a SATA controller directly, which is why I really like 
notebooks that have eSATA ports.


About my above question to Andreas, I am interested to learn if this is 
indeed the case: short reads indicate surface error.


I have gotten this error over USB before. When connecting the same disk 
to a known working SATA controller, I was able to use it fine and no 
errors occurred. USB -> SATA controllers/cases in my experience are of 
poor quality and fail before the disk does. I am not one to hang on to a 
failing disk, but you sound thorough. So I'd suggest using a SATA 
controller to read the SMART data and run other diagnostics.


If you are a data hoarder and like disks, I'd suggest getting your hands 
on some hardware that has a SATA controller. It doesn't need to be fancy 
or new. Pretty much any working desktop is fine.


In your SMART data:
Reallocated_Sector_Ct = 1
However:
SMART overall-health self-assessment test result: PASSED

Reallocation, to my knowledge, should happen in the background. It's 
*possible* that the reallocation event and the FS corruption are unrelated.


If that count keeps going up, don't use the disk. Eventually the surface 
will not be able to store data/be magnetised.


I am keen to learn more about disk recovery. So please, anyone, correct 
me if I am wrong.


Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread golinux

On 2020-09-04 20:46, Simon Walter wrote:

On 9/5/20 1:34 AM, Andreas Messer wrote:

Hi golinux,

On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:

On 2020-09-01 00:07, goli...@devuan.org wrote:
[...]
I have no idea how reliable the repaired drive is after this radical
surgery. Can it be written to or files deleted? Should I even try?
[...]


I wouldn't use a drive anymore which has started reallocating
sectors, well which has reallocated sectors all.


It's on it's way out for sure.

However, I am interested in how you are able to know that sectors on
golinux's disk have been relocated - from the information provided to
this mailing list. I know it's possible to see that in the SMART data,
but I didn't see that posted. Are short reads always surface errors?

Best regards,

Simon



Simon . . . SMART data attached. I hadn't noticed this before . . . 
sounds ominous . . .


SMART Status command failed: scsi error medium or hardware error 
(serious)


Note that I ran this from GSmartControl not a terminal.

golinux

smartctl 6.4 2014-10-07 r4002 [i686-linux-3.16.0-4-686-pae] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Western Digital Caviar Green
Device Model: WDC WD10EACS-00D6B1
Serial Number:WD-WCAU49079944
LU WWN Device Id: 5 0014ee 202a5ed4c
Firmware Version: 01.01A01
User Capacity:1,000,204,886,016 bytes [1.00 TB]
Sector Size:  512 bytes logical/physical
Device is:In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.5, 3.0 Gb/s
Local Time is:Fri Sep  4 21:05:44 2020 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status command failed: scsi error medium or hardware error (serious)
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
was suspended by an interrupting 
command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status:  (   0) The previous self-test routine completed
without error or no self-test has ever 
been run.
Total time to complete Offline 
data collection:(24000) seconds.
Offline data collection
capabilities:(0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off 
support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:(0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:(0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine 
recommended polling time:(   2) minutes.
Extended self-test routine
recommended polling time:( 275) minutes.
Conveyance self-test routine
recommended polling time:(   5) minutes.
SCT capabilities:  (0x303f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  UPDATED  
WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate 0x002f   198   196   051Pre-fail  Always   
-   1183
  3 Spin_Up_Time0x0027   160   160   021Pre-fail  Always   
-   6991
  4 Start_Stop_Count0x0032   100   100   000Old_age   Always   
-   66
  5 Reallocated_Sector_Ct   0x0033   199   199   140Pre-fail  Always   
-   1
  7 Seek_Error_Rate 0x002e   100   253   000Old_age   Always   
-   0
  9 Power_On_Hours  0x0032   100   100   000Old_age   Always   
-   56
 10 Spin_Retry_Count0x0032   100   253   000Old_age   Always   
-   0
 11 Calibration_Retry_Count 0x0032   100   253   000Old_age   Always   
-   0
 12 Power_Cycle_Count   0x0032   

Re: [DNG] Can this drive be saved?

2020-09-04 Thread Simon Walter

On 9/5/20 1:34 AM, Andreas Messer wrote:

Hi golinux,

On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:

On 2020-09-01 00:07, goli...@devuan.org wrote:
[...]
I have no idea how reliable the repaired drive is after this radical
surgery. Can it be written to or files deleted? Should I even try?
[...]


I wouldn't use a drive anymore which has started reallocating
sectors, well which has reallocated sectors all.


It's on it's way out for sure.

However, I am interested in how you are able to know that sectors on
golinux's disk have been relocated - from the information provided to 
this mailing list. I know it's possible to see that in the SMART data, 
but I didn't see that posted. Are short reads always surface errors?


Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread golinux

On 2020-09-04 19:24, spiralofhope wrote:

On Fri, 04 Sep 2020 15:03:55 -0500
goli...@devuan.org wrote:


...2 new 500 GB WD Black drives...


You have good taste.



LOL! It's a learning process if you're paying attention. Note that the 
funky drive I'm currently playing with is a 1 TB WD Caviar Green. I've 
had a Black arrive DOA but once they are running it's always been like 
the Energizer Bunny.  Not sure if they still have the 5 yr. warranty 
though . . .


While I'm here I'll post the Selective Self-test log which supposedly 
completed without error a few minutes ago. It took just over 4 hours. It 
doesn't look quite right to me; I thought there would be more verbose 
details. Am I missing something? I have never run this test before:


  Complete selective self-test log:

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
100  Not_testing
200  Not_testing
300  Not_testing
400  Not_testing
500  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute 
delay.


Some comments on exactly what that means would be appreciated. Do I need 
to do something else? Should I now have more confidence in this drive?


Thanks again.

golinux



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread spiralofhope
On Fri, 04 Sep 2020 15:03:55 -0500
goli...@devuan.org wrote:

> ...2 new 500 GB WD Black drives...

You have good taste.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Gregory Nowak
On Fri, Sep 04, 2020 at 03:03:55PM -0500, goli...@devuan.org wrote:
> This particular drive has no data that is not backed up elsewhere so I am
> comfortable experimenting with it a bit as a learning experience.  OTOH,
> trashing the remaining life it has for no reason wouldn't make sense.

You're not alone in that line of reasoning. I also use drives with
reallocated sectors. I however do make sure I take frequent backups of
those drives as I've stated in this thread before. I also verify the
new backups before deleting the old to make sure I haven't backed up
bad data. While some of the drives I've had died almost right away
after starting to reallocate sectors, others are still doing fine so
far years later.

If drives grew on trees I might not be taking this approach. Since
they don't grow on trees, and since I like to squeeze the last drop
out of things I own before recycling them (including cell phones and computers),
this is the approach I personally take. Others have disagreed with
this approach, and others will likely continue to disagree. I would
also add my voice to those who suggested doing a long SMART test.  Good luck.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread golinux

On 2020-09-04 11:34, Andreas Messer wrote:

Hi golinux,

On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:

On 2020-09-01 00:07, goli...@devuan.org wrote:
[...]
I have no idea how reliable the repaired drive is after this radical
surgery. Can it be written to or files deleted? Should I even try?
[...]


I wouldn't use a drive anymore which has started reallocating
sectors, well which has reallocated sectors all.

During manufacturing the drive, it can happen that some sectors are 
bad,
but these sectors are already "reallocated" during the manufacturing 
end
test and will not show up in the SMART information. When a magnetic 
disc

drive starts reallocating sectors, it is an indicator that something
within drive starts to be become bad/broken. (Or even has been from the
beginning of its live) There is a high chance, that one will observe 
more

and more reallocations. And this is a guarantee for data loss.

Just for the record: The magnetic drives in my 24/7 NAS are
starting/stopping about 5 to 10 times a day (standby), according to 
SMART

these drives now have roughly 15k start/stops and about 7k power
on hours: They don't have a single reallocated sector.

If you can afford it, I would suggest you to replace it.

cheers,
Andreas


Andreas . . . it's always good to get feedback from those with more 
experience than I.


I don't have much confidence in hardware coming right OOTB. Of the items 
I've purchased over the years, quite a few have been DOA or failed 
shortly thereafter for whatever reason.


This particular drive has no data that is not backed up elsewhere so I 
am comfortable experimenting with it a bit as a learning experience.  
OTOH, trashing the remaining life it has for no reason wouldn't make 
sense.


I have some older spares that I can reuse and 2 new 500 GB WD Black 
drives waiting to be formatted.


BTW . . .thanks for fixing apt in chimaera.  :D

golinux









___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread golinux

On 2020-09-04 05:38, Simon Walter wrote:

On 9/4/20 3:50 PM, goli...@devuan.org wrote:
Well . . . I decided to run an fsck on the misbehaving harddrive. It 
started off by identifying the errors and rewriting them and then went 
through Free block counts, Inode bitmap differences and Free inodes 
and directory count. Some snippets of the output are posted below. I 
did not stick around to watch all of it so may have missed something. 
It took a long time to sort itself!


Out of curiosity, was it connected via eSATA or USB? I forgot what
kind of dock you got.



The drive is still in the external case.  Connection is USB with AC 
adapter. Testing it on the dock would have been the next step. I did 
finally get the dock out of the box but have not fired it up yet. I am 
old, slow and methodical . . .




When it finished, I mounted the drive without issue and could read the 
remaining directories and files.  However the /media/xx/cstwo/600 
directory mentioned in the original mounting error below was nowhere 
to be found:


"Error when getting information for file '/media/xx/cstwo/600': 
Input/output error."


It's possible that data is not actually gone and can be recovered if
you know what you are looking for. However, as you stated, you have a
copy of the data elsewhere.



A few posts after yours Hendrik suggested checking the lost and found 
directory and in it I found 57 folders and 15798 other items totaling 
16.6 GB. They are mostly edits from audacity (.au) and avidemux (in C). 
Also some wav and mp3 and graphics stuff too. I couldn't find the 
associated mpgs or isos and there seems to be some other things missing 
here and there.


Everything in the lost and found can be deleted. Maybe if I do it in 
small chunks, it won't explode.  LOL!




Then I ran the SMART Short offline test and it completed without error

I have no idea how reliable the repaired drive is after this radical 
surgery. Can it be written to or files deleted? Should I even try?


From my experience, SMART data is reliable. To give some idea, I have
experience with over a hundred disks since they started to include
SMART. So probably not that much compared to others on this list.

I would say there is no problem with the underlying disk and the
corruption occurred at the filesystem level, which is one reason an
entire directory is missing, rather than at the disk level. If you
want more assurance, run the long test. You can get some idea of how
quickly your drive is deteriorating by monitoring changes to the SMART
data (smartd). I've been able to predict failure before it happens.
It's never been sudden. So if your disk "PASSED" it's probably fine to
use it.

Modern disk drives will move your data to good sectors when it detects
failure looming in bad sectors. So head failure is an issue, and can
also be predicted by SMART data. Mishandling of drives is something
that SMART can't predict of course. ;)



Thanks for the useful info Simon. I will run the long SMART test later 
today.



Best regards,

Simon


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Hendrik Boom
On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:
> On 2020-09-01 00:07, goli...@devuan.org wrote:
> > Thanks to everyone who has responded to this thread (some off-list). I
> > just wanted to drop a short note updating you that the dock arrived
> > earlier today but I haven't yet had a chance to open the box. I am not
> > an impulsive person.  I tend to measure 6 times and cut once!  So it's
> > going to take me a while to sort through all the suggestions and
> > decide how to proceed. I'll post when I have figured that out and the
> > stars align.  Stay tuned . . .
> > 
> > golinux
> 
> Well . . . I decided to run an fsck on the misbehaving harddrive. It started
> off by identifying the errors and rewriting them and then went through Free
> block counts, Inode bitmap differences and Free inodes and directory count.
> Some snippets of the output are posted below. I did not stick around to
> watch all of it so may have missed something. It took a long time to sort
> itself!

You might want to compare the contents of the disk with a recent backup, and 
see if they match.
When they don't, you should heck whether it' because
   (1) the data on disk have become bad, or
   (2) the data has changed legitmately sine the last backup.
Of course it's possible that the data went bad before that backup and garbage 
has been backed up.
> 
> ==
> 
> When it finished, I mounted the drive without issue and could read the
> remaining directories and files.  However the /media/xx/cstwo/600
> directory mentioned in the original mounting error below was nowhere to be
> found:

Have you checked the top-level lost and found directory?  Stray files end up 
there
if fsck doen't know where they belong.

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Steve Litt
On Fri, 4 Sep 2020 18:34:29 +0200
Andreas Messer  wrote:

> Hi golinux,
> 
> On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:
> > On 2020-09-01 00:07, goli...@devuan.org wrote:
> > [...]
> > I have no idea how reliable the repaired drive is after this radical
> > surgery. Can it be written to or files deleted? Should I even try?
> > [...]  
> 
> I wouldn't use a drive anymore which has started reallocating 
> sectors, well which has reallocated sectors all.

I very strongly agree. Using a drive that's had troubles in the past is
asking for lost or altered data.

> During manufacturing the drive, it can happen that some sectors are
> bad, but these sectors are already "reallocated" during the
> manufacturing end test and will not show up in the SMART information.
> When a magnetic disc drive starts reallocating sectors, it is an
> indicator that something within drive starts to be become bad/broken.
> (Or even has been from the beginning of its live) There is a high
> chance, that one will observe more and more reallocations. And this
> is a guarantee for data loss.

The preceding is what I've observed. If a sector goes bad, other
sectors soon follow.

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Andreas Messer
Hi golinux,

On Fri, Sep 04, 2020 at 01:50:07AM -0500, goli...@devuan.org wrote:
> On 2020-09-01 00:07, goli...@devuan.org wrote:
> [...]
> I have no idea how reliable the repaired drive is after this radical
> surgery. Can it be written to or files deleted? Should I even try?
> [...]

I wouldn't use a drive anymore which has started reallocating 
sectors, well which has reallocated sectors all.

During manufacturing the drive, it can happen that some sectors are bad,
but these sectors are already "reallocated" during the manufacturing end
test and will not show up in the SMART information. When a magnetic disc
drive starts reallocating sectors, it is an indicator that something 
within drive starts to be become bad/broken. (Or even has been from the
beginning of its live) There is a high chance, that one will observe more 
and more reallocations. And this is a guarantee for data loss.

Just for the record: The magnetic drives in my 24/7 NAS are
starting/stopping about 5 to 10 times a day (standby), according to SMART
these drives now have roughly 15k start/stops and about 7k power 
on hours: They don't have a single reallocated sector.

If you can afford it, I would suggest you to replace it.

cheers,
Andreas

-- 
gnuPG keyid: 8C2BAF51
fingerprint: 28EE 8438 E688 D992 3661 C753 90B3 BAAA 8C2B AF51


signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Tito via Dng


Il 04/09/20 08:50, goli...@devuan.org ha scritto:
> On 2020-09-01 00:07, goli...@devuan.org wrote:
>> Thanks to everyone who has responded to this thread (some off-list). I
>> just wanted to drop a short note updating you that the dock arrived
>> earlier today but I haven't yet had a chance to open the box. I am not
>> an impulsive person.  I tend to measure 6 times and cut once!  So it's
>> going to take me a while to sort through all the suggestions and
>> decide how to proceed. I'll post when I have figured that out and the
>> stars align.  Stay tuned . . .
>>
>> golinux
> 
> Well . . . I decided to run an fsck on the misbehaving harddrive. It started 
> off by identifying the errors and rewriting them and then went through Free 
> block counts, Inode bitmap differences and Free inodes and directory count. 
> Some snippets of the output are posted below. I did not stick around to watch 
> all of it so may have missed something. It took a long time to sort itself!
> 
> ==
> 
> root@devuan:/home/xx# fsck /dev/sdc1 -y
> fsck from util-linux 2.25.2
> e2fsck 1.42.12 (29-Aug-2014)
> cstwo contains a file system with errors, check forced.
> Pass 1: Checking inodes, blocks, and size
> Error reading block 40042498 (Attempt to read block from filesystem resulted 
> in short read) while getting next inode from scan.  Ignore error? yes
> Force rewrite? yes
> Error reading block 41943042 (Attempt to read block from filesystem resulted 
> in short read) while getting next inode from scan.  Ignore error? yes
> Force rewrite? yes
> yada, yada
> 
> ==
> 
> Free blocks count wrong for group #6302 (22328, counted=25579).
> Fix? yes
> 
> Free blocks count wrong for group #6678 (21, counted=22).
> Fix? yes
> 
> Free blocks count wrong (72019929, counted=75713399).
> Fix? yes
> yada, yada
> 
> ==
> 
> Inode bitmap differences:  -(20021249--20021280) -(20971521--20971552) 
> -(21250049--21250065) -(23756801--23756811) -(25772033--25772051) 
> -(25772053--25772057) -(25772059--25772064) -(25772067--25772069) 
> -(25772073--25772074)
> yada, yada
> 
> ==
> 
> [ending with]
> 
> Free inodes count wrong for group #6278 (13844, counted=14355).
> Fix? yes
> 
> Directories count wrong for group #6278 (19, counted=0).
> Fix? yes
> 
> cstwo: * FILE SYSTEM WAS MODIFIED *
> cstwo: 191841/122109952 files (1.9% non-contiguous), 168476601/24419 
> blocks
> 
> ==
> 
> When it finished, I mounted the drive without issue and could read the 
> remaining directories and files.  However the /media/xx/cstwo/600 
> directory mentioned in the original mounting error below was nowhere to be 
> found:
> 
> "Error when getting information for file '/media/xx/cstwo/600': 
> Input/output error."
> 
> Then I ran the SMART Short offline test and it completed without error


Hi,
better run the long offline test, takes about 2 hrs but check whole disk surface
and will detect other bad sectors if there are any.

Ciao, 
Tito

> I have no idea how reliable the repaired drive is after this radical surgery. 
> Can it be written to or files deleted? Should I even try?
> 
> Thanks to all and especially g4sra for detailed suggestions and advice.
> 
> Now onto the next project needed to moving on from jessie at long last.
> 
> Take care all,
> 
> golinux
> 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread Simon Walter

On 9/4/20 3:50 PM, goli...@devuan.org wrote:
Well . . . I decided to run an fsck on the misbehaving harddrive. It 
started off by identifying the errors and rewriting them and then went 
through Free block counts, Inode bitmap differences and Free inodes and 
directory count. Some snippets of the output are posted below. I did not 
stick around to watch all of it so may have missed something. It took a 
long time to sort itself!


Out of curiosity, was it connected via eSATA or USB? I forgot what kind 
of dock you got.


...


When it finished, I mounted the drive without issue and could read the 
remaining directories and files.  However the /media/xx/cstwo/600 
directory mentioned in the original mounting error below was nowhere to 
be found:


"Error when getting information for file '/media/xx/cstwo/600': 
Input/output error."


It's possible that data is not actually gone and can be recovered if you 
know what you are looking for. However, as you stated, you have a copy 
of the data elsewhere.




Then I ran the SMART Short offline test and it completed without error

I have no idea how reliable the repaired drive is after this radical 
surgery. Can it be written to or files deleted? Should I even try?


From my experience, SMART data is reliable. To give some idea, I have 
experience with over a hundred disks since they started to include 
SMART. So probably not that much compared to others on this list.


I would say there is no problem with the underlying disk and the 
corruption occurred at the filesystem level, which is one reason an 
entire directory is missing, rather than at the disk level. If you want 
more assurance, run the long test. You can get some idea of how quickly 
your drive is deteriorating by monitoring changes to the SMART data 
(smartd). I've been able to predict failure before it happens. It's 
never been sudden. So if your disk "PASSED" it's probably fine to use it.


Modern disk drives will move your data to good sectors when it detects 
failure looming in bad sectors. So head failure is an issue, and can 
also be predicted by SMART data. Mishandling of drives is something that 
SMART can't predict of course. ;)


Best regards,

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-09-04 Thread golinux

On 2020-09-01 00:07, goli...@devuan.org wrote:

Thanks to everyone who has responded to this thread (some off-list). I
just wanted to drop a short note updating you that the dock arrived
earlier today but I haven't yet had a chance to open the box. I am not
an impulsive person.  I tend to measure 6 times and cut once!  So it's
going to take me a while to sort through all the suggestions and
decide how to proceed. I'll post when I have figured that out and the
stars align.  Stay tuned . . .

golinux


Well . . . I decided to run an fsck on the misbehaving harddrive. It 
started off by identifying the errors and rewriting them and then went 
through Free block counts, Inode bitmap differences and Free inodes and 
directory count. Some snippets of the output are posted below. I did not 
stick around to watch all of it so may have missed something. It took a 
long time to sort itself!


==

root@devuan:/home/xx# fsck /dev/sdc1 -y
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
cstwo contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and size
Error reading block 40042498 (Attempt to read block from filesystem 
resulted in short read) while getting next inode from scan.  Ignore 
error? yes

Force rewrite? yes
Error reading block 41943042 (Attempt to read block from filesystem 
resulted in short read) while getting next inode from scan.  Ignore 
error? yes

Force rewrite? yes
yada, yada

==

Free blocks count wrong for group #6302 (22328, counted=25579).
Fix? yes

Free blocks count wrong for group #6678 (21, counted=22).
Fix? yes

Free blocks count wrong (72019929, counted=75713399).
Fix? yes
yada, yada

==

Inode bitmap differences:  -(20021249--20021280) -(20971521--20971552) 
-(21250049--21250065) -(23756801--23756811) -(25772033--25772051) 
-(25772053--25772057) -(25772059--25772064) -(25772067--25772069) 
-(25772073--25772074)

yada, yada

==

[ending with]

Free inodes count wrong for group #6278 (13844, counted=14355).
Fix? yes

Directories count wrong for group #6278 (19, counted=0).
Fix? yes

cstwo: * FILE SYSTEM WAS MODIFIED *
cstwo: 191841/122109952 files (1.9% non-contiguous), 168476601/24419 
blocks


==

When it finished, I mounted the drive without issue and could read the 
remaining directories and files.  However the /media/xx/cstwo/600 
directory mentioned in the original mounting error below was nowhere to 
be found:


"Error when getting information for file '/media/xx/cstwo/600': 
Input/output error."


Then I ran the SMART Short offline test and it completed without error

I have no idea how reliable the repaired drive is after this radical 
surgery. Can it be written to or files deleted? Should I even try?


Thanks to all and especially g4sra for detailed suggestions and advice.

Now onto the next project needed to moving on from jessie at long last.

Take care all,

golinux








___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-31 Thread golinux
Thanks to everyone who has responded to this thread (some off-list). I 
just wanted to drop a short note updating you that the dock arrived 
earlier today but I haven't yet had a chance to open the box. I am not 
an impulsive person.  I tend to measure 6 times and cut once!  So it's 
going to take me a while to sort through all the suggestions and decide 
how to proceed. I'll post when I have figured that out and the stars 
align.  Stay tuned . . .


golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-30 Thread Hendrik Boom
On Sat, Aug 29, 2020 at 06:45:15PM -0700, Gregory Nowak wrote:
> On Sat, Aug 29, 2020 at 04:35:01PM -0500, goli...@devuan.org wrote:
> > What are the chances of fsck repairing the bad sectors? I shamefully admit I
> > have not thought about fsck for years.
> 
> This looks to be at the media level, so is most likely beyond
> fsck. Since you said you can afford to lose this drive's contents, I
> would suggest using dd to fill the drive with zeros:
> 
> dd if=/dev/zero of=/dev/sdx
> 
> where /dev/sdx is the designation for your drive. This might cause the
> drive to reallocate the bad sector, or to mark the bad sector as good
> again.

There's also the badblocks program, which can be set up either to do a 
nondestructive read-only test for bad blocks, or a more throrough 
destructive test, where it writes every block and later checks tht it 
can read it correctly again, using a variety of bit patterns.

That might make the hard drive reassign the bad blocks on its own.

If the hard drive doesn't do that, you can always use the -c option of 
the e2fsck and mke2fs so that the ext2 file system will avoid using any 
of the bad blocks of its own accord.

It's possible to feed the results from badblocks in to the e2fsck or 
mke2fs yourself (instead of using the -c option) but it's recommended 
you *not* do that because you have to tell badblocks several file-system 
paramters in order for its list of bad blocks to match the file-system's 
block numbering scheme, and e2fsck and mke2fs know how to do this 
correctly.

-- hendrik
 
> Then, run a SMART test on the drive again. If it still fails,
> then that drive probably can't be fixed. If the SMART test passes this
> time, you can restore your backups on to it and keep using it. If you
> do that, be very sure to sync that drive with your other backups
> frequently, and don't rely on it exclusively.
> 
> If you don't want to wait for dd to write the entire drive, you can try
> following this tutorial instead:

badblocks in its most thorough mode will likely take longer than dd 
because it writes and reads the entire drive multiple times, but it is 
thorough.

I use it to test new drives after purchase before use, and I have 
occasionally ended up returning a new drive under warranty.  The 
replacement worked fine.

-- hendrik

> 
> 
> 
> It seems to be old, but most if not all of it still seems relevant as
> well. You will almost certainly want to run
> 
> e2fsck -f /dev/sdx1
> 
> at the end of this process before mounting the drive. Good luck.
> 
> Greg
> 
> 
> -- 
> web site: http://www.gregn.net
> gpg public key: http://www.gregn.net/pubkey.asc
> skype: gregn1
> (authorization required, add me to your contacts list first)
> If we haven't been in touch before, e-mail me before adding me to your 
> contacts.
> 
> --
> Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-30 Thread Tito via Dng


Il 30/08/20 06:33, Gregory Nowak ha scritto:
> On Sat, Aug 29, 2020 at 10:36:26PM -0500, goli...@devuan.org wrote:
>> On 2020-08-29 22:15, Gregory Nowak wrote:
>>> On Sat, Aug 29, 2020 at 09:15:13PM -0500, goli...@devuan.org wrote:
 dd if=/dev/zero bs=1M of=/dev/sdx
>>>
>>> That will just erase the first megabyte of the drive, leaving
>>> utilities like cfdisk to think the drive is new and unformatted. It
>>> won't attempt to over write the bad sector(s) though. See the other
>>> message I posted on how you can try to over write just the bad
>>> sector(s) faster.
>>>
>>> Greg
>>
>> Gregory . . .  the detailed instructions in this and your previous email are
>> very helpful. Thanks for catching the error.  If needed, I will use this
>> command as you suggested:
> 
> I just looked at what you posted earlier, and realized that it didn't
> give a count= parameter. So, the command you gave earlier would
> actually erase the entire drive one megabyte at a time instead of 512
> kilobytes at a time, which I believe is the default block size dd
> uses.
> 
> So, to clarify, 
> dd if=/dev/zero bs=1M of=/dev/sdx
> would in fact erase the entire drive. Apologies for the confusion.
> 
> Greg
> 
> 

Hi,
you can try to rewrite only the sectors at the LBA addresses shown in the smart 
test failure,
this often is enough to relocate them to spare sectors.
You might need to repeat it a few times until all bad sectors are relocated.
You should also check that the drive is properly powered, once I got mad
at a raid array showing a lot of errors like this just due to a faulty PSU.

fix_sector.sh

_
#!/bin/bash

while getopts ":h" opt; do
case $opt in
h)
echo "Usage $(basename $0) SECTOR DEVICE" >&2
exit 0
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done

if [ $# -ne 2 ] ; then
echo "Usage $(basename $0) SECTOR DEVICE"
exit 1
fi
if [ -b $2 ] ; then
echo -n "This can potentially destroy all data on $2. Are you sure? 
[y|N] "
read ans
if [ "x$ans" != "xy" ] ; then
echo "Exiting..."
exit 0
fi
hdparm --yes-i-know-what-i-am-doing  --repair-sector $1 $2
else
echo "Error: $2 is not a block device"
exit 1
fi
exit 0



Hope this helps, but use at your own risk.

Ciao,
Tito
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread Gregory Nowak
On Sat, Aug 29, 2020 at 10:36:26PM -0500, goli...@devuan.org wrote:
> On 2020-08-29 22:15, Gregory Nowak wrote:
> >On Sat, Aug 29, 2020 at 09:15:13PM -0500, goli...@devuan.org wrote:
> >>dd if=/dev/zero bs=1M of=/dev/sdx
> >
> >That will just erase the first megabyte of the drive, leaving
> >utilities like cfdisk to think the drive is new and unformatted. It
> >won't attempt to over write the bad sector(s) though. See the other
> >message I posted on how you can try to over write just the bad
> >sector(s) faster.
> >
> >Greg
> 
> Gregory . . .  the detailed instructions in this and your previous email are
> very helpful. Thanks for catching the error.  If needed, I will use this
> command as you suggested:

I just looked at what you posted earlier, and realized that it didn't
give a count= parameter. So, the command you gave earlier would
actually erase the entire drive one megabyte at a time instead of 512
kilobytes at a time, which I believe is the default block size dd
uses.

So, to clarify, 
dd if=/dev/zero bs=1M of=/dev/sdx
would in fact erase the entire drive. Apologies for the confusion.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread golinux

On 2020-08-29 22:15, Gregory Nowak wrote:

On Sat, Aug 29, 2020 at 09:15:13PM -0500, goli...@devuan.org wrote:

dd if=/dev/zero bs=1M of=/dev/sdx


That will just erase the first megabyte of the drive, leaving
utilities like cfdisk to think the drive is new and unformatted. It
won't attempt to over write the bad sector(s) though. See the other
message I posted on how you can try to over write just the bad
sector(s) faster.

Greg


Gregory . . .  the detailed instructions in this and your previous email 
are very helpful. Thanks for catching the error.  If needed, I will use 
this command as you suggested:


dd if=/dev/zero of=/dev/sdx

I think this can be marked as "solved" for now.  Will post an update in 
a week or so.


golinux








___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread Gregory Nowak
On Sat, Aug 29, 2020 at 09:15:13PM -0500, goli...@devuan.org wrote:
> dd if=/dev/zero bs=1M of=/dev/sda

That will just erase the first megabyte of the drive, leaving
utilities like cfdisk to think the drive is new and unformatted. It
won't attempt to over write the bad sector(s) though. See the other
message I posted on how you can try to over write just the bad
sector(s) faster.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread golinux
I was wondering if a reformat might be possible but if it requires the 
nuclear option so be it. LOL!  I've only had to dd a handful of times so 
searched and found this command to zero a drive.  Will that get the job 
done?  Any idea how long that might take on a 1 TB drive? There is 
cost|benefit|aggravation to consider . . .


dd if=/dev/zero bs=1M of=/dev/sda

In any case, I'll wait till the dock arrives for further testing to make 
that decision.


Thanks again.  Nice to see that you're still hanging around the campfire 
. . .  :)


On 2020-08-29 19:52, Bruce Perens wrote:
If you just want to reuse the physical drive, without the data, there 
is a
way to do that. Write zeros the entire length of the block device. If 
there
are enough spare sectors left on the disk, the bad ones will be 
relocated

as you write them. The various disk tools will then tell you what the
overall health of the drive is.

On Sat, Aug 29, 2020, 4:12 PM  wrote:


On 2020-08-29 17:15, Bruce Perens via Dng wrote:
> Copy the block partition (not the mounted files) to a same size or
> larger
> blank block partition using ddrescue or gddrescue. Try to mount that
> read
> only and copy the files off. If it doesn't work, try to restore the
> superblock using one of the tutorials online.
>

Thanks Bruce . . .

Unfortunately, I don't have spare 1 TB drives laying around.  Since 
that
drive is an exact copy of another still working drive, no critical 
data

has been lost so no need to copy files.

I'm guessing that this failure is beyond fsck . . .

golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread Gregory Nowak
On Sat, Aug 29, 2020 at 04:35:01PM -0500, goli...@devuan.org wrote:
> What are the chances of fsck repairing the bad sectors? I shamefully admit I
> have not thought about fsck for years.

This looks to be at the media level, so is most likely beyond
fsck. Since you said you can afford to lose this drive's contents, I
would suggest using dd to fill the drive with zeros:

dd if=/dev/zero of=/dev/sdx

where /dev/sdx is the designation for your drive. This might cause the
drive to reallocate the bad sector, or to mark the bad sector as good
again. Then, run a SMART test on the drive again. If it still fails,
then that drive probably can't be fixed. If the SMART test passes this
time, you can restore your backups on to it and keep using it. If you
do that, be very sure to sync that drive with your other backups
frequently, and don't rely on it exclusively.

If you don't want to wait for dd to write the entire drive, you can try
following this tutorial instead:



It seems to be old, but most if not all of it still seems relevant as
well. You will almost certainly want to run

e2fsck -f /dev/sdx1

at the end of this process before mounting the drive. Good luck.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread Bruce Perens via Dng
If you just want to reuse the physical drive, without the data, there is a
way to do that. Write zeros the entire length of the block device. If there
are enough spare sectors left on the disk, the bad ones will be relocated
as you write them. The various disk tools will then tell you what the
overall health of the drive is.

On Sat, Aug 29, 2020, 4:12 PM  wrote:

> On 2020-08-29 17:15, Bruce Perens via Dng wrote:
> > Copy the block partition (not the mounted files) to a same size or
> > larger
> > blank block partition using ddrescue or gddrescue. Try to mount that
> > read
> > only and copy the files off. If it doesn't work, try to restore the
> > superblock using one of the tutorials online.
> >
>
> Thanks Bruce . . .
>
> Unfortunately, I don't have spare 1 TB drives laying around.  Since that
> drive is an exact copy of another still working drive, no critical data
> has been lost so no need to copy files.
>
> I'm guessing that this failure is beyond fsck . . .
>
> golinux
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread golinux

On 2020-08-29 18:13, terryc wrote:

On Sat, 29 Aug 2020 16:35:01 -0500
goli...@devuan.org wrote:



PS. There is no critical data on this disk because I always keep
multiple backups. But it would be nice to have that drive functioning
in some capacity.


The only other suggestion is  'the put it in the freezer trick' which
may work until it warms up again, if it is an electro-mechanical
derived fault.



LOL!  I've never had occasion to do that but always wanted to try.  I'll 
wait to see how it works in the dock to eliminate any hardware failure 
in the enclosure first though.  Will report back in a week or so - 
shipping is really slow these days . . .


golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread terryc
On Sat, 29 Aug 2020 16:35:01 -0500
goli...@devuan.org wrote:


> PS. There is no critical data on this disk because I always keep 
> multiple backups. But it would be nice to have that drive functioning
> in some capacity.

The only other suggestion is  'the put it in the freezer trick' which
may work until it warms up again, if it is an electro-mechanical
derived fault.  

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread golinux

On 2020-08-29 17:15, Bruce Perens via Dng wrote:
Copy the block partition (not the mounted files) to a same size or 
larger
blank block partition using ddrescue or gddrescue. Try to mount that 
read

only and copy the files off. If it doesn't work, try to restore the
superblock using one of the tutorials online.



Thanks Bruce . . .

Unfortunately, I don't have spare 1 TB drives laying around.  Since that 
drive is an exact copy of another still working drive, no critical data 
has been lost so no need to copy files.


I'm guessing that this failure is beyond fsck . . .

golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread golinux

On 2020-08-29 16:52, Dimitris via Dng wrote:

On 8/30/20 12:35 AM, goli...@devuan.org wrote:

advice is most welcome.




Thanks, Dimitris . . .


maybe a "long shot" , but did you try another cable/adapter/case for
that disk?



Yes. Tested different usb and adapter.  Have ordered a dock which will 
be able to test the bare drive. Hopefully it will arrive in working 
order. You know how that goes . . .




a few badblocks (?) would slow down the whole disk and maybe not open
some folder(s)...
"input/output error" and smart "read failure" could be something else.



It's not showing any file structure, just a blank page in the file 
manager when the message pops up.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread Bruce Perens via Dng
Copy the block partition (not the mounted files) to a same size or larger
blank block partition using ddrescue or gddrescue. Try to mount that read
only and copy the files off. If it doesn't work, try to restore the
superblock using one of the tutorials online.

On Sat, Aug 29, 2020, 2:52 PM Dimitris via Dng  wrote:

> On 8/30/20 12:35 AM, goli...@devuan.org wrote:
> > advice is most welcome.
>
> maybe a "long shot" , but did you try another cable/adapter/case for
> that disk?
>
> a few badblocks (?) would slow down the whole disk and maybe not open
> some folder(s)...
> "input/output error" and smart "read failure" could be something else.
>
>
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Can this drive be saved?

2020-08-29 Thread Dimitris via Dng
On 8/30/20 12:35 AM, goli...@devuan.org wrote:
> advice is most welcome.

maybe a "long shot" , but did you try another cable/adapter/case for
that disk?

a few badblocks (?) would slow down the whole disk and maybe not open
some folder(s)...
"input/output error" and smart "read failure" could be something else.




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Can this drive be saved?

2020-08-29 Thread golinux

Dear Dev1ers,

I have an oldish external 1 TB backup drive that is throwing up this 
mount error.  Drive is single ext4 partition about 70% full:


Error when trying to mount:
Failed to open directory "cstwo".
Error when getting information for file '/media/xx/cstwo/600': 
Input/output error.




Here's the GSmartControl Self-test log.  Note that the drive only has 40 
hours on it!


SMART Self-test log structure revision number 1
Num  Test_DescriptionStatus  Remaining  
LifeTime(hours)  LBA_of_first_error
# 1  Short offline   Completed: read failure   90%40 
412352591
# 2  Extended offlineCompleted: read failure   90%40 
412352591


In the Attributes data the Reallocated sector counts are hilighted in 
pink in 3 places.




What are the chances of fsck repairing the bad sectors? I shamefully 
admit I have not thought about fsck for years.  IIRC, it used to run 
automatically at boot (Squeeze?) which made boot times quite 
frustrating. So I would occasionally run it manually at a more 
convenient time with commands like this (from old saved bash history):


# fsck.ext3 /dev/sdd1
# e2fsck.ext3 /dev/sdd1

Now that prior knowledge has vanished - I can't even remember what 
e2fsck is for - and the above commands may or may not even be valid in 
2020. I actually read man fsck - at least most of it - and there is this 
option which seems like it would be a good idea:


-N Don't execute, just show what would be done.

S . . . will something like this give me any useful info? And if it 
doesn't explode, can I just run the command itself?


# fsck.ext4 /dev/sdc -N

Or am I looking in the wrong direction. I am rather hardware-challenged. 
 :D


Thanks for slogging through this.  Your advice is most welcome.

golinux


PS. There is no critical data on this disk because I always keep 
multiple backups. But it would be nice to have that drive functioning in 
some capacity.



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng