upsidedownlemon Posted January 13, 2023 Share Posted January 13, 2023 (edited) I'm looking for some advise with some SAS drives I have purchased. Background: I have been using UnRAID for about 18 months on consumer grade hardware. Currently working on my 3-2-1 backups which is the reason for these SAS drives - to act as cold offsite storage. I am potentially interested in using them for an array in future, especially once I get my solar set up and energy does not cost as much. As it feels like I have read every forum thread on this issue, I am including lots of details for others in my position. I purchased 5 x SEAGATE 4TB SAS drives (ST4000NM0023 SEAGATE DKS2E-H4R0SS with 7FA6 firmware, date 15227, DOM 11/2014) to act as cold storage for my main UnRAID server. Along with this I have a ICY BOX 4-bay SAS/SATA enclosure with a IBM H1110 + SFF8087 (Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2) I purchased off eBay which has been flashed with 20.00.07.00 and is in IT mode (wonder if it's possible to not be in IT mode after firmware flashing? At this point I feel like I would be happy with single-disk RAID pool). Admittedly this is all new to me, the drives were cheap so I figured I'd give it a go. I have this hardware installed in a spare Dell Optiplex 9020 workstation - hence the unlicensed UnRAID install. Prior to doing all the research I have done, I thought I needed to be messing with some of the settings in the HBA card (e.g boot support - BIOS & OS, OS only, BIOS only, disabled etc). I now (think ?) I understand that the HBA card is providing direct access to the disks and this setting would not change anything. When the disks were firstly installed to UnRAID I was getting errors as the drives had 520 byte sectors on them. I used `sg_format -v --format --size=512 /dev/sdX` which took ~16 hours or so. After this, I was still not able to see the drive in the drop-down in UnRAID. I was also unsuccessful in initializing the drives in Windows. I came across openSeaChest which I ran against 1 drive to reformat into 512 byte sectors. After this completed, I am now able to see the drive in the UnRAID GUI, however I get issues when attempting to format the device. The other drives have only been run through sg_format and do not show up in UnRAID GUI. It feels like I have been through every permutation of PCIe slots for the HBA card, cables, re-format options, BIOS settings and drives and am still not able to format the drive so I can write data. I have not tried another machine however am happy to do so Running smartctl I can see the device is now 512 byte sectors, SMART status is OK, drives are (a bit) old with ~7 years power on time etc. Running gdisk I can see similar info from the drive, though looks like there are some errors root@Tower2:~# gdisk /dev/sdc GPT fdisk (gdisk) version 1.0.8 Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header. Warning! Main and backup partition tables differ! Use the 'c' and 'e' options on the recovery & transformation menu to examine the two tables. Warning! One or more CRCs don't match. You should repair the disk! Main header: OK Backup header: ERROR Main partition table: OK Backup partition table: ERROR Partition table scan: MBR: protective BSD: not present APM: not present GPT: damaged **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** Command (? for help): p Disk /dev/sdc: 7814037168 sectors, 3.6 TiB Model: DKS2E-H4R0SS Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): CBBB871C-C891-4CBF-BD23-0647EE876F75 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 7814037134 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 7814037134 3.6 TiB 8300 Linux filesystem Command (? for help): Attempting to delete the partition and re-create in gdisk: Command (? for help): d Using 1 Command (? for help): n Partition number (1-128, default 1): First sector (34-7814037134, default = 2048) or {+-}size{KMGTP}: Last sector (2048-7814037134, default = 7814037134) or {+-}size{KMGTP}: Current type is 8300 (Linux filesystem) Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem' Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): Y OK; writing new GUID partition table (GPT) to /dev/sdc. The operation has completed successfully. root@Tower2:~# gdisk /dev/sdc GPT fdisk (gdisk) version 1.0.8 Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header. Warning! Main and backup partition tables differ! Use the 'c' and 'e' options on the recovery & transformation menu to examine the two tables. Warning! One or more CRCs don't match. You should repair the disk! Main header: OK Backup header: ERROR Main partition table: OK Backup partition table: ERROR Partition table scan: MBR: protective BSD: not present APM: not present GPT: damaged **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** Command (? for help): Attempting to format the drive in UnRAID gives a bunch of `disk1 write error, sector=x` errors. I found some other threads from people with the same drives however none of them solved my problems. Some people referred to seeing logs that the drive was locked however I do not see that, and the fact I am able to change sector size & write partition table leads me to believe it's not a write-protection issue (I also don't see anything obvious on the drive sticker as being an encryption key). Been on this for about 5 days and I still don't feel all that close, any thoughts, ideas, suggestions would be greatly appreciated. SAS drives are new to me so I may be missing something obvious (like not knowing what IT mode was, the fact these drives had 520 byte sectors on them, etc!). Also combination of 3 new bits of hardware and lack of experience, I am not sure if I should be looking at faulty hardware or faulty operator (me!) Diagnostics attached - thanks! tower2-diagnostics-20230113-1530.zip Edited January 13, 2023 by upsidedownlemon add another name for hba card + fix explanation for lots of detail Quote Link to comment
JorgeB Posted January 13, 2023 Share Posted January 13, 2023 Confirm the drive is not write protected, there were cases before where they were despite nothing being reported on SMART. Quote Link to comment
upsidedownlemon Posted January 13, 2023 Author Share Posted January 13, 2023 6 minutes ago, JorgeB said: Confirm the drive is not write protected, there were cases before where they were despite nothing being reported on SMART. I get this when I plug the drive in Jan 13 01:28:21 Tower2 kernel: mpt2sas_cm0: handle(0x9) sas_address(0x5000c50062df90aa) port_type(0x1) Jan 13 01:28:21 Tower2 kernel: scsi 1:0:1:0: Direct-Access SEAGATE DKS2E-H4R0SS 7FA6 PQ: 0 ANSI: 5 Jan 13 01:28:21 Tower2 kernel: scsi 1:0:1:0: SSP: handle(0x0009), sas_addr(0x5000c50062df90aa), phy(1), device_name(0x5000c50062df90a8) Jan 13 01:28:21 Tower2 kernel: scsi 1:0:1:0: enclosure logical id (0x500507604385d55c), slot(2) Jan 13 01:28:21 Tower2 kernel: scsi 1:0:1:0: qdepth(254), tagged(1), scsi_level(6), cmd_que(1) Jan 13 01:28:21 Tower2 kernel: scsi 1:0:1:0: Power-on or device reset occurred Jan 13 01:28:21 Tower2 kernel: sd 1:0:1:0: Attached scsi generic sg1 type 0 Jan 13 01:28:21 Tower2 kernel: end_device-1:1: add: handle(0x0009), sas_addr(0x5000c50062df90aa) Jan 13 01:28:21 Tower2 kernel: sd 1:0:1:0: [sdc] Spinning up disk... Jan 13 01:28:35 Tower2 kernel: .............ready Jan 13 01:28:35 Tower2 kernel: sd 1:0:1:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB) Jan 13 01:28:35 Tower2 kernel: sd 1:0:1:0: [sdc] Write Protect is off Jan 13 01:28:35 Tower2 kernel: sd 1:0:1:0: [sdc] Mode Sense: 13 00 10 08 Jan 13 01:28:35 Tower2 kernel: sd 1:0:1:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA Jan 13 01:28:35 Tower2 kernel: sd 1:0:1:0: [sdc] Preferred minimum I/O size 512 bytes Jan 13 01:28:35 Tower2 kernel: Alternate GPT is invalid, using primary GPT. Jan 13 01:28:35 Tower2 kernel: sdc: sdc1 Jan 13 01:28:35 Tower2 kernel: sd 1:0:1:0: [sdc] Attached SCSI disk which looks like Write Protect is off Quote Link to comment
JorgeB Posted January 13, 2023 Share Posted January 13, 2023 Yeah, but erroring out as soon as you try to write something. Quote Link to comment
upsidedownlemon Posted January 14, 2023 Author Share Posted January 14, 2023 Thanks for your input - I’ve flashed the drive firmware and will attempt these few things again. Takes best part of 16 hours so really only test one or two things per day. Quote Link to comment
Solution upsidedownlemon Posted January 18, 2023 Author Solution Share Posted January 18, 2023 I have resolved this issue for these 4TB SAS drives - ST4000NM0023 . Steps to resolve: Go to https://apps1.seagate.com/downloads/request.html and enter serial z1z7fbz0 None of the serials on my drives prompted for a new firmware, so I found this on the original listing however could also search other listings for the same drive model Download firmware E007 Also see this forum thread for another link https://forums.servethehome.com/index.php?threads/success-updating-firmware-on-seagate-st4000nm0023.22383/ Failing those options above, I have a copy of the E007 firmware, so reach out if need be Flash the firmware to the drives with openSeaChest openSeaChest_Firmware -d /dev/sg2 --downloadFW fwfilename Format with sg_format sg_format -v --format --size=512 --six --fmpinfo=0 /dev/sg2 I have tried without both --six and --fmpinfo, the ~16 hour process still happens but the drive still cannot be written to at the end without these options (for me, anyway) Now the drive can successfully be formatted and partitioned, hurray! 1 Quote Link to comment
gjstroom Posted December 25, 2023 Share Posted December 25, 2023 @upsidedownlemon thanks for sharing this info. I flashed the firmware, but I couldn't format my ST4000NM0023 (from a Hitachi nas) with the --size=512 option, --size=520 formats fine. After some experimenting I discovered the following workaround: sg_format -v --format --size=520 --six --fmtpinfo=3 /dev/sg1 Let this format for a couple of seconds, then ctrl-c and power off the drive, then power on the drive again and let it initialize. Then format with the --size=512 option: sg_format -v --format --size=512 --six --fmtpinfo=0 /dev/sg1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.