Putting in used {hardware} in a house lab or different methods can have some challenges. Hopefully, the lesson realized right here with a used NVMe drive will save another person time and headache.
I’ve all the time advocated for expertise professionals to run residence labs. This can be a nice method to work and be taught a wide range of new applied sciences. My lab consists of various used Dell and HP ProLiant servers. I’ve used the Dell servers primarily for Home windows installs like my area controller and Hyper-V lab. The HP ProLiant servers are used for my VMwareESXi atmosphere. As VMware Cloud Basis has turn into the first product I work with in my regular day-to-day job, I got down to create a bunch to have the ability to deploy a whole VMware Cloud Basis atmosphere through the Holodeck Toolkit 2.0. If , the toolkit will be discovered right here: VMware Holodeck Toolkit 2.0
A part of the necessities for this deployment are 2TB SSD disks. With this in thoughts, I set out trying on eBay for an appropriate disk. Making certain the interface and necessities had been met for the HP servers in my lab. I discovered an Intel DC P4500 SSD NVMe drive that I felt was appropriate and would meet the wants for my lab. Nevertheless, this assumption was incorrect.
When the drive arrived just a few days later, I put in it in a drive tray and inserted it within the server. The indicator on the entrance of the drive simply stored spinning. Logging into the HP Array Utility confirmed that the server didn’t see the brand new drive in any respect. That individual slot confirmed as empty. The vendor was extremely rated, so I felt the chances of a nasty half weren’t probably and that perhaps the server wanted a firmware replace to have the ability to use the NVMe drive. Nevertheless, this was not the case both. What I discovered in researching was that the HP array controller wouldn’t work for a NVMe drive. Nevertheless, there was a package out there that may substitute the from DVD drive with a two slot bay and a NVME controller for one of many PCI slots. The issue is that even used, this package was over $900. There appeared to be others that had bumped into an analogous downside. Happily, one individual had posted about utilizing a StarTech PCIe NVMe adapter of their HP ProLiant server with out situation. My subsequent step was to order one among these adapters.
When the adapter arrived, I powered off the server, hooked up the NVMe drive to the brand new controller and inserted it within the PCIe slot. As soon as the entire cables had been reattached, I powered it up and waited for ESXi in addition. Once I went to create an information retailer, I nonetheless confirmed no out there disk as proven under.
This lead me down the trail to verifying the Intel NVMe drive was on the VMware HCL and if I wanted to manually set up further drivers. The VMware compatibility device indicated that this drive was supported with “in field” drivers on model 8U2 (the put in model). Even checking the Intel web site didn’t checklist any up to date drivers for ESXi 8. This meant that natively, ESXi ought to acknowledge the drive with out an extra replace to the working system. At this level, I’m uncertain if the problem is a nasty drive, the server not recognizing it, or an surprising situation with ESXi. With the cardboard put in in a PCIe slot, it didn’t appear to look wherever throughout the system POST. For the reason that server had an iLO put in, I made a decision to test the {hardware} stock. Whereas it didn’t present up as a storage machine, it did seem below the “System Stock” tab as proven under.
This indicated the {hardware} acknowledged the machine was put in within the server itself. Now, it appeared the problem was between the drive and ESXi. In trying to find an answer, I got here to a submit on Reddit. Whereas it didn’t present a complete resolution, on a submit with an analogous situation, somebody requested if the drive already had a GPT or different partition on it. Abruptly, it was like a lightning bolt struck. Being paranoid and all the time wiping drives, it by no means dawned on me that the drive shipped with an present partition on it. In fact, ESXi couldn’t create a VMFS datastore if it seems there was an present partition.
Slightly than making an attempt to tug the drive and set up it in one other system, it appeared simpler to search for ESXCLI instructions for detecting and formatting the drive. The next command can be utilized to test if ESXi sees any NVME units:
esxcli nvme machine checklist
From this command, the output exhibits that the drive is seen as “vmhba2”.
Figuring there was already information and a partition on the drive, the next command exhibits if information is already on the drive (word the drive identify vmhba2 was positioned within the command from the earlier output):
esxcli nvme machine log sensible get -A vmhba2 |grep Written
Since formatting the mistaken machine will be a problem, there may be additionally an ESXCLI command to verity the mannequin and serial variety of the drive:
esxcli nvme machine get -A vmhba2 | egrep "Mannequin|Serial"
Having validated the {hardware} and working system acknowledges the brand new NVMe drive and that it’s the appropriate mannequin and serial quantity, it does appear that an present partition has been the problem since putting in it with the NVMe adapter. Now, the drive will be formatted to see if then a datastore will be added inside ESXi. Researching led me to a Western Digital weblog on formatting NVMe drives. Whereas the above instructions had some from different sources, they’re additionally situated on this weblog web site: Formatting NVMe Drives for ESXi
Now, to stroll via the formatting of the NVMe drive. There’s a particular LBAF format the drive might assist, this may be obtained from the next command:
esxcli nvme machine namespace get -A vmhba2 -n 1 | tail -30
Which produces an output much like the one under.
From this output, the “Format ID: 0” signifies the LBAF=0. Now, the machine shall be formatted utilizing the next command:
esxcli nvme machine namespace format -A vmhba2 -f 0 -n 1 -m 0 -p 0 -l 0 -s 0
As soon as accomplished, the drive ought to now be acknowledged as out there to be used in ESXi.
Now, to check if this resolved the problem, time to attempt to add a brand new datastore utilizing the NVMe drive. The method for that is as follows:
1. Below “Storage”, proper click on and choose “New datastore”
2. Choose “Create new VMFS datastore”.
3. Choose a tool (discover the NVMe disk is now out there). Present a reputation and choose “Subsequent”. On this case, it is going to be used for a VCF workload area. So, the identify displays its use.
4. Choose a partitioning choice (normally use the entire house and the newest VMFS), then click on “Subsequent”.
5. Validate, the choose “End”
As soon as the host finishes configuring the drive as a brand new datastore, it should seem below the storage listings. The storage is now prepared to be used in your atmosphere.
Conclusion
Whereas this isn’t a problem that one might generally come throughout, it could actually nonetheless trigger a misplaced of time in troubleshooting and testing. It’s a frequent observe in residence labs to buy and set up used {hardware}. There are just a few organizations that will additionally do the identical to save lots of price. On account of privateness and safety considerations, it’s all the time greatest observe to securely wipe drives earlier than reselling or disposing of them. This course of ought to depart the drives with no partition and totally recognizable by the working system. Nevertheless, not everybody follows these processes. As well as, when upgrading and modifying methods, it’s best to test all features of compatibility. On this case, the idea was made that for the reason that drive had the right interface and was an SSD, it ought to work with out situation. There was no thought given to the truth that the array controller wouldn’t acknowledge NVMe. This exhibits the element wanted in analyzing components as lack of compatibility is usually not a sound motive for a returnrefund when buying used {hardware}.