About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

LVM Commands, Formatting, and Mounting the File System

Add a disk for use with SQL on linux

----------------------------------------------

from  HYPERV or VMWARE add 50 GB additional disk to linux server


$ lsblk


--partitioning

$pvcreate /dev/sdb1  
       
 -- v for volume creation
$vgcreate vg_data /dev/sdb1   

– l for logical disk creation
$lvcreate –n lv_data –extents 100%FREE vg_create     

Format the logical volume with a file system
---------------------------------------------------------
       xfs & ext4 are supported.

Command to format.
--------------------------------------
$ mkfs.xfs /dev/vg_data/lv_data

Mount the volume in your file system
-----------------------------------------------------------------
$ mount –t xfs /dev/vg_data/lv_data  /var/opt/mssql/data1

Persistently mount the volume in your file system
----------------------------------------------------------------

Go to /etc/fstab

$vi /etc/fstab

Insert below line

/dev/vg_data/lv_data /var/opt/mssql/data1 xfs defaults 0 0