Skip to content

Instantly share code, notes, and snippets.

@altendky

altendky/x.md Secret

Last active May 26, 2021 03:55
Embed
What would you like to do?

See my more recent 'writeup' on this at https://gist.github.com/altendky/26b423ff59574c255d56003c914e72c5.

I have 6x 6TB Seagate SAS drives (ST6000NM0034 / DKS2F-H6R0SS, 7FA6 firmware) that came to me with 520 byte sectors. I have reformatted them to 512 first with sg_format then with the SeaChest tools. I still get /dev/sdh: close device failed: Input/output error and lost async page write when fdisk tries to write a new partition table. mkfs straight on the disk fails as well. They are on a Super Micro backplane attached to a pair of LSI SAS9210-8i (BIOS 07.39.00.00 and firmware 20.00.02.00 per systools. I do have a standard old 3TB SATA in the same setup that is working. Any ideas where I should go next?

Seems a lot like https://www.reddit.com/r/homelab/comments/9bu8tf/is_this_drive_actually_bad_or_did_i_screw/

$ sudo ./SeaChest_Info_x86_64-linux-gnu -d /dev/sdh -i
==========================================================================================
 SeaChest_Info - Seagate drive utilities - NVMe Enabled
 Copyright (c) 2014-2021 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
 SeaChest_Info Version: 2.0.0-2_2_1 X86_64
 Build Date: Apr 27 2021
 Today: Sun May 23 02:11:54 2021        User: root
==========================================================================================

/dev/sg7 - DKS2F-H6R0SS - Z4D1V24X0000R535X9WQ - SCSI
        Vendor ID: SEAGATE 
        Model Number: DKS2F-H6R0SS    
        Serial Number: Z4D1V24X
        PCBA Serial Number: 0000R535X9WQ
        Firmware Revision: 7FA6
        World Wide Name: 5000C5008363EF77
        Copyright: Copyright (c) 2014 Seagate All rights reserved 
        Drive Capacity (TB/TiB): 6.00/5.46
        Temperature Data:
                Current Temperature (C): 32
                Highest Temperature (C): Not Reported
                Lowest Temperature (C): Not Reported
        Power On Time:  5 years 82 days 47 minutes 
        Power On Hours: 45768.78
        MaxLBA: 11721045167
        Native MaxLBA: Not Reported
        Logical Sector Size (B): 512
        Physical Sector Size (B): 4096
        Sector Alignment: 0
        Rotation Rate (RPM): 7200
        Form Factor: 3.5"
        Last DST information:
                Time since last DST (hours): 93.78
                DST Status/Result: 0x0
                DST Test run: 0x1
        Long Drive Self Test Time:  10 hours 2 minutes 
        Interface speed:
                Port 0 (Current Port)
                        Max Speed (GB/s): 12.0
                        Negotiated Speed (Gb/s): 6.0
                Port 1
                        Max Speed (GB/s): 12.0
                        Negotiated Speed (Gb/s): Not Reported
        Annualized Workload Rate (TB/yr): 0.34
        Total Bytes Read (TB): 1.42
        Total Bytes Written (GB): 344.52
        Encryption Support: Not Supported
        Cache Size (MiB): Not Reported
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Not Supported
        Firmware Download Support: Full, Segmented, Deferred
        Number of Logical Units: 1
        Specifications Supported:
                SPC-3
                SAM-5
                SAS-3
                SPL-3
                SPC-4
                SBC-3
        Features Supported:
                Application Client Logging
                Self Test
                Automatic Write Reassignment [Enabled]
                Automatic Read Reassignment [Enabled]
                EPC
                Informational Exceptions [Mode 0]
                Translate Address
                Format Unit
                Sanitize
        Adapter Information:
                Vendor ID: 1000h
                Product ID: 0072h
                Revision: 0003h
$ sudo fdisk /dev/sdh

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
The size of this disk is 5.5 TiB (6001175126016 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).

Created a new DOS disklabel with disk identifier 0x09c5dcb3.

Command (m for help): p
Disk /dev/sdh: 5.47 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: DKS2F-H6R0SS    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x09c5dcb3

Command (m for help): g
Created a new GPT disklabel (GUID: B33651CF-DFC9-A243-A2EB-3B9F66D450F4).

Command (m for help): n
Partition number (1-128, default 1): 
First sector (2048-11721045134, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-11721045134, default 11721045134): 

Created a new partition 1 of type 'Linux filesystem' and of size 5.5 TiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
/dev/sdh: close device failed: Input/output error
$ sudo journalctl -f
May 23 01:46:28 server kernel: blk_update_request: I/O error, dev sdh, sector 0 op 0x1:(WRITE) flags 0x0 phys_seg 5 prio class 0
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 0, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 1, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 2, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 3, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 4, lost async page write
May 23 01:46:28 server kernel: sd 7:0:7:0: [sdh] tag#2828 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
May 23 01:46:28 server kernel: sd 7:0:7:0: [sdh] tag#2828 Sense Key : Aborted Command [current] [descriptor] 
May 23 01:46:28 server kernel: sd 7:0:7:0: [sdh] tag#2828 <<vendor>>ASC=0x81 ASCQ=0x0 
May 23 01:46:28 server kernel: sd 7:0:7:0: [sdh] tag#2828 CDB: Write(16) 8a 00 00 00 00 02 ba a0 f4 88 00 00 00 28 00 00
May 23 01:46:28 server kernel: blk_update_request: I/O error, dev sdh, sector 11721045128 op 0x1:(WRITE) flags 0x0 phys_seg 5 prio class 0
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 1465130641, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 1465130642, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 1465130643, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 1465130644, lost async page write
May 23 01:46:28 server kernel: Buffer I/O error on dev sdh, logical block 1465130645, lost async page write
$ sudo smartctl --xall /dev/sdd
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-73-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SEAGATE
Product:              DKS2F-H6R0SS
Revision:             7FA6
Compliance:           SPC-3
User Capacity:        6,001,175,126,016 bytes [6.00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000c500837063f3
Serial number:        Z4D1YPCR0000R535Y3YR
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Sun May 23 17:18:55 2021 UTC
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled
Read Cache is:        Enabled
Writeback Cache is:   Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Elements in grown defect list: 2

Error Counter logging not supported


[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
Device does not support Self Test logging
Device does not support Background scan results logging
$ sudo blockdev --getsz --getro --getdiscardzeroes --getss --getpbsz --getiomin --getioopt --getalignoff --getmaxsect --getbsz --getsize --getsize64 --getra --getfra /dev/sdd
11721045168
0
0
512
4096
4096
0
0
2560
4096
11721045168
6001175126016
256
256
$ sudo blockdev --report /dev/sdd
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw   256   512  4096          0   6001175126016   /dev/sdd
$ ll /dev/disk/by-id/ | grep /sdd
lrwxrwxrwx 1 root root  9 May 23 14:29 scsi-35000c500837063f3 -> ../../sdd
lrwxrwxrwx 1 root root  9 May 23 14:29 scsi-SSEAGATE_DKS2F-H6R0SS_Z4D1YPCR0000R535Y3YR -> ../../sdd
lrwxrwxrwx 1 root root  9 May 23 14:29 wwn-0x5000c500837063f3 -> ../../sdd
$ sudo dd if=/dev/zero of=/dev/disk/by-id/scsi-SSEAGATE_DKS2F-H6R0SS_Z4D1YPCR0000R535Y3YR bs=512 count=1
1+0 records in
1+0 records out
512 bytes copied, 0.174392 s, 2.9 kB/s

(from sudo journalctl -f while running above)

May 23 18:01:16 server sudo[471291]: altendky : TTY=pts/4 ; PWD=/farm ; USER=root ; COMMAND=/usr/bin/dd if=/dev/zero of=/dev/disk/by-id/scsi-SSEAGATE_DKS2F-H6R0SS_Z4D1YPCR0000R535Y3YR bs=512 count=1
May 23 18:01:16 server sudo[471291]: pam_unix(sudo:session): session opened for user root by altendky(uid=0)
May 23 18:01:16 server kernel: sd 0:0:2:0: [sdd] tag#1657 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
May 23 18:01:16 server kernel: sd 0:0:2:0: [sdd] tag#1657 Sense Key : Aborted Command [current] [descriptor] 
May 23 18:01:16 server kernel: sd 0:0:2:0: [sdd] tag#1657 <<vendor>>ASC=0x81 ASCQ=0x0 
May 23 18:01:16 server kernel: sd 0:0:2:0: [sdd] tag#1657 CDB: Write(16) 8a 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
May 23 18:01:16 server kernel: blk_update_request: I/O error, dev sdd, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
May 23 18:01:16 server kernel: Buffer I/O error on dev sdd, logical block 0, lost async page write
May 23 18:01:16 server sudo[471291]: pam_unix(sudo:session): session closed for user root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment