If you are using a Cloud Machine with Ubuntu OS and would like to add another volume to it after the machine’s creation, you may encounter the following issue: the additional volume is not visible inside the system after you check it with df -h command.
It might look like this:
The volume is visible after you run lsblk, but isn’t mounted as seen after running df -h.
What might have happened was that the volume was not mounted automatically inside the OS or wasn’t mounted correctly. The solution to the issue is to mount the volume manually the following way:
- sudo mkdir /mnt/sdb
- sudo mkfs.ext4 /dev/sdb
- sudo mount /dev/sdb /mnt/sdb
- sudo vim or nano /etc/fstab
- add /dev/sdb /mnt/sdb ext4 defaults 0 0 in the end of the file
- sudo mount -a
After completing the manual configuration, run df -h again, and you should be able to see the additional volume mounted inside your OS.
Please, note that sdb is an interchangeable value. b here means a second disk, if you want to add the third/fourth/etc disk, change b accordingly.
Comments
0 comments
Please sign in to leave a comment.