Issue installing MSSQL on bhyve running Ubuntu 20.04

Cooee

Cadet
Joined
Jun 6, 2023
Messages
3
I'm trying to install MSSQL 2022 (Express - free version) on a bhyve VM running Ubuntu server 20.04.6. My friend runs a small business and needs to have an MSSQL instance for some software that he runs.

I'm following the instructions as laid out by Microsoft here: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver16

I suspect that I'm having similar issues to what is described in this thread, except that I'm running on Ubuntu server 20.04.6: https://www.truenas.com/community/threads/set-disk-sector-size.60560/

I get the following crash during the sudo /opt/mssql/bin/mssql-conf setup step. It indicates a stack overflow, but I don't think the issue is really CPU or stack related. I've tried increasing the ulimit (although I am fairly Linux noob, maybe I didn't do it properly), and I've also tried multiple CPU configurations during the bhyve VM configuration. (2 cores 2 threads, 2 cores 1 thread, 1 core 1 thread).

mssql-crash.png


The last line in the screenshot above says to look at /var/opt/mssql/log/errorlog. The contents of that log are as follows. I think the last line is where the true problem might lie. I think there might be an issue with the VM writing to the zvol.

mssql-log.png


During the zvol configuration I've tried several Record Size settings including 512B (ignoring the warning about pool topology), but none of those seem to make a difference.

Reading around online makes me think that the sector size may be the issue. Below is what fdisk -l shows for my bhyve VM disk. The 16384 bytes looks suspicious to me, but I'm not sure how to change that.

fdisk-bhyve.png


One thing I did do was to set up a VirtualBox VM on my Windows desktop (host) running the same software as above (Ubuntu Server 20.04.6, MSSQL Server 2022). The same software on that VM works fine. This is what fdisk -l looks like on that install.

fdisk-virtualbox.png


And this is what the /var/opt/mssql/log/errorlog looks like on the working VirtualBox VM at the same point in the log file. It got past the Starting up database 'master' line.

mssql-log-good.png


Thanks in advance for any help. :)
 

Cooee

Cadet
Joined
Jun 6, 2023
Messages
3
If I throw a new disk into the server, would I be able to create a new pool with a different sector size e.g. 512/512, or would I be wasting my money purchasing another disk or two? Am I pretty much stuck with that 512/16384 sector size?
 

Cooee

Cadet
Joined
Jun 6, 2023
Messages
3
I managed to get this working. I had been creating datasets (512 / 4K / 16K?) instead of a 4K zvol. It hadn't clicked that what I was doing was wrong, until I started exploring the UI (again, I'm noob). The 4K zvol seems to have done the trick, although TrueNAS is complaining that it might have performance issues. I'm guessing if I throw another couple of disks into the server in the future, that it might fix that issue.

Leaving this here in case it helps anyone in the future.
 

dalew101

Cadet
Joined
Sep 19, 2023
Messages
1
I managed to get this working. I had been creating datasets (512 / 4K / 16K?) instead of a 4K zvol. It hadn't clicked that what I was doing was wrong, until I started exploring the UI (again, I'm noob). The 4K zvol seems to have done the trick, although TrueNAS is complaining that it might have performance issues. I'm guessing if I throw another couple of disks into the server in the future, that it might fix that issue.

Leaving this here in case it helps anyone in the future.
Thank you so much for your post! I spent 3 hours yesterday trying to figure out why I had a stack overflow error. I changed the zvol from 16k to 4k and mssql started up perfectly.
 
Top