SQL Server on Linux Series: Additional Drives

Microsoft  ❤️  Linux
Microsoft ❤️ Linux
One of the biggest differences with managing SQL Server Linux is with drive presentation. With Windows, we’d all scream if we saw a SQL Server with just one drive (C:) and everything piled on it. The same goes for any other operating system, including Linux. But, how do we get the additional drives added and configured properly? It’s (not) the easiest, but it’s straightforward! Let’s walk through it.

First, create additional drives for your SQL Server data, logs, and tempdb objects. At the time of this writing (RC1) we can’t move the default location for the SQL Server installation itself, but we can move everything else as needed. I’m creating three additional drives, each on their own virtual disk controller, so that we can better distribute the workload. Add additional drives as necessary per your own organizational standards. Create the drives with somewhat different sizes so that they are easily identifiable.

The drives I created are a tempdb drive with 200GB, data drive at 500GB, and a log drive at 250GB.

Once connected to the server, issue the following command to list all block devices on this server with elevated priviledges.

SQL Server on Linux Series: Additional Drives
lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

We see that all four of the drives show up in the list. Because of the nature of how I presented the disks to the VM, the bootable drives (sdd) show up at the end of the chain instead of the beginning, but that’s OK. It doesn’t change how the disks are bootable.

We are going to use the Logical Volume Manager (LVM) to manage the disks for us instead of using regular partitions. On Windows-based servers, Windows has the ability to expand partitions without incurring any downtime, and we want to have the same flexibility from a Linux standpoint. With elevated priviledges (for the rest of the commands), let’s scan the drives to look at what it sees.

Continue reading on DavidKlee.net.

54321
(0 votes. Average 0 of 5)