Adding a New Storage Datastore to ESXI 6.5 (on an HP DL380 G7), and fixing the “Failed to create VMFS datastore – Cannot change the host configuration” error

This is part 3 of 3 in a series on adding new drives and storage to my HP DL380 G7 server and ESXi. The previous 2 parts are here, part 1 – adding new drives, and part 2 – configuring a new RAID array.

After the previous two steps were complete, the new disks are in, the new RAID array configured, the next step is to add the storage in ESXi to be available to new VMs. Here’s my starting point, almost out of space:

Right now I have 1 Datastore configured in ESXi:

To add a new Datastore in ESXi:

At this point I ran into the error ‘Failed to create VMFS datastore’:

This post with steps to fix the partition table on the newly added drives. First step was to enable the sshd service to ssh into the server:

First, use this command to find the disk id of the newly added disk. Here I can see my new disk array as it’s the one closest to 1TB, the size of the new disks:

ls -lha /vmfs/devices/disks/

This command shows the issue with the partition table on the new disk array:

 partedUtil getptbl /vmfs/devices/disks/(disk ID)

Next, use this command to reset the partition table to msdos type for the new disk array:

partedUtil setptbl /vmfs/devices/disks/(disk ID) msdos

Repeating the previous steps to add the new datastore now works, new store added:

New storage space now looks good!

Checking in iLO on the newly added disks, looks good:

Also, taking a look at fan speeds after 30mins or so, fan speeds all look good!


Samsung S8 updated to Android Pie – where’s my Always on Display gone?

After a T-Mobile update to Android Pie, my Always on Display was no longer displaying. It seems like in Pie it initially defaults to only displaying with a touch to the screen. To change this, go to Settings, Lock Screen -> Always on Display – some of these setting screens have additional options if you scroll down. For example, the AoD settings page initially looks like this:

… but if you scroll down you’ll see additional options, including ‘Display Mode’:

Press Display Mode and change from ‘Tap to Show’ to ‘Show Always’ :


Why every developer should write a blog

It’s unavoidable at some point, if not on a regular basis, that as a developer you will need to produce some type of content in written form to share with your team or others. Since clear and concise technical writing takes practice, it makes sense that you should make a proactive effort to practice your writing. Writing a blog is a perfect (and easy, low or no cost) opportunity to get some practice.

There’s plenty more reasons however why blogging is beneficial and useful for all developers. In no particular order, here’s a list of reasons why you should be blogging:

Note Taking

Technology in software development changes and evolves fast. Chances are you came across at least one thing new over the past couple of days, and if it’s not going to be something you’re going to use on a regular basis, it helps to keep notes that you can refer back to at some point in the future. I can remember that I came across something similar a few months back even if I can’t remember the exact details, so creating a short one pager with some notes to refer back to later is incredibly useful.

Sometimes I also keep notes on the approach I took to solve a problem if it was something that took several steps. If I come across the same problem again several months from now, I’d rather refer back to my notes than working it out from scratch again. If the problem or the steps to solve it were interesting or I think may be interesting to others, I usually capture these steps as a blog post and share on my blog.

Collecting Snippets of useful code

Depending on what the information is, I vary how I capture the information. If it’s something that would be useful to capture as step by step in instructions with additional explanations and details, I usually capture these as a blog entry. If it’s something I don’t want to publicaly share, I sometimes create private posts that are not shared, or keep them separate in a notebook in Evernote.

If it’s a snippet of useful code, for simple, short lines of code I collect snippets using Github’s Gist (here’s a link to my public Gists as example of what I keep there), or for longer worked examples I create a project on GitHub and commit a code example there (the majority of my projects on GitHub are code examples where I was looking at something new and put together a worked example as part of learning whatever that new thing was – you can can take a look at the type of thing I keep on GitHub here).

Sharing Lessons Learnt with Others

The majority of time when I search for info on how to use a new library or framework, the most useful content that I find is usually an article written by a developer who worked through the steps on how to use something.

That content would not be there online unless that other developer took time to create the content and share. The great thing about the internet for software development is that content is easy to find if you Google, but that content would not be there unless those people took the time to write and share in the first place. If you have something to share, even if you think it’s obscure or might not be useful, there’s always someone else who is working on something similar, and they might be struggling to work something out – help out your fellow developers and share your knowledge.

Every developer has something they’ve worked on that would be useful to another developer trying to learn and get up to speed on that same thing. Even if you’re a new developer with a few months experience, you still have lessons you’ve learnt from your own experiences that would be useful to another developer with less (or even more) experience following their own skills development path.

CSS styling alternating items, rows or columns using nth-child

The nth-child CSS psuedoclass allows you to apply a style to child elements in lists, such as <li> items or table <tr> rows or <td> cells.

I’ve been working on a React frontend client to a Sudoku puzzle solver which is deployed as am AWS Lambda. It’s easy to build a table of <input> fields, but how can you styles that alternate only every 3 elements?

nth-child is perfect for this. First, you can specify the repeating style every nth element, starting with a thick border every 3 <td> cells : nth-child(3n):

/* right border for every 3rd td */
.sudoku-grid tbody tr td:nth-child(3n){
border-right: 3px solid;

This results in this:

To handle the first column, you can apply a style to a specific element only, with:

/* set 1st column left border */
.sudoku-grid tbody tr td:nth-child(1){
border-left: 3px solid;

This gives:

Now similarly for the <tr> rows, every 3rd row:

 /* bottom border for every 3rd tr row */
.sudoku-grid tbody tr:nth-child(3n){
border-bottom: 3px solid;

And 1st row, now we’re done!

/* top border for first row */
.sudoku-grid tbody tr:nth-child(1){
border-top: 3px solid;