Search Suggest

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 

Post a Comment