- Lsblk
Check if the volume has any data using the following command.
sudo file -s /dev/xvdf
If the above command output shows “/dev/xvdf: data”, it means your volume is empty.
Format the volume to ext4 filesystem using the following command
sudo mkfs -t ext4 /dev/xvdf
Create a directory of your choice to mount our new ext4 volume. I am using the name “newvolume”
sudo mkdir /newvolume
Mount the volume to “newvolume” directory using the following command.
sudo mount /dev/xvdf /newvolume/
cd into newvolume directory and check the disk space for confirming the volume mount.
cd /newvolume
df -h .