Once the file system has been created, you will need to create a directory in order to mount the volume.
In this example, the myvolume directory has been created within the mnt directory.
Steps
-
1
To create the directory, type in the following command:
sudo mkdir /mnt/myvolume
-
2
Now that you have created the directory to which you can mount the volume, you can mount it by using the following command:
sudo mount /dev/vdb /mnt/myvolume
This will mount the volume to the /mnt/myvolume directory.
If you want the volume to be mounted automatically every time the system starts up, you will need to add an entry to the /etc/fstab file.
In this example we are making use of nano.
Steps
-
1
Create the directory. Type in the following command:
sudo nano /etc/fstab
-
2
Add the following line to the end of the file:
/dev/vdb /mnt/myvolume ext4 defaults 0 0
This line tells the system to mount the /dev/volumename device to the /mnt/myvolume directory using the ext4 file system with the default mount options.
-
3
Save the /etc/fstab file and exit the text editor.