Re: linux isn't robust enough to handle bad sector??

2020-09-23 Thread Anssi Saari
Long Wind  writes:

> Test the Seagate ST3320311CS using the ThinkCentre and Seagate SeaTools 
> Bootable.
>
> it has only exe file, no iso file, you need Windows
> https://www.seagate.com/files/old-support-files/seatools/USBbootSetup-SeaToolsBootable.zip

Actually 7zip can extract the files from that in Linux. So it might be
possible to make a USB stick out of this with some work in Linux. Might
be as simple as copying the extracted files to the stick and installing
syslinux on it.

Then again, as UBCD for example includes this (well, SeaTools for DOS),
why not just download that and have a USB stick with a lot of other
utilities too? Or use the ISO for Seatools for DOS?




Re: linux isn't robust enough to handle bad sector??

2020-09-22 Thread David Christensen

On 2020-09-22 06:04, David Wright wrote:

On Tue 22 Sep 2020 at 10:06:46 (+), Long Wind wrote:

 On Tuesday, September 22, 2020, 2:45:30 AM EDT, David Christensen 
 wrote:



https://www.seagate.com/support/downloads/seatools/



it has only exe file, no iso file, you need Windows



You picked the wrong file to download. Go back to the
https://www.seagate.com/support/downloads/seatools/
page and read the text in the corner of the browser
window as the mouse hovers over the big blobs.
The second blob down goes to
https://www.seagate.com/support/downloads/seatools/seatools-legacy-support-master/
Here you will find graphical and text versions that
are bootable ISOs which run under FreeDOS:
https://www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS223ALL.ISO
and
https://www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS112.ISO
with instructions:
https://www.seagate.com/files/staticfiles/support/downloads/seatools/seatools-dos-guide.pdf
Download those.


Thank you for finding the old ISO versions (I recall using those in the 
past).  Given the age of the OP's computers, there is a god chance he 
has an optical drive.  Hopefully, it works.



David



Re: linux isn't robust enough to handle bad sector??

2020-09-22 Thread David Christensen

On 2020-09-22 03:06, Long Wind wrote:
  
 On Tuesday, September 22, 2020, 2:45:30 AM EDT, David Christensen  wrote:
  
Seagate SeaTools Bootable is a USB flash drive live Linux distribution

with an app for testing Seagate products.  Microsoft Windows is not
required:

https://www.seagate.com/support/downloads/seatools/

That is a vintage computer.  But, I would expect it to work with the
Seagate ST3320311CS; if both are in proper working order.

Test the Seagate ST3320311CS using the ThinkCentre and Seagate SeaTools
Bootable.
it has only exe file, no iso file, you need Windows


Sorry about that.  I burned Seagate SeaTools Bootable to a USB flash 
drive a few years ago and forgot the details.



I have sent a support request to Seagate asking them to post an *.img 
file of SeaTools Bootable that can be copied to a USB flash drive using 
Linux/ BSD/ Unix and dd(1).



That said, the harsh reality of running Linux, BSD, etc., on Intel x86/ 
x86-64 hardware is that you must maintain at least one working Windows 
installation.



I bought a Windows 7 Pro COA from a recycled laptop on eBay for $25. 
These are still available.



I am disinclined to set up a Windows 10 installation as it involves 
joining the Microsoft collective.  I seem to recall reading a post that 
there is a way to bypass assimilation -- I will need to research it when 
Windows 7 no longer meets my needs.



Perhaps you should use the Seagate ST3320311CS for Windows.



https://www.seagate.com/files/old-support-files/seatools/USBbootSetup-SeaToolsBootable.zip
and i have little reason to do more test. it has passed short and long tests by smart and badblocks tests. i've removed it from hp to thinkcentre, 


So, the drive passed all smartctl(8) and badblocks(8) tests in the HP, 
the ThinkCentre, or both?



Have you purchased and installed new SATA 6 Gbps cables?



and easily created FS. its problem with hp won't be solved by tool from 
seagate. i'll just use it in thinkcentre.


Be sure to use a file system that can detect bit rot -- either btrfs or 
ZFS -- and back up frequently.



David



Re: linux isn't robust enough to handle bad sector??

2020-09-22 Thread David Wright
On Tue 22 Sep 2020 at 10:06:46 (+), Long Wind wrote:
> On Tuesday, September 22, 2020, 2:45:30 AM EDT, David Christensen 
>  wrote:  
>  
> Seagate SeaTools Bootable is a USB flash drive live Linux distribution 
> with an app for testing Seagate products.  Microsoft Windows is not 
> required:
> 
> https://www.seagate.com/support/downloads/seatools/
> 
> That is a vintage computer.  But, I would expect it to work with the 
> Seagate ST3320311CS; if both are in proper working order.
> 
> Test the Seagate ST3320311CS using the ThinkCentre and Seagate SeaTools 
> Bootable.
> it has only exe file, no iso file, you need Windows
> https://www.seagate.com/files/old-support-files/seatools/USBbootSetup-SeaToolsBootable.zip
> and i have little reason to do more test. it has passed short and long tests 
> by smart and badblocks tests. i've removed it from hp to thinkcentre, and 
> easily created FS. its problem with hp won't be solved by tool from seagate. 
> i'll just use it in thinkcentre.
> Thank Reco for educational post on bad sector!i've just read it and found it 
> instructive. 

You picked the wrong file to download. Go back to the
https://www.seagate.com/support/downloads/seatools/
page and read the text in the corner of the browser
window as the mouse hovers over the big blobs.
The second blob down goes to
https://www.seagate.com/support/downloads/seatools/seatools-legacy-support-master/
Here you will find graphical and text versions that
are bootable ISOs which run under FreeDOS:
https://www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS223ALL.ISO
and
https://www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS112.ISO
with instructions:
https://www.seagate.com/files/staticfiles/support/downloads/seatools/seatools-dos-guide.pdf
Download those.

Cheers,
David.



Re: linux isn't robust enough to handle bad sector??

2020-09-21 Thread David Christensen

On 2020-09-21 21:41, Long Wind wrote:


seagate's new tool is for Windows, i've not used Windows for long timei've read 
their guide for old tool, its function look like smart tooli'm afraid  it won't 
be helpful to my diagnosis effort


Seagate SeaTools Bootable is a USB flash drive live Linux distribution 
with an app for testing Seagate products.  Microsoft Windows is not 
required:


https://www.seagate.com/support/downloads/seatools/



my hp dx5150 pc probably supports sata1 onlyand it work well with Western 
Digital sata3 320G diskbut seem to have trouble with Seagate problem diskit 
probably caused 2 linux installation failures


That is a vintage computer.  But, I would expect it to work with the 
Seagate ST3320311CS; if both are in proper working order.




problem disk seem to have less trouble  with my more modern ThinkCentrewhich 
supports sata2


Test the Seagate ST3320311CS using the ThinkCentre and Seagate SeaTools 
Bootable.



David



Re: linux isn't robust enough to handle bad sector??

2020-09-21 Thread Long Wind
 

On Tuesday, September 22, 2020, 12:17:32 PM GMT+8, Long Wind 
 wrote:
  
On Sunday, September 20, 2020, 4:33:21 PM GMT+8, David Christensen
Go through the test, wipe, and re-test process with Seatools Bootable:

https://www.seagate.com/support/downloads/seatools/


Sorry about last mail, it's not my intention to send last mailChinese 
government's firewall is interfering web mail:filtering, blocking... it makes 
yahoo mail slow and hard to use  

seagate's new tool is for Windows, i've not used Windows for long timei've read 
their guide for old tool, its function look like smart tooli'm afraid  it won't 
be helpful to my diagnosis effort 

my hp dx5150 pc probably supports sata1 onlyand it work well with Western 
Digital sata3 320G diskbut seem to have trouble with Seagate problem diskit 
probably caused 2 linux installation failures
problem disk seem to have less trouble  with my more modern ThinkCentrewhich 
supports sata2

Thank Miles,  problem disk doesn't have bad sector after all
root@debian:~# /sbin/smartctl -A /dev/sdb
smartctl 6.6 2017-11-05 r4594 [i686-linux-4.19.0-10-686] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  UPDATED  
WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate 0x000f   117   099   006    Pre-fail  Always   
-   152718313
  3 Spin_Up_Time    0x0003   097   097   000    Pre-fail  Always   
-   0
  4 Start_Stop_Count    0x0032   100   100   020    Old_age   Always   
-   689
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always   
-   0
  7 Seek_Error_Rate 0x000f   080   060   030    Pre-fail  Always   
-   116258594
  9 Power_On_Hours  0x0032   096   096   000    Old_age   Always   
-   4022
 10 Spin_Retry_Count    0x0013   100   100   097    Pre-fail  Always   
-   0
 12 Power_Cycle_Count   0x0032   100   100   020    Old_age   Always   
-   350
184 End-to-End_Error    0x0032   100   100   099    Old_age   Always   
-   0
187 Reported_Uncorrect  0x0032   100   100   000    Old_age   Always   
-   0
188 Command_Timeout 0x0032   099   001   000    Old_age   Always   
-   2242007139067
189 High_Fly_Writes 0x003a   082   082   000    Old_age   Always   
-   18
190 Airflow_Temperature_Cel 0x0022   066   045   045    Old_age   Always   
In_the_past 34 (Min/Max 26/36)
194 Temperature_Celsius 0x0022   034   055   000    Old_age   Always   
-   34 (0 7 0 0 0)
195 Hardware_ECC_Recovered  0x001a   060   056   000    Old_age   Always   
-   152718313
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always   
-   0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline  
-   0
199 UDMA_CRC_Error_Count    0x003e   200   196   000    Old_age   Always   
-   89









Re: linux isn't robust enough to handle bad sector??

2020-09-21 Thread Long Wind
 
On Sunday, September 20, 2020, 4:33:21 PM GMT+8, David Christensen
Go through the test, wipe, and re-test process with Seatools Bootable:

https://www.seagate.com/support/downloads/seatools/


David

  

Re: linux isn't robust enough to handle bad sector??

2020-09-21 Thread Miles Fidelman

On 9/20/20 11:53 PM, David Christensen wrote:


On 2020-09-20 01:40, Reco wrote:

Hi.


Hello.  :-)



On Sun, Sep 20, 2020 at 01:32:47AM -0700, David Christensen wrote:

On 2020-09-20 00:49, Long Wind wrote:
  On Sunday, September 20, 2020, 2:15:21 PM GMT+8, David 
Christensen

First, backup your data.
Please run the following command and post your complete console 
session

-- prompt, command, output.  Substitute DISKID as appropriate:

      # smartctl -x /dev/disk/by-id/DISKID


Thank you for posting the smartctl report.  I don't see any obvious 
problems.


I do. First, drive does not have any bad sectors,

197 Current_Pending_Sector  -O--C-   100   100   000    -    0
198 Offline_Uncorrectable   C-   100   100   000    -    0


Yes.


I'd also do a smartctl -A and look at the raw read errors. Depending on 
the disk manufacturer, that can be a good indicator that there's a 
failing sector, and the drive is doing lots of reads before it can 
actually access the data in a block or sector.



--
In theory, there is no difference between theory and practice.
In practice, there is.   Yogi Berra

Theory is when you know everything but nothing works.
Practice is when everything works but no one knows why.
In our lab, theory and practice are combined:
nothing works and no one knows why.  ... unknown



Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread Reco
Hi.

On Sun, Sep 20, 2020 at 08:53:20PM -0700, David Christensen wrote:
> > Second,
> > 
> > SATA Phy Event Counters (GP Log 0x11)
> > ID  Size Value  Description
> > 0x000a  22  Device-to-host register FISes sent due to a COMRESET
> > 0x0001  20  Command failed due to ICRC error 0
> > 
> > [1] helpfully states:
> > 
> > CRC error during data transfer
> > This is indicated by ICRC bit in the ERROR register and means that
> > corruption occurred during data transfer. Up to ATA/ATAPI-7, the
> > standard specifies that this bit is only applicable to UDMA transfers
> > but ATA/ATAPI-8 draft revision 1f says that the bit may be applicable to
> > multiword DMA and PIO.
> > 
> > 
> > So, it's either a damaged SATA cable, or a damaged SATA port on a
> > motherboard.
> 
> Without specialized test equipment, about all I can do is buy surplus 
> hardware and apply a process of elimination.

I'd do the same, starting with SATA cable (the cheapest part of the
equation).

Reco



Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread David Christensen

On 2020-09-20 01:40, Reco wrote:

Hi.


Hello.  :-)



On Sun, Sep 20, 2020 at 01:32:47AM -0700, David Christensen wrote:

On 2020-09-20 00:49, Long Wind wrote:

  On Sunday, September 20, 2020, 2:15:21 PM GMT+8, David Christensen
First, backup your data.
Please run the following command and post your complete console session
-- prompt, command, output.  Substitute DISKID as appropriate:

      # smartctl -x /dev/disk/by-id/DISKID


Thank you for posting the smartctl report.  I don't see any obvious problems.


I do. First, drive does not have any bad sectors,

197 Current_Pending_Sector  -O--C-   100   100   000-0
198 Offline_Uncorrectable   C-   100   100   000-0


Yes.



Second,

SATA Phy Event Counters (GP Log 0x11)
ID  Size Value  Description
0x000a  22  Device-to-host register FISes sent due to a COMRESET
0x0001  20  Command failed due to ICRC error 0

[1] helpfully states:

CRC error during data transfer
This is indicated by ICRC bit in the ERROR register and means that
corruption occurred during data transfer. Up to ATA/ATAPI-7, the
standard specifies that this bit is only applicable to UDMA transfers
but ATA/ATAPI-8 draft revision 1f says that the bit may be applicable to
multiword DMA and PIO.


So, it's either a damaged SATA cable, or a damaged SATA port on a
motherboard. 



[1] https://www.kernel.org/doc/htmldocs/libata/ataExceptions.html


Without specialized test equipment, about all I can do is buy surplus 
hardware and apply a process of elimination.



David






Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread Miles Fidelman

On 9/19/20 10:37 PM, Long Wind wrote:


i'm creating FS on problem disk
though it has passed short and long tests by smart tool
i meet bad sector, mkfs complains forever
Ctrl+C can't kill it, what should i do NOW??

[ 2719.089156] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 
0x6 frozen

[ 2719.089171] ata4.00: failed command: WRITE DMA EXT
[ 2719.089185] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 
dma 1048576 out
    res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 
0x4 (timeout)

[ 2719.089192] ata4.00: status: { DRDY }
[ 2719.089209] ata4: hard resetting link
[ 2719.404384] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 2719.412162] ata4.00: configured for UDMA/33
[ 2719.412199] ata4: EH complete
[ 2749.813187] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 
0x6 frozen

[ 2749.813201] ata4.00: failed command: WRITE DMA EXT
[ 2749.813208] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 
dma 1048576 out
    res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 
0x4 (timeout)

[ 2749.813212] ata4.00: status: { DRDY }


One thing to check is whether part of what's happening is driven by the 
onboard disk driver.  Consumer grade drives try very hard to read bad 
blocks, leading to very long timeouts that drag a machine to its knees.  
(Learned this the hard way, trying to figure out why a server, with 
raided disks, just kept going slower... and slower... and slower.)


By contrast, server-grade drives just give up after the first try - 
letting RAID do its thing.


You might want to check the specs on your drive, and run a deep set of 
diagnostics, starting with the more intrusive smart diagnostics.


Miles Fidelman



--
In theory, there is no difference between theory and practice.
In practice, there is.   Yogi Berra

Theory is when you know everything but nothing works.
Practice is when everything works but no one knows why.
In our lab, theory and practice are combined:
nothing works and no one knows why.  ... unknown



Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread deloptes
Long Wind wrote:

> Thank David and Reco!data cable isn't marked with 3Gbps, but it works fine
> with other 300G disk it's easy to buy sata2 data cable, but does mainboard
> support sata2?can't sata2 disk work compatibly in old pc that supports
> sata1 only?it's too bad if it can't. i've left home and stay at other
> place and can't use problem disk for a long time.

The selected mode for data transfer is 1.5 - lowest possible, which might
mean that you have old controller or cable issue or some kind of
incompatibility. Old motherboard is also an option.
As Roco said - Seagate have bad reputation. Nowday manufacturers do not test
hardware with older boards/controllers - no one has the time to test
extnsively, so it might be that it works on some and gives problems on
other board.



Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread Reco
Hi.

On Sun, Sep 20, 2020 at 01:32:47AM -0700, David Christensen wrote:
> On 2020-09-20 00:49, Long Wind wrote:
> >  On Sunday, September 20, 2020, 2:15:21 PM GMT+8, David Christensen
> > First, backup your data.
> > Please run the following command and post your complete console session
> > -- prompt, command, output.  Substitute DISKID as appropriate:
> > 
> >      # smartctl -x /dev/disk/by-id/DISKID
> 
> Thank you for posting the smartctl report.  I don't see any obvious problems.

I do. First, drive does not have any bad sectors,

197 Current_Pending_Sector  -O--C-   100   100   000-0
198 Offline_Uncorrectable   C-   100   100   000-0


Second, 

SATA Phy Event Counters (GP Log 0x11)
ID  Size Value  Description
0x000a  22  Device-to-host register FISes sent due to a COMRESET
0x0001  20  Command failed due to ICRC error 0

[1] helpfully states:

CRC error during data transfer
This is indicated by ICRC bit in the ERROR register and means that
corruption occurred during data transfer. Up to ATA/ATAPI-7, the
standard specifies that this bit is only applicable to UDMA transfers
but ATA/ATAPI-8 draft revision 1f says that the bit may be applicable to
multiword DMA and PIO.


So, it's either a damaged SATA cable, or a damaged SATA port on a
motherboard. But the drive in question is Seagate, and for *those*
there's only one proper solution - throw the thing out into the nearest
garbage bin, and buy a real drive (WD or Toshiba).


Reco

[1] https://www.kernel.org/doc/htmldocs/libata/ataExceptions.html



Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread David Christensen

On 2020-09-20 00:49, Long Wind wrote:
  
 On Sunday, September 20, 2020, 2:15:21 PM GMT+8, David Christensen

First, backup your data.
Please run the following command and post your complete console session
-- prompt, command, output.  Substitute DISKID as appropriate:

     # smartctl -x /dev/disk/by-id/DISKID


Thank you for posting the smartctl report.  I don't see any obvious 
problems.





Thank David! i changed data cable, it doesn't seem to helpi'd better throw it 
away, time i serve it is far more than it serve meand i doubt credibility of 
smart report and badblocks checkit nearly pass test by badblocks with -w option


That drive is SATA 3 Gbps.  Are your SATA cables marked for 3 Gbps or 
faster?




/sbin/smartctl -x /dev/sdb
smartctl 6.6 2017-11-05 r4594 [i686-linux-4.19.0-10-686] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, 
http://www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Pipeline HD 5900.2
Device Model: ST3320311CS


Go through the test, wipe, and re-test process with Seatools Bootable:

https://www.seagate.com/support/downloads/seatools/


David



Re: linux isn't robust enough to handle bad sector??

2020-09-20 Thread Reco
Hi.

On Sun, Sep 20, 2020 at 02:37:32AM +, Long Wind wrote:
> i'm creating FS on problem disk 
> though it has passed short and long tests by smart tooli meet bad sector, 
> mkfs complains foreverCtrl+C can't kill it, what should i do NOW??

> [ 2719.089156] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 
> frozen
> [ 2719.089171] ata4.00: failed command: WRITE DMA EXT
> [ 2719.089185] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 dma 
> 1048576 out
>     res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 
> (timeout)
> [ 2719.089192] ata4.00: status: { DRDY }

That's not a "bad sector". This is a "bad sector":

Jan 29 07:41:01 xxx kernel: [5687751.356991] sd 0:x:x:x: [sdx] tag#0 FAILED 
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jan 29 07:41:01 xxx kernel: [5687751.357016] sd 0:x:x:x: [sdx] tag#0 Sense Key 
: Medium Error [current]
Jan 29 07:41:01 xxx kernel: [5687751.357024] sd 0:x:x:x: [sdx] tag#0 Add. 
Sense: Unrecovered read error
Jan 29 07:41:01 xxx kernel: [5687751.357030] sd 0:x:x:x: [sdx] tag#0 CDB: 
Read(10) 28 00 01 0e f0 80 00 00 80 00
Jan 29 07:41:01 xxx kernel: [5687751.357036] blk_update_request: critical 
medium error, dev sdx, sector 17756288

And you can easily tell one from another. Yours is saying "timeout".
Mine's saying "critical medium error".

What you're seeing is your drive's firmware is hanging on processing a
certain SCSI command. Could be the drive itself, its firmware, or (as
other helpfully suggested) - the SATA cable,

To answer your question - Linux can handle bad sectors just fine. It's
the failing hardware (especially consumer-quality failing hardware) that
it has difficulties with.

Reco



Re: linux isn't robust enough to handle bad sector??

2020-09-19 Thread David Christensen

On 2020-09-19 19:37, Long Wind wrote:

i'm creating FS on problem disk
though it has passed short and long tests by smart tooli meet bad sector, mkfs 
complains foreverCtrl+C can't kill it, what should i do NOW??
[ 2719.089156] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 2719.089171] ata4.00: failed command: WRITE DMA EXT
[ 2719.089185] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 dma 
1048576 out
     res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 
(timeout)
[ 2719.089192] ata4.00: status: { DRDY }
[ 2719.089209] ata4: hard resetting link
[ 2719.404384] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 2719.412162] ata4.00: configured for UDMA/33
[ 2719.412199] ata4: EH complete
[ 2749.813187] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 2749.813201] ata4.00: failed command: WRITE DMA EXT
[ 2749.813208] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 dma 
1048576 out
     res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 
(timeout)
[ 2749.813212] ata4.00: status: { DRDY }


First, backup your data.


Please run the following command and post your complete console session 
-- prompt, command, output.  Substitute DISKID as appropriate:


# smartctl -x /dev/disk/by-id/DISKID


Test the drive with the manufacturer diagnostic utility.  Understand 
that current tools usually require Microsoft Windows.  Run all available 
tests.  Wipe/ zero the entire drive.  Test again.  If the wipe completes 
without errors and second round of tests complete without errors, put 
the drive back into service.



If not, disconnect the power cable and SATA cable (at both ends). 
Reconnect the cables and try again.



If not, replace the SATA cable with a new SATA 6 Gbps cable and try again.


If not, move the drive to another caddy and/or rack, re-plug cables, and 
try again.



If not, connect the cable to a different port and try again.


If not, put the drive into another computer, re-plug cables, and try again.


If not, RMA or recycle the drive.


David



Re: linux isn't robust enough to handle bad sector??

2020-09-19 Thread Dan Ritter
Long Wind wrote: 
> i'm creating FS on problem disk 
> though it has passed short and long tests by smart tooli meet bad sector, 
> mkfs complains foreverCtrl+C can't kill it, what should i do NOW??
> [ 2719.089156] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 
> frozen
> [ 2719.089171] ata4.00: failed command: WRITE DMA EXT
> [ 2719.089185] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 dma 
> 1048576 out
> ?? res 
> 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
> [ 2719.089192] ata4.00: status: { DRDY }
> [ 2719.089209] ata4: hard resetting link
> [ 2719.404384] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
> [ 2719.412162] ata4.00: configured for UDMA/33
> [ 2719.412199] ata4: EH complete
> [ 2749.813187] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 
> frozen
> [ 2749.813201] ata4.00: failed command: WRITE DMA EXT
> [ 2749.813208] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 dma 
> 1048576 out
> ?? res 
> 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
> [ 2749.813212] ata4.00: status: { DRDY }
> 


In order of most likely to least likely:

- replace the disk
- replace the cabling to the disk
- replace the disk controller
- replace the power supply

You can scan for bad blocks with the badblocks tool, but if you
have repeated problems like this, the disk is probably not reliable.

If you need your data to survive events like this later in the
disk's life, you will need backups, RAID, ZFS, or similar
measures.

-dsr-



Re: linux isn't robust enough to handle bad sector??

2020-09-19 Thread Gene Heskett
On Saturday 19 September 2020 22:37:32 Long Wind wrote:

> i'm creating FS on problem disk
> though it has passed short and long tests by smart tooli meet bad
> sector, mkfs complains foreverCtrl+C can't kill it, what should i do
> NOW?? [ 2719.089156] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> action 0x6 frozen [ 2719.089171] ata4.00: failed command: WRITE DMA
> EXT
> [ 2719.089185] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0
> dma 1048576 out res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4
> (timeout) [ 2719.089192] ata4.00: status: { DRDY }
> [ 2719.089209] ata4: hard resetting link
> [ 2719.404384] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
> [ 2719.412162] ata4.00: configured for UDMA/33
> [ 2719.412199] ata4: EH complete
> [ 2749.813187] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
> 0x6 frozen [ 2749.813201] ata4.00: failed command: WRITE DMA EXT
> [ 2749.813208] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0
> dma 1048576 out res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4
> (timeout) [ 2749.813212] ata4.00: status: { DRDY }

This is a lng shot, but try a new sata cable. Particularly if the 
existing one is hot red and over 3 years old.  Any color but hot red.  
There is something in that plastic dye that destroys the copper in the 
cable over time, first observed by this old service tech in the middle 
1970's when that color showed up in japanese microphone cables for CB 
radio's.  Its been a ticking time bomb ever since.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page