How to make this as persistent mount point

I was following Linux Challenges to test my Linux skills, in the architecture diagram provided there was a task which told to make mount point persistent on reboot using default options.

So I added this line to /etc/fstab then also it was not able to green tick.

" /dev/dba_storage/volume_1 /mnt/dba_storage xfs defaults 0 0 "

and then did mount -a

If someone has figured out what is wrong please help.

Which challenge is this?

its the first challenge ; Under Linux Challenges

I just completed this challenge without issue:

I used /dev/mapper/dba_storage-volume_1:

[bob@centos-host ~]$ cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Fri Dec  4 17:37:32 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=a62c5b49-755e-41b0-9d36-de3d95e17232 /                       xfs     defaults        0 0
/dev/mapper/dba_storage-volume_1 /mnt/dba_storage xfs defaults 0 0
/swapfile none swap defaults 0 0
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
#VAGRANT-END

oh so … maybe because if we use df -h , we get /dev/mapper/<lvm_name> comes and I was doing without /mapper so that can be the issue ? can you try using without /mapper ?

what can you say ? how Kodekloud runs their test-cases

thanks for the response

It doesn’t work - I tried both.

alright, but in real life it will work right ?

Yes, in real life it would work.

1 Like