scud133b Posted December 18, 2021 Share Posted December 18, 2021 (edited) Just ran a full preclear cycle on a replacement disk (HGST He8 SAS 8TB - SUN branded) and it is showing in the GUI as 7.9 TB capacity instead of 8 TB. Of course, that means this new disk can't be a direct replacement for the old disk because Unraid thinks it is too small. It's the same model of disk and the same rated size as the drive it replaces. Anything I can do to rescan or clear that disk (or something else) to make sure Unraid sees the full capacity? Edited December 18, 2021 by scud133b added screenshot Quote Link to comment
Squid Posted December 18, 2021 Share Posted December 18, 2021 Probably HPA (or a shucked drive) https://forums.unraid.net/topic/61635-removing-hpa-from-drive/ Quote Link to comment
scud133b Posted December 18, 2021 Author Share Posted December 18, 2021 (edited) 2 hours ago, Squid said: Probably HPA (or a shucked drive) https://forums.unraid.net/topic/61635-removing-hpa-from-drive/ It's a SAS drive so not shucked. When I try to run that command for HPA: hdparm -N /dev/sdb I get this result: /dev/sdb: SG_IO: bad/missing sense data, sb[]: 72 05 20 00 00 00 00 34 00 0a 00 00 00 00 00 00 00 00 00 00 01 0a 00 00 00 00 00 00 00 00 00 00 I noticed running this command on other drives does show HPA is enabled, although they all report bad/missing sense data (maybe b/c SAS?) Edited December 18, 2021 by scud133b Quote Link to comment
Squid Posted December 18, 2021 Share Posted December 18, 2021 Post your diagnostics and wait for @JorgeB to pipe in Quote Link to comment
scud133b Posted December 18, 2021 Author Share Posted December 18, 2021 (edited) Diagnostics attached. I have attempted a full power cycle so unfortunately this won't show us what happened right after the preclear operation. citadel-diagnostics-20211218-1407.zip Edited December 18, 2021 by scud133b Quote Link to comment
JorgeB Posted December 19, 2021 Share Posted December 19, 2021 Formatted with type 1 protection You need to re-format the disk with sg3_utils to remove this: https://forums.unraid.net/topic/93432-parity-disk-read-errors/?do=findComment&comment=864078 Quote Link to comment
scud133b Posted December 19, 2021 Author Share Posted December 19, 2021 5 hours ago, JorgeB said: Formatted with type 1 protection You need to re-format the disk with sg3_utils to remove this: https://forums.unraid.net/topic/93432-parity-disk-read-errors/?do=findComment&comment=864078 Thanks, in progress now. I'll report back with results. Quote Link to comment
scud133b Posted December 20, 2021 Author Share Posted December 20, 2021 (edited) 18 hours ago, JorgeB said: Formatted with type 1 protection You need to re-format the disk with sg3_utils to remove this: https://forums.unraid.net/topic/93432-parity-disk-read-errors/?do=findComment&comment=864078 So I ran sg_format as indicated in that post, for my device at /dev/sdb: sg_format --format --fmtpinfo=0 /dev/sdb Completed, here is the detail showing protection is set to 0: root@citadel:~# sg_format /dev/sdb HGST H7280A520SUN8.0T PD51 peripheral_type: disk [0x0] << supports protection information>> Unit serial number: 001551P1RTYV 2EK1RTYV LU name: 5000cca23bac41f4 Mode Sense (block descriptor) data, prior to changes: <<< longlba flag set (64 bit lba) >>> Number of blocks=15362376264 [0x393ab4248] Block size=512 [0x200] Read Capacity (16) results: Protection: prot_en=0, p_type=0, p_i_exponent=0 Logical block provisioning: lbpme=0, lbprz=0 Logical blocks per physical block exponent=3 Lowest aligned logical block address=0 Number of logical blocks=15362376264 Logical block size=512 bytes No changes made. To format use '--format'. To resize use '--resize' It completed this evening and the device is still showing as only 7.9 TB instead of 8.0 TB. Now I'm worried that because this is a Sun white-labeled drive, maybe it has some proprietary stuff on it that prevents it from having access to the full 8 TB or something. Any other ideas to try? EDIT: I came across this thread: https://forums.serverbuilds.net/t/fixing-sun-oracle-hgst-8tb-drives-reporting-7-86tb/7018 which suggests to reformat the drive with 4k block size instead of 512. Apparently it's a common issue for these Orace/Sun white-labeled drives. So tonight I'm going to kick off the 4k block size reformat and will report back tomorrow: sg_format --format --size=4096 /dev/sXX Edited December 20, 2021 by scud133b 1 Quote Link to comment
Solution scud133b Posted December 20, 2021 Author Solution Share Posted December 20, 2021 (edited) So it appears that formatting to remove type 1 protection wasn't enough -- but also changing to 4K sectors appears to have made it work. Not sure if they are both necessary in any particular order but it wasn't until the 4K change that I was able to see the full size of the drive. Now it is assigned in Unraid and rebuilding parity. The thread linked in the previous post does have a lot more detail about this whole process, but in summary it appears you can prep these specific Oracle/Sun HGST drives for use with Unraid using the sg_format commands together: sg_format --format --fmtpinfo=0 --size=4096 /dev/sXX --format will erase the entire disk --fmtpinfo=0 will remove Type 1 Protection --size=4096 will set sector size to 4K (instead of 512 or 520) [NOTE: your disk needs to physically support this change; an older drive might not] /dev/sXX should be changed to your drive's device name Edited December 20, 2021 by scud133b 2 Quote Link to comment
teknosherpa Posted March 21, 2023 Share Posted March 21, 2023 is it possible to do multiple drives at once? Or is it best to do one at a time? If it is possible what is the syntax to do so? Thanks is advance Quote Link to comment
JorgeB Posted March 21, 2023 Share Posted March 21, 2023 Just open multiple console/terminal windows. 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.