Forum Navigation
You need to log in to create posts and topics.

Add new Disk and Create New volume Group

Problem

User wants to add additional disk and new volume group with mount point

Solution

# Check for disks availability

pvs

# after located the new disks added to the virtual machine

# create volume group

vgcreate my_new_volume_group /dev/sdb /dev/sdc

#to add additional disk to the new_volume_group

vgextend my_new_volume_group /dev/sdc

#see if all the disks added properly

lvmdiskscan

# Create Logical volume
sudo lvcreate -l 100%FREE -n my_new_logical_volume  my_new_volume_group 

# format the new logical volume with xfs

mkfs.xfs /dev/my_new_volume_group/my_new_logical_volume

# Create directory and mount the new volume

sudo mkdir /mnt/my_new_directory

sudo mount /dev/my_new_volume_group/my_new_logical_volume /mnt/my_new_directory

# or in fstab to mount on startup

blkid

#/dev/mapper/my_new_logical_volume : UUID=”79813378-3538-4fc5-a6ba-02ca7034fd58″ TYPE=”xfs”

UUID=79813378-3538-4fc5-a6ba-02ca7034fd58     /mnt/my_new_directory  xfs    defaults,noauto 0   2
Uploaded files: