Sun Fire & SAS drive replacement - FreeBSD

================================================================== Had to replace a disk drive in a Sun Fire server. I purchased a 12G/s drive and didn't know if it would be working in this old Sun folk. It did, with negotiated 3G/s speed. I run into problems with Adaptec and low-level format. This is how to solve them.

Adaptec

========== First thing you need to do is to add drive using Adaptec utility. Sun provided concise manual for that. Press Ctrl+A during boot. Go to Array Configuration Utility Initialize Drives - "Insert" key doesn't work using remote terminal via Ilom. In Gnome Terminal, you may switch off Keyboard Shorcuts in Preferences. Then Shift+Insert key worked. In other case, it didn't. - By monkey-typing I found you can use "a" instead of the "Insert" key - add the drive to the inicialization list and press Enter. Or press Backspace (Delete) if you added a drive by accident. Create Array - I use ZFS mirror, so the mirroring won't be job of Adaptec - create array - type: volume, read caching: NO!, write caching: NO!, Create RAID via: Skip Init - leaving caching ON caused later read & write errors using FreeBSD, which degraded the system state & forced me to hard-reset the stucked machine. Don't use the Adaptec caching. Furthermore, Write Cache is dependent on the battery of Adaptec, which may not be present or functional. Even official Sun documentation of that time suggests that Adaptec caching is not a good idea.

Low-level format problem

================================ - out of desperation, I tried also a low-level format from Adaptec utilities. Because server was in boot state and Adaptec stated it may last for many hours, I canceled the process. That made the disk unreadable and invisible for both Adaptec and system. - Western Digital, the current owner of HGST had provided a 474-pages specification for the family of it's SAS drives - according to that, the low-level format is not business of the Adapte[c|r], but of a command run by disk itself - seems that SCSI / SAS drives are quite intelligent and able to do a lot of management and reporting - in case of unfinished low-level format, disk is in "Format Degraded" state and doesn't permit read and write operations - fortunately, I found FreeBSD port sysutils/sg3_utils which provides many tools for low-level commanding and debugging SCSI devices, sg_format being one of them - disk remained visible for freebsd's camcontrol as a "pass" device: camcontrol devlist (drive name was pass3, in my case) - sg_logs pass3 -a prints out a lot of debug info about the drive - camcontrol format pass3 (maybe with option -w , see man camcontrol) did re-start the lowlevel format for me - could be done by sg_format as well - see man sg_format - but didn't work in my case - you can watch progress of internal formatting by camcontrol sense pass3 -v (lasted several hours for 1.2 TB drive) - once low-level formatting is finished, drive is no more in "Format Degraded" state and could be detected by Adaptec as in the beginning of this guide EOF Comments requested ~~~~~~~~~ Binary Sxizophreny - index of comp related stuff Kangaroo's Homepage (czech)