- Find the disk
lsblk
2.Then create a filesystem on it
sudo mkfs.ext4 /dev/vdb
3.Mount the new filesystem under /mnt
sudo mkdir /mnt/var
sudo mount /dev/vdb /mnt/var
4.Copy the data
cd /var
sudo cp -ax * /mnt/var
5.Rename the old var (for the time being)
cd /
sudo mv var var.old
sudo mkdir var
- Unmount and remount as /var
sudo umount /dev/vdb
sudo mount /dev/vdb /var
#Edit /etc/fstab file to include the new partition, with /var being the mount point, so that it will be automatically mounted at boot.
/dev/vdb /var ext4 defaults 0 0