Home > Storage > PowerFlex > White Papers > Dell APEX Block Storage for Azure: IBM Db2 Database Deployment Best Practices > Appendix A: Create and Persist Logical volume (LVM) using multiple disks
Perform the following steps to create the LVM using multiple disks for Db2 database files running in Azure Linux VM.
types = [ "scini", 16 ]
# pvcreate /dev/scinia /dev/scinib /dev/scinic /dev/scinid
# vgcreate vg_db2data /dev/scinia /dev/scinib /dev/scinic /dev/scinid -v
# lvcreate -L 240G -i4 -I 256 -n lv_db2data vg_db2data /dev/scinia /dev/scinib /dev/scinic /dev/scinid
The above command shows creation of single logical volume of size 240 GB using 4 disks with 256K stripe size.
# mkfs.xfs /dev/vg_db2data/lv_db2data
# mkdir /db2data
# mount -o discard,defaults,_netdev /dev/vg_db2data/lv_db2data /db2data
# echo UUID=`sudo blkid -s UUID -o value /dev/vg_db2data/lv_db2data` /db2data xfs discard,defaults,nofail,_netdev 0 2 | sudo tee -a /etc/fstab
# cat /etc/systemd/system/lvm-activation.service
[Unit]
Description=Activate LVM Volumes
DefaultDependencies=no
After=waagent.service
After=scini.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/vgchange -a y
[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl enable lvm-activation.service
# systemctl start lvm-activation.service
[root@az1db2-ibmdb-1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 36K 16G 1% /dev/shm
tmpfs 16G 8.7M 16G 1% /run
/dev/mapper/rootvg-rootlv 2.0G 1.7G 384M 82% /
/dev/mapper/rootvg-usrlv 10G 2.5G 7.6G 25% /usr
/dev/mapper/rootvg-tmplv 2.0G 114M 1.9G 6% /tmp
/dev/mapper/rootvg-homelv 1014M 146M 869M 15% /home
/dev/sda1 496M 182M 315M 37% /boot
/dev/sda15 495M 5.8M 489M 2% /boot/efi
/dev/sda4 30G 5.7G 23G 21% /u01
/dev/mapper/rootvg-varlv 8.0G 982M 7.1G 13% /var
/dev/sdb1 126G 61M 120G 1% /mnt
/dev/mapper/vg_db2tmp-lv_db2tmp 190G 1.4G 189G 1% /db2tmp
/dev/mapper/vg_db2log-lv_db2log 200G 102G 99G 51% /db2log
/dev/mapper/vg_db2data-lv_db2data 240G 106G 135G 44% /db2data
[root@az1db2-ibmdb-1 ~]#