Reformatting Enterprise SAS drives from 520 to 512 byte sectors
Long story short, I purchased what seemed to be a "too good to be true" deal for a lot of 2.5 SAS drives for my newly provisioned home server.
Alex Nelsen
8/3/20243 min read


Enjoy a funny story filled with frustration, 'a-ha' moments, and realization below.
TLDR; I utilized https://www.youtube.com/watch?v=zewLAih46Ec&t=289s and was able to fix this issue.
In reference to my last blog post, I was in the market for some parts to provision my new home server, the mighty HP Proliant ML350 G9, which had caused me to find a great deal for 1.2TB x 10 lot of Seagate Constellation.2 SAS Drives for around $70 on eBay. Little did I know, these were EMC drives, which they were not listed as. Before learning of this, I had my suspicions, as after installing 2 extra drives into my Dell Poweredge R610 which is currently running Proxmox, it did not detect the drives whatsoever.
My first step in troubleshooting this issue was trying numerous different methods on the command line, such as
lsblk
lsscsi
fdisk xxx
and many more,
but was met with no solution. I believe after this, I had read that these drives had to be initialized in the hardware raid controller for certain machines, which would make sense. The Dell Poweredge R610 comes equipped with the PERC 6/i RAID Controller, which on certain forums has a reputation for not being flexible and very strict with accepted drives and drive types. (Usually Dell Branded only) Even learning this, I was met with another dead end. The drives were now showing in the RAID controller, but after creating their own Virtual Disks, they were not able to be initialized and were showing as failed.
My next step in this crazy fun saga, was reading page upon page of online forums to figure out a few more possible causes, specifically a drive being previously used and formatted with 520 Byte sector sizes. But, the catch was that even though I was confident I knew the issue, I was still not able to see the drives to reformat them. I even tried installing Ubuntu on a live USB, but Ubuntu was not able to see the drives either.
In the same order, I had ordered 256GB of RAM that I was still currently waiting on. Was dreading running into the same issue on my new server, as with the HP machine I had 8 of them installed but this was a newer machine, so was retaining some hope.
Fast forward to today, my RAM has arrived, so I was finally able to boot the machine. My plan originally was to install Proxmox on this server as well, but when trying to install the OS, was met with "no drives found". Restarted the process and previous steps I had taken, where I also found out that I was not able to access the RAID controller in the servers bios due to HP Support needing to activate the interface (apparently HP is not as friendly when it comes to home-labbers). Finally live booted Ubuntu from a USB again..
And VIOLA. The drives were now able to be seen. Of course, this being a live USB, the following commands needed to be run beforehand.. but to confirm my suspicions of this being the actual problem:
sudo dmesg | grep "sector size"
where I was given the following output.. boom:
Once confirmed, I needed to proceed with reformatting these disks with the following commands:
sudo apt-get update && sudo apt-get upgrade -y
( "&&" chains the commands together)
("-y" automatically answers the yes or no prompt for storage space)
sudo apt install ssh
(much rather do this on my actual device, rather than hunched into my network rack)
passwd
(set my ssh password)
sudo apt install sg3-tools
man page below:
( https://manpages.ubuntu.com/manpages/focal/en/man8/sg3_utils.8.html )
sudo sg_scan -i
The 8 listed SEAGATE drives are the SAS drives in question.
sudo sg_format --format --size=512 --fmtpinfo=0 /dev/sgX
("--format", of course indicates to format the disk)
("--size=512", indicates the sector size we want)
("--fmtpinfo=0", indicates sets the FMTPINFO field in the FORMAT UNIT cdb to 0)
I repeated this command with 8 different terminal windows, where as I write this they are currently running concurrently with sg1 being the farthest at 26.31%!





